Merge from head

This commit is contained in:
Baptiste Daroussin 2015-09-12 11:41:31 +00:00
commit b5ff185e19
2673 changed files with 755201 additions and 119461 deletions

View file

@ -1,5 +1,6 @@
{
"project.name": "S",
"repository.callsign" : "S",
"phabricator.uri" : "https://reviews.freebsd.org/",
"history.immutable" : true
}

View file

@ -102,7 +102,7 @@
# Note: we use this awkward construct to be compatible with FreeBSD's
# old make used in 10.0 and 9.2 and earlier.
.if defined(MK_META_MODE) && ${MK_META_MODE} == "yes"
.if defined(MK_META_MODE) && ${MK_META_MODE} == "yes" && !make(showconfig)
# targets/Makefile plays the role of top-level
.include "targets/Makefile"
.else
@ -409,7 +409,7 @@ UNIVERSE_TARGET?= buildworld
.endif
KERNSRCDIR?= ${.CURDIR}/sys
targets:
targets: .PHONY
@echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets"
.for target in ${TARGETS}
.for target_arch in ${TARGET_ARCHES_${target}}
@ -539,7 +539,9 @@ MK_META_MODE= no
MK_STAGING= no
# tell meta.autodep.mk to not even think about updating anything.
UPDATE_DEPENDFILE= NO
.if !make(showconfig)
.export MK_META_MODE MK_STAGING UPDATE_DEPENDFILE
.endif
.if make(universe)
# we do not want a failure of one branch abort all.

View file

@ -312,7 +312,6 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \
# world stage
WMAKEENV= ${CROSSENV} \
_SHLIBDIRPREFIX=${WORLDTMP} \
_LDSCRIPTROOT= \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
@ -454,7 +453,6 @@ LIB32FLAGS+= --sysroot=${WORLDTMP}
# Yes, the flags are redundant.
LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${LIB32_OBJTREE} \
_SHLIBDIRPREFIX=${LIB32TMP} \
_LDSCRIPTROOT=${LIB32TMP} \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
@ -466,8 +464,6 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${LIB32_OBJTREE} \
LIB32WMAKEFLAGS+= CC="${XCC} ${LIB32FLAGS}" \
CXX="${XCXX} ${LIB32FLAGS}" \
DESTDIR=${LIB32TMP} \
SHLIBDIR=/usr/lib32 \
LIBDIR=/usr/lib32 \
-DCOMPAT_32BIT \
-DLIBRARIES_ONLY \
-DNO_CPU_CFLAGS \
@ -1384,7 +1380,7 @@ _bt= _bootstrap-tools
_strfile= games/fortune/strfile
.endif
.if ${MK_CXX} != "no"
.if ${MK_GCC} != "no" && ${MK_CXX} != "no"
_gperf= gnu/usr.bin/gperf
.endif
@ -1894,9 +1890,9 @@ cddl/lib/libctf__L: lib/libz__L
.endif
# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built
# on select architectures though (see cddl/lib/Makefile)
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \
${MACHINE_CPUARCH} == "arm"
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc"
_prebuild_libs+= lib/libproc lib/librtld_db
.endif
@ -2249,7 +2245,6 @@ XDTP?=/usr/${XDDIR}
CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
INSTALL="sh ${.CURDIR}/tools/install.sh"
CDENV= ${CDBENV} \
_SHLIBDIRPREFIX=${XDDESTDIR} \
TOOLS_PREFIX=${XDTP}
CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
--sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \

View file

@ -38,10 +38,85 @@
# xargs -n1 | sort | uniq -d;
# done
# 20150719: Remove libarchive.pc
OLD_FILES+=usr/libdata/pkgconfig/libarchive.pc
# 20150705: Rename DTrace provider man pages.
OLD_FILES+=usr/share/man/man4/dtrace-io.4.gz
OLD_FILES+=usr/share/man/man4/dtrace-ip.4.gz
OLD_FILES+=usr/share/man/man4/dtrace-proc.4.gz
OLD_FILES+=usr/share/man/man4/dtrace-sched.4.gz
OLD_FILES+=usr/share/man/man4/dtrace-tcp.4.gz
OLD_FILES+=usr/share/man/man4/dtrace-udp.4.gz
# 20150604: Move nvlist man pages to section 9.
OLD_FILES+=usr/share/man/man3/libnv.3.gz
OLD_FILES+=usr/share/man/man3/nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_null.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_stringf.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_add_stringv.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_clone.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_create.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_destroy.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_dump.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_empty.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_error.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_null.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_exists_type.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_fdump.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_flags.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_null.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_free_type.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_parent.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_get_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_move_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_move_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_move_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_move_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_next.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_pack.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_recv.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_send.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_set_error.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_size.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_take_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_take_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_take_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_take_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_take_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_take_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_unpack.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_xfer.3.gz
# 20150702: Remove duplicated nvlist includes.
OLD_FILES+=usr/include/dnv.h
OLD_FILES+=usr/include/nv.h
# 20150528: PCI IOV device driver methods moved to a separate kobj interface.
OLD_FILES+=usr/share/man/man9/PCI_ADD_VF.9
OLD_FILES+=usr/share/man/man9/PCI_INIT_IOV.9
OLD_FILES+=usr/share/man/man9/PCI_UNINIT_IOV.9
OLD_FILES+=usr/share/man/man9/PCI_ADD_VF.9.gz
OLD_FILES+=usr/share/man/man9/PCI_INIT_IOV.9.gz
OLD_FILES+=usr/share/man/man9/PCI_UNINIT_IOV.9.gz
# 20150525: new clang import which bumps version from 3.6.0 to 3.6.1.
OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h
OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h
@ -117,9 +192,13 @@ OLD_FILES+=usr/lib32/libheimsqlite.a
OLD_FILES+=usr/lib32/libheimsqlite.so
OLD_LIBS+=usr/lib32/libheimsqlite.so.11
OLD_FILES+=usr/lib32/libheimsqlite_p.a
# 20150518: tzdata2015c update
OLD_FILES+=usr/share/zoneinfo/America/Montreal
# 20150506
OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz
# 20150504
OLD_FILES+=usr/share/examples/etc/libmap32.conf
OLD_FILES+=usr/include/bsdstat.h
OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
OLD_LIBS+=usr/lib32/private/libbsdstat.so.1
OLD_LIBS+=usr/lib32/private/libheimipcs.so.11
@ -160,6 +239,7 @@ OLD_FILES+=usr/share/man/man3/nvlist_addv_null.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_addv_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_addv_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_addv_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf_descriptor.3.gz
@ -168,6 +248,7 @@ OLD_FILES+=usr/share/man/man3/nvlist_existsf_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsf_type.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv_descriptor.3.gz
@ -176,6 +257,7 @@ OLD_FILES+=usr/share/man/man3/nvlist_existsv_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_existsv_type.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef_descriptor.3.gz
@ -184,6 +266,7 @@ OLD_FILES+=usr/share/man/man3/nvlist_freef_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freef_type.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freev.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freev_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freev_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_freev_descriptor.3.gz
@ -204,10 +287,33 @@ OLD_FILES+=usr/share/man/man3/nvlist_getv_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_getv_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_getv_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_getv_string.3.gz
# 20150429:
OLD_FILES+=usr/share/docs/papers/hwpmc.ascii.gz
OLD_FILES+=usr/share/man/man3/nvlist_movef_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movef_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movef_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movef_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movev_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movev_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movev_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_movev_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takef_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takef_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takef_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takef_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takef_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takef_string.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takev_binary.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takev_bool.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takev_descriptor.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takev_number.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takev_nvlist.3.gz
OLD_FILES+=usr/share/man/man3/nvlist_takev_string.3.gz
# 20150429: remove never written documentation
OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz
# 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test
OLD_FILES+=usr/tests/sys/kern/mmap_test
# 20150422: zlib.c moved from net to libkern
OLD_FILES+=usr/include/net/zlib.h
OLD_FILES+=usr/include/net/zutil.h
# 20150418
OLD_FILES+=sbin/mount_oldnfs
OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz
@ -226,6 +332,42 @@ OLD_FILES+=usr/include/altq/altq_rmclass.h
OLD_FILES+=usr/include/altq/altq_cbq.h
OLD_FILES+=usr/include/altq/altq_rio.h
OLD_DIRS+=usr/include/altq
# 20150330: ntp 4.2.8p1
OLD_FILES+=usr/share/doc/ntp/driver1.html
OLD_FILES+=usr/share/doc/ntp/driver10.html
OLD_FILES+=usr/share/doc/ntp/driver11.html
OLD_FILES+=usr/share/doc/ntp/driver12.html
OLD_FILES+=usr/share/doc/ntp/driver16.html
OLD_FILES+=usr/share/doc/ntp/driver18.html
OLD_FILES+=usr/share/doc/ntp/driver19.html
OLD_FILES+=usr/share/doc/ntp/driver2.html
OLD_FILES+=usr/share/doc/ntp/driver20.html
OLD_FILES+=usr/share/doc/ntp/driver22.html
OLD_FILES+=usr/share/doc/ntp/driver26.html
OLD_FILES+=usr/share/doc/ntp/driver27.html
OLD_FILES+=usr/share/doc/ntp/driver28.html
OLD_FILES+=usr/share/doc/ntp/driver29.html
OLD_FILES+=usr/share/doc/ntp/driver3.html
OLD_FILES+=usr/share/doc/ntp/driver30.html
OLD_FILES+=usr/share/doc/ntp/driver32.html
OLD_FILES+=usr/share/doc/ntp/driver33.html
OLD_FILES+=usr/share/doc/ntp/driver34.html
OLD_FILES+=usr/share/doc/ntp/driver35.html
OLD_FILES+=usr/share/doc/ntp/driver36.html
OLD_FILES+=usr/share/doc/ntp/driver37.html
OLD_FILES+=usr/share/doc/ntp/driver4.html
OLD_FILES+=usr/share/doc/ntp/driver5.html
OLD_FILES+=usr/share/doc/ntp/driver6.html
OLD_FILES+=usr/share/doc/ntp/driver7.html
OLD_FILES+=usr/share/doc/ntp/driver8.html
OLD_FILES+=usr/share/doc/ntp/driver9.html
OLD_FILES+=usr/share/doc/ntp/ldisc.html
OLD_FILES+=usr/share/doc/ntp/measure.html
OLD_FILES+=usr/share/doc/ntp/mx4200data.html
OLD_FILES+=usr/share/doc/ntp/notes.html
OLD_FILES+=usr/share/doc/ntp/patches.html
OLD_FILES+=usr/share/doc/ntp/porting.html
OLD_FILES+=usr/share/man/man1/sntp.1.gz
# 20150329
.if ${TARGET_ARCH} == "arm"
OLD_FILES+=usr/include/bootconfig.h
@ -297,7 +439,7 @@ OLD_FILES+=usr/bin/ppt
OLD_FILES+=usr/share/man/man6/bcd.6.gz
OLD_FILES+=usr/share/man/man6/ppt.6.gz
# 20150217: Removed remnants of ar(4) driver
OLD_FILES+=usr/include/sys/dev/ic/hd64570.h
OLD_FILES+=usr/include/dev/ic/hd64570.h
# 20150212: /usr/games moving into /usr/bin
OLD_FILES+=usr/games/bcd
OLD_FILES+=usr/games/caesar
@ -317,19 +459,23 @@ OLD_DIRS+=usr/games
# 20150209: liblzma header
OLD_FILES+=usr/include/lzma/lzma.h
# 20150124: spl.9 and friends
OLD_FILES+=usr/share/man/man9/spl.9
OLD_FILES+=usr/share/man/man9/spl0.9
OLD_FILES+=usr/share/man/man9/splbio.9
OLD_FILES+=usr/share/man/man9/splclock.9
OLD_FILES+=usr/share/man/man9/splhigh.9
OLD_FILES+=usr/share/man/man9/splimp.9
OLD_FILES+=usr/share/man/man9/splnet.9
OLD_FILES+=usr/share/man/man9/splsoftclock.9
OLD_FILES+=usr/share/man/man9/splsofttty.9
OLD_FILES+=usr/share/man/man9/splstatclock.9
OLD_FILES+=usr/share/man/man9/spltty.9
OLD_FILES+=usr/share/man/man9/splvm.9
OLD_FILES+=usr/share/man/man9/splx.9
OLD_FILES+=usr/share/man/man9/spl.9.gz
OLD_FILES+=usr/share/man/man9/spl0.9.gz
OLD_FILES+=usr/share/man/man9/splbio.9.gz
OLD_FILES+=usr/share/man/man9/splclock.9.gz
OLD_FILES+=usr/share/man/man9/splhigh.9.gz
OLD_FILES+=usr/share/man/man9/splimp.9.gz
OLD_FILES+=usr/share/man/man9/splnet.9.gz
OLD_FILES+=usr/share/man/man9/splsoftclock.9.gz
OLD_FILES+=usr/share/man/man9/splsofttty.9.gz
OLD_FILES+=usr/share/man/man9/splstatclock.9.gz
OLD_FILES+=usr/share/man/man9/spltty.9.gz
OLD_FILES+=usr/share/man/man9/splvm.9.gz
OLD_FILES+=usr/share/man/man9/splx.9.gz
# 20150122: callout changes reverted
OLD_FILES+=usr/share/man/man9/callout_drain_async.9.gz
# 20150118: toeplitz.c moved from netinet to net
OLD_FILES+=usr/include/netinet/toeplitz.h
# 20150118: new clang import which bumps version from 3.5.0 to 3.5.1.
OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_aes.h
OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_pclmul.h
@ -384,6 +530,8 @@ OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd
OLD_DIRS+=usr/lib/clang/3.5.0/lib
OLD_DIRS+=usr/lib/clang/3.5.0
# 20150102: removal of asr(4)
OLD_FILES+=usr/share/man/man4/asr.4.gz
# 20150102: removal of texinfo
OLD_FILES+=usr/bin/info
OLD_FILES+=usr/bin/infokey
@ -452,7 +600,7 @@ OLD_FILES+=usr/include/clang/3.4.1/x86intrin.h
OLD_FILES+=usr/include/clang/3.4.1/xmmintrin.h
OLD_FILES+=usr/include/clang/3.4.1/xopintrin.h
OLD_DIRS+=usr/include/clang/3.4.1
# 20141226: Remove gpib/ieee488
# 20141225: Remove gpib/ieee488
OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h
OLD_FILES+=usr/include/dev/ieee488/tnt4882.h
OLD_FILES+=usr/include/dev/ieee488/ugpib.h
@ -465,22 +613,37 @@ OLD_FILES+=usr/lib/libgpib_p.a
OLD_FILES+=usr/lib/libgpib.so
OLD_LIBS+=usr/lib/libgpib.so.3
OLD_FILES+=usr/lib/libgpib_p.a
OLD_FILES+=share/man/man4/pcii.4.gz
OLD_FILES+=share/man/man4/gpib.4.gz
OLD_FILES+=share/man/man4/tnt4882.4.gz
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_FILES+=usr/lib32/libgpib.a
OLD_FILES+=usr/lib32/libgpib_p.a
OLD_FILES+=usr/lib32/libgpib.so
OLD_LIBS+=usr/lib32/libgpib.so.3
.endif
OLD_FILES+=usr/share/man/man3/gpib.3.gz
OLD_FILES+=usr/share/man/man3/ibclr.3.gz
OLD_FILES+=usr/share/man/man3/ibdev.3.gz
OLD_FILES+=usr/share/man/man3/ibdma.3.gz
OLD_FILES+=usr/share/man/man3/ibeos.3.gz
OLD_FILES+=usr/share/man/man3/ibeot.3.gz
OLD_FILES+=usr/share/man/man3/ibloc.3.gz
OLD_FILES+=usr/share/man/man3/ibonl.3.gz
OLD_FILES+=usr/share/man/man3/ibpad.3.gz
OLD_FILES+=usr/share/man/man3/ibrd.3.gz
OLD_FILES+=usr/share/man/man3/ibsad.3.gz
OLD_FILES+=usr/share/man/man3/ibsic.3.gz
OLD_FILES+=usr/share/man/man3/ibtmo.3.gz
OLD_FILES+=usr/share/man/man3/ibtrg.3.gz
OLD_FILES+=usr/share/man/man3/ibwrt.3.gz
OLD_FILES+=usr/share/man/man4/gpib.4.gz
OLD_FILES+=usr/share/man/man4/pcii.4.gz
OLD_FILES+=usr/share/man/man4/tnt4882.4.gz
# 20141224: libxo moved to /lib
OLD_LIBS+=usr/lib/libxo.so.0
# 20141223: remove in6_gif.h, in_gif.h and if_stf.h
OLD_FILES+=usr/include/net/if_stf.h
OLD_FILES+=usr/include/netinet/in_gif.h
OLD_FILES+=usr/include/netinet6/in6_gif.h
# 20141209: pw tests broken into a file per command
OLD_FILES+=usr/tests/usr.sbin/pw/pw_delete
OLD_FILES+=usr/tests/usr.sbin/pw/pw_modify
# 20141202: update to mandoc CVS 20141201
OLD_FILES+=usr.bin/preconv
OLD_FILES+=share/man/man1/preconv.1.gz
@ -492,6 +655,11 @@ OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test
OLD_FILES+=usr/tests/sbin/mdconfig/run.pl
# 20141126: remove xform_ipip decapsulation fallback
OLD_FILES+=usr/include/netipsec/ipip_var.h
# 20141122: mandoc updated to 1.13.1
OLD_FILES+=usr/share/mdocml/external.png
# 20141111: SF_KQUEUE code removed
OLD_FILES+=usr/include/sys/sf_base.h
OLD_FILES+=usr/include/sys/sf_sync.h
# 20141109: faith/faithd removal
OLD_FILES+=etc/rc.d/faith
OLD_FILES+=usr/share/man/man4/faith.4.gz
@ -504,6 +672,8 @@ OLD_FILES+=usr/include/netinet/ip_gre.h
OLD_FILES+=etc/rc.d/postrandom
# 20141031: initrandom obsoleted by new /dev/random code
OLD_FILES+=etc/rc.d/initrandom
# 20141030: atf 0.21 import
OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz
# 20141028: debug files accidentally installed as directory name
OLD_FILES+=usr/lib/debug/usr/lib/i18n
OLD_FILES+=usr/lib/debug/usr/lib/private
@ -511,6 +681,9 @@ OLD_FILES+=usr/lib/debug/usr/lib32/i18n
OLD_FILES+=usr/lib/debug/usr/lib32/private
# 20141015: OpenSSL 1.0.1j import
OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz
# 20141003: libproc version bump
OLD_LIBS+=usr/lib/libproc.so.2
OLD_LIBS+=usr/lib32/libproc.so.2
# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz
@ -520,6 +693,10 @@ OLD_FILES+=etc/rc.d/hv_kvpd
OLD_LIBS+=usr/lib/libnv.so.0
# 20140829: rc.d/kerberos removed
OLD_FILES+=etc/rc.d/kerberos
# 20140827: tzdata2014f import
OLD_FILES+=usr/share/zoneinfo/Asia/Chongqing
OLD_FILES+=usr/share/zoneinfo/Asia/Harbin
OLD_FILES+=usr/share/zoneinfo/Asia/Kashgar
# 20140814: libopie version bump
OLD_LIBS+=usr/lib/libopie.so.7
OLD_LIBS+=usr/lib32/libopie.so.7
@ -583,14 +760,19 @@ OLD_FILES+=usr/lib/private/libucl.so
OLD_FILES+=usr/lib/private/libucl_p.a
# 20140803: Remove an obsolete man page
OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz
# 20140731
OLD_FILES+=usr/share/man/man9/SYSCTL_ADD_OID.9.gz
# 20140728: libsbuf restored to old version.
OLD_LIBS+=lib/libsbuf.so.7
OLD_LIBS+=usr/lib32/libsbuf.so.7
# 20140728: Remove an obsolete man page
OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz
OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz
OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz
# 20140723: renamed to PCBGROUP.9
OLD_FILES+=usr/share/man/man9/PCBGROUPS.9.gz
# 20140722: browse_packages_ftp.sh removed
OLD_FILES+=usr/share/examples/bsdconfig/browse_packages_ftp.sh
# 20140718: Remove obsolete man pages
OLD_FILES+=usr/share/man/man9/zero_copy.9.gz
OLD_FILES+=usr/share/man/man9/zero_copy_sockets.9.gz
@ -611,6 +793,14 @@ OLD_FILES+=usr/lib/libhistory.a
OLD_FILES+=usr/lib/libhistory_p.a
OLD_FILES+=usr/lib/libhistory.so
OLD_LIBS+=usr/lib/libhistory.so.8
OLD_FILES+=usr/lib32/libhistory.a
OLD_FILES+=usr/lib32/libhistory.so
OLD_LIBS+=usr/lib32/libhistory.so.8
OLD_FILES+=usr/lib32/libhistory_p.a
OLD_FILES+=usr/lib32/libreadline.a
OLD_FILES+=usr/lib32/libreadline.so
OLD_LIBS+=usr/lib32/libreadline.so.8
OLD_FILES+=usr/lib32/libreadline_p.a
OLD_FILES+=usr/include/readline/chardefs.h
OLD_FILES+=usr/include/readline/history.h
OLD_FILES+=usr/include/readline/keymaps.h
@ -623,6 +813,7 @@ OLD_FILES+=usr/include/readline/rltypedefs.h
OLD_DIRS+=usr/include/readline
OLD_FILES+=usr/share/info/readline.info.gz
OLD_FILES+=usr/share/man/man3/readline.3.gz
OLD_FILES+=usr/share/man/man3/rlhistory.3.gz
# 20140625: csup removal
OLD_FILES+=usr/bin/csup
OLD_FILES+=usr/bin/cpasswd
@ -683,6 +874,12 @@ OLD_FILES+=usr/share/mk/src.opts.mk
OLD_FILES+=usr/tests/sbin/ifconfig/fibs_test
# 20140502: Removal of lindev(4)
OLD_FILES+=usr/share/man/man4/lindev.4.gz
# 20140425
OLD_FILES+=usr/lib/libssp_p.a
OLD_FILES+=usr/lib/libstand_p.a
OLD_FILES+=usr/lib32/libc_pic.a
OLD_FILES+=usr/lib32/libssp_p.a
OLD_FILES+=usr/lib32/libstand_p.a
# 20140314: AppleTalk
OLD_DIRS+=usr/include/netatalk
OLD_FILES+=usr/include/netatalk/aarp.h
@ -898,6 +1095,7 @@ OLD_FILES+=usr/include/lwres/net.h
OLD_FILES+=usr/include/lwres/netdb.h
OLD_FILES+=usr/include/lwres/platform.h
OLD_FILES+=usr/include/lwres/result.h
OLD_FILES+=usr/include/lwres/string.h
OLD_FILES+=usr/include/lwres/version.h
OLD_FILES+=usr/lib/liblwres.a
OLD_FILES+=usr/lib/liblwres.so
@ -2001,7 +2199,6 @@ OLD_LIBS+=usr/lib/libpanel.so.4
OLD_LIBS+=usr/lib/libpanelw.so.4
OLD_LIBS+=usr/lib/libpmc.so.4
OLD_LIBS+=usr/lib/libproc.so.1
OLD_LIBS+=usr/lib/libproc.so.2
OLD_LIBS+=usr/lib/libradius.so.3
OLD_LIBS+=usr/lib/librpcsvc.so.4
OLD_LIBS+=usr/lib/libsdp.so.3

View file

@ -31,27 +31,63 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20150616:
/etc/make.conf now included earlier.
sys.mk now includes /etc/make.conf and {local,src}.sys.mk earlier
than previously.
This makes it simple to interpose external toolchains etc.
However it may cause problems for users who have things like::
20150706:
sendmail has been updated to 8.15.2. Starting with FreeBSD 11.0
and sendmail 8.15, sendmail uses uncompressed IPv6 addresses by
default, i.e., they will not contain "::". For example, instead
of ::1, it will be 0:0:0:0:0:0:0:1. This permits a zero subnet
to have a more specific match, such as different map entries for
IPv6:0:0 vs IPv6:0. This change requires that configuration
data (including maps, files, classes, custom ruleset, etc.) must
use the same format, so make certain such configuration data is
upgrading. As a very simple check search for patterns like
'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. To return to the old
behavior, set the m4 option confUSE_COMPRESSED_IPV6_ADDRESSES or
the cf option UseCompressedIPv6Addresses.
INSTALL+= something
20150630:
The default kernel entropy-processing algorithm is now
Fortuna, replacing Yarrow.
in /etc/make.conf, since INSTALL is not yet defined.
A safe fix for that is to have::
Assuming you have 'device random' in your kernel config
file, the configurations allow a kernel option to override
this default. You may choose *ONE* of:
INSTALL?= install
INSTALL+= something
options RANDOM_YARROW # Legacy /dev/random algorithm.
options RANDOM_DUMMY # Blocking-only driver.
If you have neither, you get Fortuna. For most people,
read no further, Fortuna will give a /dev/random that works
like it always used to, and the difference will be irrelevant.
If you remove 'device random', you get *NO* kernel-processed
entopy at all. This may be acceptable to folks building
embedded systems, but has complications. Carry on reading,
and it is assumed you know what you need.
*PLEASE* read random(4) and random(9) if you are in the
habit of tweeking kernel configs, and/or if you are a member
of the embedded community, wanting specific and not-usual
behaviour from your security subsystems.
NOTE!! If you use RANDOM_DUMMY and/or have no 'device
random', you will NOT have a functioning /dev/random, and
many cryptographic features will not work, including SSH.
You may also find strange behaviour from the random(3) set
of library functions, in particular sranddev(3), srandomdev(3)
and arc4random(3). The reason for this is that the KERN_ARND
sysctl only returns entropy if it thinks it has some to
share, and with RANDOM_DUMMY or no 'device random' this
will never happen.
20150623:
An additional fix for the issue described in the 20150614 sendmail
entry below has been been committed in revision 284717.
which is equivalent to previous behavior.
20150616:
FreeBSD's old make (fmake) has been removed from the system. It is
available as the devel/fmake port or via pkg install fmake.
20150615:
The fix for the issue described in the 20150614 sendmail entry
below has been been committed in revision 284436. The work
@ -74,7 +110,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
this interoperability, sendmail can be configured to use a
2048 bit DH parameter by:
1. Edit /etc/mail/`hostname`.mc
1. Edit /etc/mail/`hostname`.mc
2. If a setting for confDH_PARAMETERS does not exist or
exists and is set to a string beginning with '5',
replace it with '2'.
@ -187,7 +223,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
using a local socket. Users who have already enabled the
local_unbound service should regenerate their configuration
by running "service local_unbound setup" as root.
20150102:
The GNU texinfo and GNU info pages have been removed.
To be able to view GNU info pages please install texinfo from ports.
@ -578,7 +614,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
The GNU Compiler Collection and C++ standard library (libstdc++)
are no longer built by default on platforms where clang is the system
compiler. You can enable them with the WITH_GCC and WITH_GNUCXX
options in src.conf.
options in src.conf.
20130905:
The PROCDESC kernel option is now part of the GENERIC kernel
@ -932,7 +968,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
20120727:
The sparc64 ZFS loader has been changed to no longer try to auto-
detect ZFS providers based on diskN aliases but now requires these
to be explicitly listed in the OFW boot-device environment variable.
to be explicitly listed in the OFW boot-device environment variable.
20120712:
The OpenSSL has been upgraded to 1.0.1c. Any binaries requiring

View file

@ -416,6 +416,7 @@ if necessary, to a 1MiB boundary:
.Sh SEE ALSO
.Xr cp 1 ,
.Xr mt 1 ,
.Xr recoverdisk 1 ,
.Xr tr 1 ,
.Xr geom 4
.Sh STANDARDS

View file

@ -5,12 +5,12 @@
PROG= ls
SRCS= cmp.c ls.c print.c util.c
LIBADD= util
LIBADD= util xo
.if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
CFLAGS+= -DCOLORLS
LIBADD+= termcapw xo
LIBADD+= termcapw
.endif
.include <bsd.prog.mk>

View file

@ -119,7 +119,7 @@ static int f_nofollow; /* don't follow symbolic link arguments */
int f_nonprint; /* show unprintables as ? */
static int f_nosort; /* don't sort output */
int f_notabs; /* don't use tab-separated multi-col output */
static int f_numericonly; /* don't convert uid/gid to name */
int f_numericonly; /* don't convert uid/gid to name */
int f_octal; /* show unprintables as \xxx */
int f_octal_escape; /* like f_octal but use C escapes if possible */
static int f_recursive; /* ls subdirectories also */
@ -158,6 +158,7 @@ main(int argc, char *argv[])
struct winsize win;
int ch, fts_options, notused;
char *p;
const char *errstr = NULL;
#ifdef COLORLS
char termcapbuf[1024]; /* termcap definition buffer */
char tcapbuf[512]; /* capability buffer */
@ -170,7 +171,7 @@ main(int argc, char *argv[])
if (isatty(STDOUT_FILENO)) {
termwidth = 80;
if ((p = getenv("COLUMNS")) != NULL && *p != '\0')
termwidth = atoi(p);
termwidth = strtonum(p, 0, INT_MAX, &errstr);
else if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) != -1 &&
win.ws_col > 0)
termwidth = win.ws_col;
@ -180,9 +181,12 @@ main(int argc, char *argv[])
/* retrieve environment variable, in case of explicit -C */
p = getenv("COLUMNS");
if (p)
termwidth = atoi(p);
termwidth = strtonum(p, 0, INT_MAX, &errstr);
}
if (errstr)
termwidth = 80;
fts_options = FTS_PHYSICAL;
if (getenv("LS_SAMESORT"))
f_samesort = 1;
@ -191,6 +195,7 @@ main(int argc, char *argv[])
if (argc < 0)
return (1);
xo_set_flags(NULL, XOF_COLUMNS);
xo_set_version(LS_XO_VERSION);
while ((ch = getopt(argc, argv,
"1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,")) != -1) {

View file

@ -37,6 +37,8 @@
#define HUMANVALSTR_LEN 5
#define LS_XO_VERSION "1"
extern long blocksize; /* block size units */
extern int f_accesstime; /* use time of last access */
@ -58,6 +60,7 @@ extern int f_statustime; /* use time of last mode change */
extern int f_thousands; /* show file sizes with thousands separators */
extern char *f_timeformat; /* user-specified time format */
extern int f_notabs; /* don't use tab-separated multi-col output */
extern int f_numericonly; /* don't convert uid/gid to name */
extern int f_type; /* add type character for non-regular files */
#ifdef COLORLS
extern int f_color; /* add type in color for non-regular files */

View file

@ -171,7 +171,7 @@ printlong(const DISPLAY *dp)
xo_open_list("entry");
for (p = dp->list; p; p = p->fts_link) {
char *name;
char *name, *type;
if (IS_NOPRINT(p))
continue;
xo_open_instance("entry");
@ -180,22 +180,46 @@ printlong(const DISPLAY *dp)
if (name)
xo_emit("{ke:name/%hs}", name);
if (f_inode)
xo_emit("{:inode/%*ju} ",
xo_emit("{t:inode/%*ju} ",
dp->s_inode, (uintmax_t)sp->st_ino);
if (f_size)
xo_emit("{:blocks/%*jd} ",
xo_emit("{t:blocks/%*jd} ",
dp->s_block, howmany(sp->st_blocks, blocksize));
strmode(sp->st_mode, buf);
aclmode(buf, p);
np = p->fts_pointer;
xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS);
xo_emit("{t:mode/%s} {:links/%*u} {:user/%-*s} {:group/%-*s} ",
buf, dp->s_nlink, sp->st_nlink,
dp->s_user, np->user, dp->s_group, np->group);
if (f_numericonly) {
xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {td:user/%-*s}{e:user/%ju} {td:group/%-*s}{e:group/%ju} ",
buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink,
dp->s_user, np->user, (uintmax_t)sp->st_uid, dp->s_group, np->group, (uintmax_t)sp->st_gid);
} else {
xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} {t:user/%-*s} {t:group/%-*s} ",
buf, (int) sp->st_mode & ALLPERMS, dp->s_nlink, sp->st_nlink,
dp->s_user, np->user, dp->s_group, np->group);
}
if (S_ISBLK(sp->st_mode))
asprintf(&type, "block");
if (S_ISCHR(sp->st_mode))
asprintf(&type, "character");
if (S_ISDIR(sp->st_mode))
asprintf(&type, "directory");
if (S_ISFIFO(sp->st_mode))
asprintf(&type, "fifo");
if (S_ISLNK(sp->st_mode))
asprintf(&type, "symlink");
if (S_ISREG(sp->st_mode))
asprintf(&type, "regular");
if (S_ISSOCK(sp->st_mode))
asprintf(&type, "socket");
if (S_ISWHT(sp->st_mode))
asprintf(&type, "whiteout");
xo_emit("{e:type/%s}", type);
free(type);
if (f_flags)
xo_emit("{:flags/%-*s} ", dp->s_flags, np->flags);
if (f_label)
xo_emit("{:label/%-*s} ", dp->s_label, np->label);
xo_emit("{t:label/%-*s} ", dp->s_label, np->label);
if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
printdev(dp->s_size, sp->st_rdev);
else
@ -238,6 +262,7 @@ printstream(const DISPLAY *dp)
FTSENT *p;
int chcnt;
xo_open_list("entry");
for (p = dp->list, chcnt = 0; p; p = p->fts_link) {
if (p->fts_number == NO_PRINT)
continue;
@ -247,12 +272,15 @@ printstream(const DISPLAY *dp)
xo_emit("\n");
chcnt = 0;
}
xo_open_instance("file");
chcnt += printaname(p, dp->s_inode, dp->s_block);
xo_close_instance("file");
if (p->fts_link) {
xo_emit(", ");
chcnt += 2;
}
}
xo_close_list("entry");
if (chcnt)
xo_emit("\n");
}
@ -369,10 +397,10 @@ printaname(const FTSENT *p, u_long inodefield, u_long sizefield)
sp = p->fts_statp;
chcnt = 0;
if (f_inode)
chcnt += xo_emit("{:inode/%*ju} ",
chcnt += xo_emit("{t:inode/%*ju} ",
(int)inodefield, (uintmax_t)sp->st_ino);
if (f_size)
chcnt += xo_emit("{:size/%*jd} ",
chcnt += xo_emit("{t:size/%*jd} ",
(int)sizefield, howmany(sp->st_blocks, blocksize));
#ifdef COLORLS
if (f_color)
@ -425,9 +453,11 @@ printtime(const char *field, time_t ftime)
format = d_first ? "%e %b %Y" : "%b %e %Y";
strftime(longstring, sizeof(longstring), format, localtime(&ftime));
snprintf(fmt, sizeof(fmt), "{:%s/%%hs} ", field);
snprintf(fmt, sizeof(fmt), "{d:%s/%%hs} ", field);
xo_attr("value", "%ld", (long) ftime);
xo_emit(fmt, longstring);
snprintf(fmt, sizeof(fmt), "{en:%s/%%ld}", field);
xo_emit(fmt, (long) ftime);
}
static int
@ -456,7 +486,7 @@ printtype(u_int mode)
xo_emit("{D:=}{e:type/socket}");
return (1);
case S_IFWHT:
xo_emit("{D:%}{e:type/whiteout}");
xo_emit("{D:%%}{e:type/whiteout}");
return (1);
default:
break;

View file

@ -122,7 +122,7 @@ main(int argc, char *argv[])
*/
if (stat(argv[argc - 1], &sb) || !S_ISDIR(sb.st_mode)) {
if (argc > 2)
usage();
errx(1, "%s is not a directory", argv[argc - 1]);
exit(do_move(argv[0], argv[1]));
}

View file

@ -738,9 +738,9 @@ Display information on all system processes:
.Xr procstat 1 ,
.Xr w 1 ,
.Xr kvm 3 ,
.Xr libxo 3
.Xr libxo 3 ,
.Xr strftime 3 ,
.Xr xo_parse_args 3
.Xr xo_parse_args 3 ,
.Xr mac 4 ,
.Xr procfs 5 ,
.Xr pstat 8 ,

View file

@ -248,7 +248,7 @@ hashalias(const char *p)
{
unsigned int hashval;
hashval = *p << 4;
hashval = (unsigned char)*p << 4;
while (*p)
hashval+= *p++;
return &atab[hashval % ATABSIZE];

View file

@ -522,17 +522,16 @@ static struct tblentry **lastcmdentry;
static struct tblentry *
cmdlookup(const char *name, int add)
{
int hashval;
unsigned int hashval;
const char *p;
struct tblentry *cmdp;
struct tblentry **pp;
size_t len;
p = name;
hashval = *p << 4;
hashval = (unsigned char)*p << 4;
while (*p)
hashval += *p++;
hashval &= 0x7FFF;
pp = &cmdtable[hashval % CMDTABLESIZE];
for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) {
if (equal(cmdp->cmdname, name))

View file

@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
.Dd April 18, 2015
.Dd July 11, 2015
.Dt SH 1
.Os
.Sh NAME
@ -2846,6 +2846,4 @@ The
utility does not recognize multibyte characters other than UTF-8.
Splitting using
.Va IFS
and the line editing library
.Xr editline 3
do not recognize multibyte characters.
does not recognize multibyte characters.

View file

@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -61,7 +62,7 @@ main(int argc, char *argv[])
struct info i;
enum FMT fmt;
int ch;
const char *file;
const char *file, *errstr = NULL;
fmt = NOTSET;
i.fd = STDIN_FILENO;
@ -130,7 +131,9 @@ args: argc -= optind;
if (isdigit(**argv)) {
speed_t speed;
speed = atoi(*argv);
speed = strtonum(*argv, 0, UINT_MAX, &errstr);
if (errstr)
err(1, "speed");
cfsetospeed(&i.t, speed);
cfsetispeed(&i.t, speed);
i.set = 1;

View file

@ -196,17 +196,17 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = {
"lockstat:::spin-release", NULL,
"lockstat:::spin-acquire" },
{ 'H', "Lock", "R/W writer hold", "nsec",
"lockstat::rw_wunlock:rw-release", NULL,
"lockstat::rw_wlock:rw-acquire" },
"lockstat:::rw-release", "arg1 == 0",
"lockstat:::rw-acquire" },
{ 'H', "Lock", "R/W reader hold", "nsec",
"lockstat::rw_runlock:rw-release", NULL,
"lockstat::rw_rlock:rw-acquire" },
"lockstat:::rw-release", "arg1 == 1",
"lockstat:::rw-acquire" },
{ 'H', "Lock", "SX shared hold", "nsec",
"lockstat::sx_sunlock:sx-release", NULL,
"lockstat::sx_slock:sx-acquire" },
"lockstat:::sx-release", "arg1 == 0",
"lockstat:::sx-acquire" },
{ 'H', "Lock", "SX exclusive hold", "nsec",
"lockstat::sx_xunlock:sx-release", NULL,
"lockstat::sx_xlock:sx-acquire" },
"lockstat:::sx-release", "arg1 == 1",
"lockstat:::sx-acquire" },
{ 'H', "Lock", "Unknown event (type 38)", "units" },
{ 'H', "Lock", "Unknown event (type 39)", "units" },
{ 'H', "Lock", "Unknown event (type 40)", "units" },

View file

@ -0,0 +1,139 @@
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2014 Howard Su
* Copyright 2015 George V. Neville-Neil
* Copyright 2015 Ruslan Bukin <br@bsdpad.com>
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <libgen.h>
#include <dt_impl.h>
#include <dt_pid.h>
#if !defined(sun)
#include <libproc_compat.h>
#endif
/*ARGSUSED*/
int
dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp)
{
ftp->ftps_type = DTFTP_ENTRY;
ftp->ftps_pc = (uintptr_t)symp->st_value;
ftp->ftps_size = (size_t)symp->st_size;
ftp->ftps_noffs = 1;
ftp->ftps_offs[0] = 0;
if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
strerror(errno));
return (dt_set_errno(dtp, errno));
}
return (1);
}
int
dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret)
{
dt_dprintf("%s: unimplemented\n", __func__);
return (DT_PROC_ERR);
}
/*ARGSUSED*/
int
dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off)
{
if (!ALIGNED_POINTER(off, 4))
return (DT_PROC_ALIGN);
ftp->ftps_type = DTFTP_OFFSETS;
ftp->ftps_pc = (uintptr_t)symp->st_value;
ftp->ftps_size = (size_t)symp->st_size;
ftp->ftps_noffs = 1;
ftp->ftps_offs[0] = off;
if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
strerror(errno));
return (dt_set_errno(dtp, errno));
}
return (1);
}
/*ARGSUSED*/
int
dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern)
{
ulong_t i;
ftp->ftps_type = DTFTP_OFFSETS;
ftp->ftps_pc = (uintptr_t)symp->st_value;
ftp->ftps_size = (size_t)symp->st_size;
ftp->ftps_noffs = 0;
/*
* If we're matching against everything, just iterate through each
* instruction in the function, otherwise look for matching offset
* names by constructing the string and comparing it against the
* pattern.
*/
if (strcmp("*", pattern) == 0) {
for (i = 0; i < symp->st_size; i += 4) {
ftp->ftps_offs[ftp->ftps_noffs++] = i;
}
} else {
char name[sizeof (i) * 2 + 1];
for (i = 0; i < symp->st_size; i += 4) {
(void) sprintf(name, "%lx", i);
if (gmatch(name, pattern))
ftp->ftps_offs[ftp->ftps_noffs++] = i;
}
}
if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
strerror(errno));
return (dt_set_errno(dtp, errno));
}
return (ftp->ftps_noffs);
}

View file

@ -227,7 +227,10 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, dof_elf32_t *dep)
s = &dofs[dofrh->dofr_tgtsec];
for (j = 0; j < nrel; j++) {
#if defined(__arm__)
#if defined(__aarch64__)
/* XXX */
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
#elif defined(__arm__)
/* XXX */
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
#elif defined(__i386) || defined(__amd64)
@ -426,7 +429,9 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, dof_elf64_t *dep)
s = &dofs[dofrh->dofr_tgtsec];
for (j = 0; j < nrel; j++) {
#if defined(__arm__)
#if defined(__aarch64__)
/* XXX */
#elif defined(__arm__)
/* XXX */
#elif defined(__mips__)
/* XXX */
@ -822,7 +827,16 @@ dt_symtab_lookup(Elf_Data *data_sym, int nsym, uintptr_t addr, uint_t shn,
return (ret);
}
#if defined(__arm__)
#if defined(__aarch64__)
/* XXX */
static int
dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
uint32_t *off)
{
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
return (0);
}
#elif defined(__arm__)
/* XXX */
static int
dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,

View file

@ -26,9 +26,9 @@ _libzpool= libzpool
.endif
.endif
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \
${MACHINE_CPUARCH} == "arm"
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc"
_drti= drti
_libdtrace= libdtrace
.endif

View file

@ -69,27 +69,31 @@ CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
#CFLAGS+= -DYYDEBUG
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/aarch64
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/aarch64
.elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/dev/dtrace/x86
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/i386
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/${MACHINE_ARCH}
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/x86
.elif ${MACHINE_CPUARCH} == "sparc64"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc
.elif ${MACHINE_CPUARCH} == "mips"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips
.elif ${MACHINE_CPUARCH} == "arm"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/arm
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/arm
.elif ${MACHINE_CPUARCH} == "mips"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips
.elif ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/powerpc
.elif ${MACHINE_CPUARCH} == "sparc64"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/sparc
.else
# temporary hack
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel

View file

@ -7,10 +7,10 @@ LIB= nvpair
SRCS= libnvpair.c \
nvpair_alloc_system.c \
nvpair_alloc_fixed.c \
nvpair.c \
nvpair_json.c \
fnvpair.c
opensolaris_fnvpair.c \
opensolaris_nvpair.c \
opensolaris_nvpair_alloc_fixed.c
WARNS?= 0
CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include

View file

@ -30,7 +30,7 @@ _plockstat= plockstat
.endif
.endif
.if ${MACHINE_CPUARCH} == "arm"
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
_dtrace= dtrace
_dtruss= dtruss
_lockstat= lockstat

View file

@ -52,7 +52,7 @@
# $SB/obj-i386/bsd/gnu/lib/csu
# $SB/obj-i386/bsd/gnu/lib/libgcc
# $SB/obj-i386/bsd/include
# $SB/obj-i386/bsd/lib/csu/i386-elf
# $SB/obj-i386/bsd/lib/csu/i386
# $SB/obj-i386/bsd/lib/libc
# $SB/src/bsd/include
# $SB/src/bsd/sys/i386/include

View file

@ -813,7 +813,8 @@ _ELF_DEFINE_EM(EM_KM32, 210, "KM211 KM32 32-bit processor") \
_ELF_DEFINE_EM(EM_KMX32, 211, "KM211 KMX32 32-bit processor") \
_ELF_DEFINE_EM(EM_KMX16, 212, "KM211 KMX16 16-bit processor") \
_ELF_DEFINE_EM(EM_KMX8, 213, "KM211 KMX8 8-bit processor") \
_ELF_DEFINE_EM(EM_KVARC, 214, "KM211 KMX32 KVARC processor")
_ELF_DEFINE_EM(EM_KVARC, 214, "KM211 KMX32 KVARC processor") \
_ELF_DEFINE_EM(EM_RISCV, 243, "RISC-V")
#undef _ELF_DEFINE_EM
#define _ELF_DEFINE_EM(N, V, DESCR) N = V ,

View file

@ -104,8 +104,8 @@ dwarf_get_section_max_offsets(Dwarf_Debug dbg, Dwarf_Unsigned *debug_info,
Dwarf_Unsigned *debug_ranges, Dwarf_Unsigned *debug_pubtypes)
{
return (dwarf_get_section_max_offsets(dbg, debug_info, debug_abbrev,
return (dwarf_get_section_max_offsets_b(dbg, debug_info, debug_abbrev,
debug_line, debug_loc, debug_aranges, debug_macinfo,
debug_pubnames, debug_str, debug_frame, debug_ranges,
debug_pubtypes));
debug_pubtypes, NULL));
}

View file

@ -27,6 +27,7 @@
#include <sys/param.h>
#include <sys/queue.h>
#include <ar.h>
#include <assert.h>
#include <ctype.h>
#include <dwarf.h>
#include <err.h>
@ -314,6 +315,7 @@ static const char *dwarf_reg(unsigned int mach, unsigned int reg);
static const char *dwarf_regname(struct readelf *re, unsigned int num);
static struct dumpop *find_dumpop(struct readelf *re, size_t si,
const char *sn, int op, int t);
static int get_ent_count(struct section *s, int *ent_count);
static char *get_regoff_str(struct readelf *re, Dwarf_Half reg,
Dwarf_Addr off);
static const char *get_string(struct readelf *re, int strtab, size_t off);
@ -532,6 +534,7 @@ elf_machine(unsigned int mach)
case EM_ARCA: return "Arca RISC Microprocessor";
case EM_UNICORE: return "Microprocessor series from PKU-Unity Ltd";
case EM_AARCH64: return "AArch64";
case EM_RISCV: return "RISC-V";
default:
snprintf(s_mach, sizeof(s_mach), "<unknown: %#x>", mach);
return (s_mach);
@ -2900,6 +2903,24 @@ dump_shdr(struct readelf *re)
#undef ST_CTL
}
/*
* Return number of entries in the given section. We'd prefer ent_count be a
* size_t *, but libelf APIs already use int for section indices.
*/
static int
get_ent_count(struct section *s, int *ent_count)
{
if (s->entsize == 0) {
warnx("section %s has entry size 0", s->name);
return (0);
} else if (s->sz / s->entsize > INT_MAX) {
warnx("section %s has invalid section count", s->name);
return (0);
}
*ent_count = (int)(s->sz / s->entsize);
return (1);
}
static void
dump_dynamic(struct readelf *re)
{
@ -2928,8 +2949,8 @@ dump_dynamic(struct readelf *re)
/* Determine the actual number of table entries. */
nentries = 0;
jmax = (int) (s->sz / s->entsize);
if (!get_ent_count(s, &jmax))
continue;
for (j = 0; j < jmax; j++) {
if (gelf_getdyn(d, j, &dyn) != &dyn) {
warnx("gelf_getdyn failed: %s",
@ -3175,7 +3196,9 @@ dump_rel(struct readelf *re, struct section *s, Elf_Data *d)
else
printf("%-12s %-12s %-19s %-16s %s\n", REL_HDR);
}
len = d->d_size / s->entsize;
assert(d->d_size == s->sz);
if (!get_ent_count(s, &len))
return;
for (i = 0; i < len; i++) {
if (gelf_getrel(d, i, &r) != &r) {
warnx("gelf_getrel failed: %s", elf_errmsg(-1));
@ -3231,7 +3254,9 @@ dump_rela(struct readelf *re, struct section *s, Elf_Data *d)
else
printf("%-12s %-12s %-19s %-16s %s\n", RELA_HDR);
}
len = d->d_size / s->entsize;
assert(d->d_size == s->sz);
if (!get_ent_count(s, &len))
return;
for (i = 0; i < len; i++) {
if (gelf_getrela(d, i, &r) != &r) {
warnx("gelf_getrel failed: %s", elf_errmsg(-1));
@ -3296,7 +3321,7 @@ dump_symtab(struct readelf *re, int i)
Elf_Data *d;
GElf_Sym sym;
const char *name;
int elferr, stab, j;
int elferr, stab, j, len;
s = &re->sl[i];
stab = s->link;
@ -3309,12 +3334,14 @@ dump_symtab(struct readelf *re, int i)
}
if (d->d_size <= 0)
return;
if (!get_ent_count(s, &len))
return;
printf("Symbol table (%s)", s->name);
printf(" contains %ju entries:\n", s->sz / s->entsize);
printf(" contains %d entries:\n", len);
printf("%7s%9s%14s%5s%8s%6s%9s%5s\n", "Num:", "Value", "Size", "Type",
"Bind", "Vis", "Ndx", "Name");
for (j = 0; (uint64_t)j < s->sz / s->entsize; j++) {
for (j = 0; j < len; j++) {
if (gelf_getsym(d, j, &sym) != &sym) {
warnx("gelf_getsym failed: %s", elf_errmsg(-1));
continue;
@ -3352,7 +3379,7 @@ dump_symtabs(struct readelf *re)
Elf_Data *d;
struct section *s;
uint64_t dyn_off;
int elferr, i;
int elferr, i, len;
/*
* If -D is specified, only dump the symbol table specified by
@ -3377,8 +3404,10 @@ dump_symtabs(struct readelf *re)
}
if (d->d_size <= 0)
return;
if (!get_ent_count(s, &len))
return;
for (i = 0; (uint64_t)i < s->sz / s->entsize; i++) {
for (i = 0; i < len; i++) {
if (gelf_getdyn(d, i, &dyn) != &dyn) {
warnx("gelf_getdyn failed: %s", elf_errmsg(-1));
continue;
@ -3566,7 +3595,8 @@ dump_gnu_hash(struct readelf *re, struct section *s)
maskwords = buf[2];
buf += 4;
ds = &re->sl[s->link];
dynsymcount = ds->sz / ds->entsize;
if (!get_ent_count(ds, &dynsymcount))
return;
nchain = dynsymcount - symndx;
if (d->d_size != 4 * sizeof(uint32_t) + maskwords *
(re->ec == ELFCLASS32 ? sizeof(uint32_t) : sizeof(uint64_t)) +
@ -3995,7 +4025,7 @@ dump_liblist(struct readelf *re)
char tbuf[20];
Elf_Data *d;
Elf_Lib *lib;
int i, j, k, elferr, first;
int i, j, k, elferr, first, len;
for (i = 0; (size_t) i < re->shnum; i++) {
s = &re->sl[i];
@ -4012,8 +4042,10 @@ dump_liblist(struct readelf *re)
if (d->d_size <= 0)
continue;
lib = d->d_buf;
if (!get_ent_count(s, &len))
continue;
printf("\nLibrary list section '%s' ", s->name);
printf("contains %ju entries:\n", s->sz / s->entsize);
printf("contains %d entries:\n", len);
printf("%12s%24s%18s%10s%6s\n", "Library", "Time Stamp",
"Checksum", "Version", "Flags");
for (j = 0; (uint64_t) j < s->sz / s->entsize; j++) {
@ -4398,7 +4430,7 @@ static void
dump_mips_reginfo(struct readelf *re, struct section *s)
{
Elf_Data *d;
int elferr;
int elferr, len;
(void) elf_errno();
if ((d = elf_rawdata(s->scn, NULL)) == NULL) {
@ -4410,9 +4442,10 @@ dump_mips_reginfo(struct readelf *re, struct section *s)
}
if (d->d_size <= 0)
return;
if (!get_ent_count(s, &len))
return;
printf("\nSection '%s' contains %ju entries:\n", s->name,
s->sz / s->entsize);
printf("\nSection '%s' contains %d entries:\n", s->name, len);
dump_mips_odk_reginfo(re, d->d_buf, d->d_size);
}

View file

@ -1054,7 +1054,7 @@ void SCCPSolver::visitLoadInst(LoadInst &I) {
// load null -> null
if (isa<ConstantPointerNull>(Ptr) && I.getPointerAddressSpace() == 0)
return markConstant(IV, &I, Constant::getNullValue(I.getType()));
return markConstant(IV, &I, UndefValue::get(I.getType()));
// Transform load (constant global) into the value loaded.
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Ptr)) {

View file

@ -81,7 +81,7 @@ static void ConnectProlog(Loop *L, Value *BECount, unsigned Count,
if (L->contains(PN)) {
NewPN->addIncoming(PN->getIncomingValueForBlock(NewPH), OrigPH);
} else {
NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
NewPN->addIncoming(UndefValue::get(PN->getType()), OrigPH);
}
Value *V = PN->getIncomingValueForBlock(Latch);

View file

@ -0,0 +1,88 @@
Pull in r241142 from upstream llvm trunk (by David Majnemer):
[SCCP] Turn loads of null into undef instead of zero initialized values
Surprisingly, this is a correctness issue: the mmx type exists for
calling convention purposes, LLVM doesn't have a zero representation for
them.
This partially fixes PR23999.
Pull in r241143 from upstream llvm trunk (by David Majnemer):
[LoopUnroll] Use undef for phis with no value live
We would create a phi node with a zero initialized operand instead of
undef in the case where no value was originally available. This was
problematic for x86_mmx which has no null value.
These fix a "Cannot create a null constant of that type!" error when
compiling the graphics/sdl2_gfx port with MMX enabled.
Introduced here: http://svnweb.freebsd.org/changeset/base/285149
Index: lib/Transforms/Scalar/SCCP.cpp
===================================================================
--- lib/Transforms/Scalar/SCCP.cpp
+++ lib/Transforms/Scalar/SCCP.cpp
@@ -1054,7 +1054,7 @@
// load null -> null
if (isa<ConstantPointerNull>(Ptr) && I.getPointerAddressSpace() == 0)
- return markConstant(IV, &I, Constant::getNullValue(I.getType()));
+ return markConstant(IV, &I, UndefValue::get(I.getType()));
// Transform load (constant global) into the value loaded.
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Ptr)) {
Index: lib/Transforms/Utils/LoopUnrollRuntime.cpp
===================================================================
--- lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -81,7 +81,7 @@
if (L->contains(PN)) {
NewPN->addIncoming(PN->getIncomingValueForBlock(NewPH), OrigPH);
} else {
- NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
+ NewPN->addIncoming(UndefValue::get(PN->getType()), OrigPH);
}
Value *V = PN->getIncomingValueForBlock(Latch);
Index: test/Transforms/LoopUnroll/X86/mmx.ll
===================================================================
--- test/Transforms/LoopUnroll/X86/mmx.ll
+++ test/Transforms/LoopUnroll/X86/mmx.ll
@@ -0,0 +1,21 @@
+; RUN: opt < %s -S -loop-unroll | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define x86_mmx @f() #0 {
+entry:
+ br label %for.body
+
+for.body: ; preds = %for.body, %entry
+ %phi = phi i32 [ 1, %entry ], [ %add, %for.body ]
+ %add = add i32 %phi, 1
+ %cmp = icmp eq i32 %phi, 0
+ br i1 %cmp, label %exit, label %for.body
+
+exit: ; preds = %for.body
+ %ret = phi x86_mmx [ undef, %for.body ]
+ ; CHECK: ret x86_mmx %ret
+ ret x86_mmx %ret
+}
+
+attributes #0 = { "target-cpu"="x86-64" }
Index: test/Transforms/SCCP/crash.ll
===================================================================
--- test/Transforms/SCCP/crash.ll
+++ test/Transforms/SCCP/crash.ll
@@ -27,3 +27,8 @@
%B = extractvalue [4 x i32] %A, 1
ret i32 %B
}
+
+define x86_mmx @test3() {
+ %load = load x86_mmx* null
+ ret x86_mmx %load
+}

View file

@ -1,8 +1,145 @@
---
(4.2.8p3) 2015/06/29 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 2853] Crafted remote config packet can crash some versions of
ntpd. Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn.
* [Sec 2853] Initial work on tests/sec-2853/. Harlan Stenn.
* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach.
* [Bug 2846] Report 'unsynchronized' status during the leap second.
Fixed in Martin's changes to Bug 2855. Martin Burnicki.
* [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel.
* [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel.
* README.leapsmear added. Martin Burnicki.
* README.leapsmear edited. Harlan Stenn.
* tests/libntp/msyslog.c: fixed a gcc warning. Tomasz Flendrich.
* ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn.
* html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn.
---
(4.2.8p3-RC3) 2015/06/27 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2855] Parser fix for conditional leap smear code. Harlan Stenn.
* [Bug 2855] Report leap smear in the REFID. Harlan Stenn.
* [Bug 2856] ntpd should wait() on terminated child processes. Paul Green.
* [Bug 2857] Stratus VOS does not support SIGIO. Paul Green.
* html/drivers/driver22.html: typo fix. Harlan Stenn.
* refidsmear test cleanup. Tomasz Flendrich.
* refidsmear function support and tests. Harlan Stenn.
* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested
something that was only in the 4.2.6 sntp. Harlan Stenn.
* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests.
Damir Tomić
* Modified tests/libtnp/Makefile.am so it builds Unity framework tests.
Damir Tomić
* Modified sntp/tests/Makefile.am so it builds Unity framework tests.
Damir Tomić
* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić
* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c,
atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c,
numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c,
timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c.
Damir Tomić
* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c,
networking.c, keyFile.c, utilities.cpp, sntptest.h,
fileHandlingTest.h. Damir Tomić
* Converted from gtest to Unity: sntp/tests/ caltontp.c, humandate.c,
msyslog.c, prettydate.c, recvbuff.c, sfptostr.c, tstotv.c, tvtots.c,
sntp/tests/packetProcessing.c. Tomasz Flendrich
---
(4.2.8p3-RC2) 2015/06/24 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2778] Implement "apeers" ntpq command to include associd.
* [Bug 2805] ntpd fails to join multicast group.
* [Bug 2824] Convert update-leap to perl. (also see 2769)
* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey
NTPD transfers the current TAI (instead of an announcement) now.
This might still needed improvement.
Update autokey data ASAP when 'sys_tai' changes.
Fix unit test that was broken by changes for autokey update.
Avoid potential signature length issue and use DPRINTF where possible
in ntp_crypto.c.
* [Bug 2832] refclock_jjy.c supports the TDC-300.
* [Bug 2834] Correct a broken html tag in html/refclock.html
* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more
robust, and require 2 consecutive timestamps to be consistent.
* [Bug 2837] Allow a configurable DSCP value.
* [Bug 2837] add test for DSCP to ntpd/complete.conf.in
* [Bug 2842] Glitch in ntp.conf.def documentation stanza.
* [Bug 2842] Bug in mdoc2man.
* [Bug 2843] make check fails on 4.3.36
Fixed compiler warnings about numeric range overflow
(The original topic was fixed in a byplay to bug#2830)
* [Bug 2845] Harden memory allocation in ntpd.
* [Bug 2852] 'make check' can't find unity.h. Hal Murray.
* [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida.
* [Bug 2855] Implement conditional leap smear code. Martin Burnicki.
* [Bug 2855] leap smear cleanup. Harlan Stenn.
* Initial support for experimental leap smear code. Harlan Stenn.
* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn.
* Report select() debug messages at debug level 3 now.
* sntp/scripts/genLocInfo: treat raspbian as debian.
* Unity test framework fixes.
** Requires ruby for changes to tests.
* Initial support for PACKAGE_VERSION tests.
* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS.
* tests/bug-2803/Makefile.am must distribute bug-2803.h.
* automake-1.15 cleanup for sntp/tests/fileHandlingTest.h.in . Harlan Stenn.
---
(4.2.8p3-RC1) 2015/05/12 Released by Harlan Stenn <stenn@ntp.org>
* CID 739725: Fix a rare resource leak in libevent/listener.c.
* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
* CID 1269537: Clean up a line of dead code in getShmTime().
* [Bug 2590] autogen-5.18.5.
* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
of 'limited'.
* [Bug 2650] fix includefile processing.
* [Bug 2745] ntpd -x steps clock on leap second
Fixed an initial-value problem that caused misbehaviour in absence of
any leapsecond information.
Do leap second stepping only of the step adjustment is beyond the
proper jump distance limit and step correction is allowed at all.
* [Bug 2750] build for Win64
Building for 32bit of loopback ppsapi needs def file
* [Bug 2776] Improve ntpq's 'help keytype'.
* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection.
* [Bug 2792] If the IFF_RUNNING interface flag is supported then an
interface is ignored as long as this flag is not set since the
interface is not usable (e.g., no link).
* [Bug 2794] Clean up kernel clock status reports.
* [Bug 2800] refclock_true.c true_debug() can't open debug log because
of incompatible open/fdopen parameters.
* [Bug 2804] install-local-data assumes GNU 'find' semantics.
* [Bug 2806] refclock_jjy.c supports the Telephone JJY.
* [Bug 2808] GPSD_JSON driver enhancements, step 1.
Fix crash during cleanup if GPS device not present and char device.
Increase internal token buffer to parse all JSON data, even SKY.
Defer logging of errors during driver init until the first unit is
started, so the syslog is not cluttered when the driver is not used.
Various improvements, see http://bugs.ntp.org/2808 for details.
Changed libjsmn to a more recent version.
* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX.
* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
* [Bug 2815] net-snmp before v5.4 has circular library dependencies.
* [Bug 2821] Add a missing NTP_PRINTF and a missing const.
* [Bug 2822] New leap column in sntp broke NTP::Util.pm.
* [Bug 2825] Quiet file installation in html/ .
* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey
NTPD transfers the current TAI (instead of an announcement) now.
This might still needed improvement.
* Add an assert to the ntpq ifstats code.
* Clean up the RLIMIT_STACK code.
* Improve the ntpq documentation around the controlkey keyid.
* ntpq.c cleanup.
* Windows port build cleanup.
---
(4.2.8p2) 2015/04/07 Released by Harlan Stenn <stenn@ntp.org>
(4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2763] Fix for different thresholds for forward and backward steps.
* Initial import of the Unity test framework.
---
(4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
@ -62,6 +199,7 @@
* [Sec 2781] Authentication doesn't protect symmetric associations against
DoS attacks.
* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
* [Bug 2784] Fix for 2782 uses clock_gettime() instead of get_ostime().
* [Bug 2789] Quiet compiler warnings from libevent.
* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
pause briefly before measuring system clock precision to yield

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,7 @@ EXTRA_DIST = \
NOTES.y2kfixes \
README.bk \
README.hackers \
README.leapsmear \
README.patches \
README.refclocks \
README.versions \
@ -113,10 +114,13 @@ dist-hook:
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
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)/{} ";" )
@echo "Installing stand-alone HTML documentation"
@( cd $(srcdir) && \
for i in `find html -type d | grep -v SCCS` ; \
do $(INSTALL) -d $(DESTDIR)$(htmldir)/$$i ; done )
@( cd $(srcdir) && \
for i in `find html -type f | grep -v SCCS` ; \
do $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; done )
uninstall-local:
rm -rf $(DESTDIR)$(htmldir)/html

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -15,6 +14,61 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -34,18 +88,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
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)/sntp/libopts/m4/stdnoreturn.m4 \
@ -76,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -85,42 +128,99 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
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_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
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_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-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 \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
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 dist dist-all distcheck
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/sntp/libevent/build-aux/ar-lib \
$(top_srcdir)/sntp/libevent/build-aux/compile \
$(top_srcdir)/sntp/libevent/build-aux/config.guess \
$(top_srcdir)/sntp/libevent/build-aux/config.sub \
$(top_srcdir)/sntp/libevent/build-aux/install-sh \
$(top_srcdir)/sntp/libevent/build-aux/ltmain.sh \
$(top_srcdir)/sntp/libevent/build-aux/missing ChangeLog \
INSTALL NEWS README TODO compile config.guess config.sub \
depcomp install-sh ltmain.sh missing \
sntp/libevent/build-aux/ar-lib 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
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)"; }; }
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@ -148,7 +248,10 @@ am__relativize = \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -199,6 +302,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -315,6 +419,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -444,6 +549,7 @@ EXTRA_DIST = \
NOTES.y2kfixes \
README.bk \
README.hackers \
README.leapsmear \
README.patches \
README.refclocks \
README.versions \
@ -488,7 +594,7 @@ all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
@ -503,7 +609,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
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*) \
@ -524,10 +629,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@ -550,22 +653,25 @@ distclean-libtool:
-rm -f libtool config.lt
# 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; \
# 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.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@ -580,57 +686,12 @@ $(RECURSIVE_TARGETS):
$(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: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@ -646,12 +707,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -663,15 +719,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -680,9 +732,31 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@ -718,13 +792,10 @@ distdir: $(DISTFILES)
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 \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@ -756,36 +827,42 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
$(am__post_remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_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
@ -796,8 +873,8 @@ distcheck: dist
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.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@ -807,17 +884,19 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_build/sub $(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" \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@ -840,13 +919,21 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
$(am__post_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 \
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@ -879,10 +966,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -967,26 +1059,27 @@ ps-am:
uninstall-am: uninstall-local
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
tags-recursive
.MAKE: $(am__recursive_targets) all check install install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool 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-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-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
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
dist-tarZ dist-xz 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-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-am uninstall uninstall-am uninstall-local
.PRECIOUS: Makefile
.gcc-warning:
@ -1032,10 +1125,13 @@ dist-hook:
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
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)/{} ";" )
@echo "Installing stand-alone HTML documentation"
@( cd $(srcdir) && \
for i in `find html -type d | grep -v SCCS` ; \
do $(INSTALL) -d $(DESTDIR)$(htmldir)/$$i ; done )
@( cd $(srcdir) && \
for i in `find html -type f | grep -v SCCS` ; \
do $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; done )
uninstall-local:
rm -rf $(DESTDIR)$(htmldir)/html

View file

@ -1,5 +1,154 @@
---
NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/xx)
NTP 4.2.8p3 (Harlan Stenn <stenn@ntp.org>, 2015/06/29)
Focus: 1 Security fix. Bug fixes and enhancements. Leap-second improvements.
Severity: MEDIUM
Security Fix:
* [Sec 2853] Crafted remote config packet can crash some versions of
ntpd. Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn.
Under specific circumstances an attacker can send a crafted packet to
cause a vulnerable ntpd instance to crash. This requires each of the
following to be true:
1) ntpd set up to allow remote configuration (not allowed by default), and
2) knowledge of the configuration password, and
3) access to a computer entrusted to perform remote configuration.
This vulnerability is considered low-risk.
New features in this release:
Optional (disabled by default) support to have ntpd provide smeared
leap second time. A specially built and configured ntpd will only
offer smeared time in response to client packets. These response
packets will also contain a "refid" of 254.a.b.c, where the 24 bits
of a, b, and c encode the amount of smear in a 2:22 integer:fraction
format. See README.leapsmear and http://bugs.ntp.org/2855 for more
information.
*IF YOU CHOOSE TO CONFIGURE NTPD TO PROVIDE LEAP SMEAR TIME*
*BE SURE YOU DO NOT OFFER THAT TIME ON PUBLIC TIMESERVERS.*
We've imported the Unity test framework, and have begun converting
the existing google-test items to this new framework. If you want
to write new tests or change old ones, you'll need to have ruby
installed. You don't need ruby to run the test suite.
Bug Fixes and Improvements:
* CID 739725: Fix a rare resource leak in libevent/listener.c.
* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776.
* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html
* CID 1269537: Clean up a line of dead code in getShmTime().
* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach.
* [Bug 2590] autogen-5.18.5.
* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because
of 'limited'.
* [Bug 2650] fix includefile processing.
* [Bug 2745] ntpd -x steps clock on leap second
Fixed an initial-value problem that caused misbehaviour in absence of
any leapsecond information.
Do leap second stepping only of the step adjustment is beyond the
proper jump distance limit and step correction is allowed at all.
* [Bug 2750] build for Win64
Building for 32bit of loopback ppsapi needs def file
* [Bug 2776] Improve ntpq's 'help keytype'.
* [Bug 2778] Implement "apeers" ntpq command to include associd.
* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection.
* [Bug 2792] If the IFF_RUNNING interface flag is supported then an
interface is ignored as long as this flag is not set since the
interface is not usable (e.g., no link).
* [Bug 2794] Clean up kernel clock status reports.
* [Bug 2800] refclock_true.c true_debug() can't open debug log because
of incompatible open/fdopen parameters.
* [Bug 2804] install-local-data assumes GNU 'find' semantics.
* [Bug 2805] ntpd fails to join multicast group.
* [Bug 2806] refclock_jjy.c supports the Telephone JJY.
* [Bug 2808] GPSD_JSON driver enhancements, step 1.
Fix crash during cleanup if GPS device not present and char device.
Increase internal token buffer to parse all JSON data, even SKY.
Defer logging of errors during driver init until the first unit is
started, so the syslog is not cluttered when the driver is not used.
Various improvements, see http://bugs.ntp.org/2808 for details.
Changed libjsmn to a more recent version.
* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX.
* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
* [Bug 2815] net-snmp before v5.4 has circular library dependencies.
* [Bug 2821] Add a missing NTP_PRINTF and a missing const.
* [Bug 2822] New leap column in sntp broke NTP::Util.pm.
* [Bug 2824] Convert update-leap to perl. (also see 2769)
* [Bug 2825] Quiet file installation in html/ .
* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey
NTPD transfers the current TAI (instead of an announcement) now.
This might still needed improvement.
Update autokey data ASAP when 'sys_tai' changes.
Fix unit test that was broken by changes for autokey update.
Avoid potential signature length issue and use DPRINTF where possible
in ntp_crypto.c.
* [Bug 2832] refclock_jjy.c supports the TDC-300.
* [Bug 2834] Correct a broken html tag in html/refclock.html
* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more
robust, and require 2 consecutive timestamps to be consistent.
* [Bug 2837] Allow a configurable DSCP value.
* [Bug 2837] add test for DSCP to ntpd/complete.conf.in
* [Bug 2842] Glitch in ntp.conf.def documentation stanza.
* [Bug 2842] Bug in mdoc2man.
* [Bug 2843] make check fails on 4.3.36
Fixed compiler warnings about numeric range overflow
(The original topic was fixed in a byplay to bug#2830)
* [Bug 2845] Harden memory allocation in ntpd.
* [Bug 2852] 'make check' can't find unity.h. Hal Murray.
* [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida.
* [Bug 2855] Parser fix for conditional leap smear code. Harlan Stenn.
* [Bug 2855] Report leap smear in the REFID. Harlan Stenn.
* [Bug 2855] Implement conditional leap smear code. Martin Burnicki.
* [Bug 2856] ntpd should wait() on terminated child processes. Paul Green.
* [Bug 2857] Stratus VOS does not support SIGIO. Paul Green.
* [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel.
* [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel.
* html/drivers/driver22.html: typo fix. Harlan Stenn.
* refidsmear test cleanup. Tomasz Flendrich.
* refidsmear function support and tests. Harlan Stenn.
* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested
something that was only in the 4.2.6 sntp. Harlan Stenn.
* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests.
Damir Tomić
* Modified tests/libtnp/Makefile.am so it builds Unity framework tests.
Damir Tomić
* Modified sntp/tests/Makefile.am so it builds Unity framework tests.
Damir Tomić
* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić
* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c,
atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c,
numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c,
timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c.
Damir Tomić
* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c,
networking.c, keyFile.c, utilities.cpp, sntptest.h,
fileHandlingTest.h. Damir Tomić
* Initial support for experimental leap smear code. Harlan Stenn.
* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn.
* Report select() debug messages at debug level 3 now.
* sntp/scripts/genLocInfo: treat raspbian as debian.
* Unity test framework fixes.
** Requires ruby for changes to tests.
* Initial support for PACKAGE_VERSION tests.
* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS.
* tests/bug-2803/Makefile.am must distribute bug-2803.h.
* Add an assert to the ntpq ifstats code.
* Clean up the RLIMIT_STACK code.
* Improve the ntpq documentation around the controlkey keyid.
* ntpq.c cleanup.
* Windows port build cleanup.
---
NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/07)
Focus: Security and Bug fixes, enhancements.

View file

@ -0,0 +1,272 @@
Leap Second Smearing with NTP
-----------------------------
By Martin Burnicki
with some edits by Harlan Stenn
The NTP software protocol and its reference implementation, ntpd, were
originally designed to distribute UTC time over a network as accurately as
possible.
Unfortunately, leap seconds are scheduled to be inserted into or deleted
from the UTC time scale in irregular intervals to keep the UTC time scale
synchronized with the Earth rotation. Deletions haven't happened, yet, but
insertions have happened over 30 times.
The problem is that POSIX requires 86400 seconds in a day, and there is no
prescribed way to handle leap seconds in POSIX.
Whenever a leap second is to be handled ntpd either:
- passes the leap second announcement down to the OS kernel (if the OS
supports this) and the kernel handles the leap second automatically, or
- applies the leap second correction itself.
NTP servers also pass a leap second warning flag down to their clients via
the normal NTP packet exchange, so clients also become aware of an
approaching leap second, and can handle the leap second appropriately.
The Problem on Unix-like Systems
--------------------------------
If a leap second is to be inserted then in most Unix-like systems the OS
kernel just steps the time back by 1 second at the beginning of the leap
second, so the last second of the UTC day is repeated and thus duplicate
timestamps can occur.
Unfortunately there are lots of applications which get confused it the
system time is stepped back, e.g. due to a leap second insertion. Thus,
many users have been looking for ways to avoid this, and tried to introduce
workarounds which may work properly, or not.
So even though these Unix kernels normally can handle leap seconds, the way
they do this is not optimal for applications.
One good way to handle the leap second is to use ntp_gettime() instead of
the usual calls, because ntp_gettime() includes a "clock state" variable
that will actually tell you if the time you are receiving is OK or not, and
if it is OK, if the current second is an in-progress leap second. But even
though this mechanism has been available for about 20 years' time, almost
nobody uses it.
NTP Client for Windows Contains a Workaround
--------------------------------------------
The Windows system time knows nothing about leap seconds, so for many years
the Windows port of ntpd provides a workaround where the system time is
slewed by the client to compensate the leap second.
Thus it is not required to use a smearing NTP server for Windows clients,
but of course the smearing server approach also works.
The Leap Smear Approach
-----------------------
Due to the reasons mentioned above some support for leap smearing has
recently been implemented in ntpd. This means that to insert a leap second
an NTP server adds a certain increasing "smear" offset to the real UTC time
sent to its clients, so that after some predefined interval the leap second
offset is compensated. The smear interval should be long enough,
e.g. several hours, so that NTP clients can easily follow the clock drift
caused by the smeared time.
During the period while the leap smear is being performed, ntpd will include
a specially-formatted 'refid' in time packets that contain "smeared" time.
This refid is of the form 254.x.y.z, where x.y.z are 24 encoded bits of the
smear value.
With this approach the time an NTP server sends to its clients still matches
UTC before the leap second, up to the beginning of the smear interval, and
again corresponds to UTC after the insertion of the leap second has
finished, at the end of the smear interval. By examining the first byte of
the refid, one can also determine if the server is offering smeared time or
not.
Of course, clients which receive the "smeared" time from an NTP server don't
have to (and even must not) care about the leap second anymore. Smearing is
just transparent to the clients, and the clients don't even notice there's a
leap second.
Pros and Cons of the Smearing Approach
--------------------------------------
The disadvantages of this approach are:
- During the smear interval the time provided by smearing NTP servers
differs significantly from UTC, and thus from the time provided by normal,
non-smearing NTP servers. The difference can be up to 1 second, depending
on the smear algorithm.
- Since smeared time differs from true UTC, and many applications require
correct legal time (UTC), there may be legal consequences to using smeared
time. Make sure you check to see if this requirement affects you.
However, for applications where it's only important that all computers have
the same time and a temporary offset of up to 1 s to UTC is acceptable, a
better approach may be to slew the time in a well defined way, over a
certain interval, which is what we call smearing the leap second.
The Motivation to Implement Leap Smearing
-----------------------------------------
Here is some historical background for ntpd, related to smearing/slewing
time.
Up to ntpd 4.2.4, if kernel support for leap seconds was either not
available or was not enabled, ntpd didn't care about the leap second at all.
So if ntpd was run with -x and thus kernel support wasn't used, ntpd saw a
sudden 1 s offset after the leap second and normally would have stepped the
time by -1 s a few minutes later. However, 'ntpd -x' does not step the time
but "slews" the 1-second correction, which takes 33 minutes and 20 seconds
to complete. This could be considered a bug, but certainly this was only an
accidental behavior.
However, as we learned in the discussion in http://bugs.ntp.org/2745, this
behavior was very much appreciated since indeed the time was never stepped
back, and even though the start of the slewing was somewhat undefined and
depended on the poll interval. The system time was off by 1 second for
several minutes before slewing even started.
In ntpd 4.2.6 some code was added which let ntpd step the time at UTC
midnight to insert a leap second, if kernel support was not used.
Unfortunately this also happened if ntpd was started with -x, so the folks
who expected that the time was never stepped when ntpd was run with -x found
this wasn't true anymore, and again from the discussion in NTP bug 2745 we
learn that there were even some folks who patched ntpd to get the 4.2.4
behavior back.
In 4.2.8 the leap second code was rewritten and some enhancements were
introduced, but the resulting code still showed the behavior of 4.2.6,
i.e. ntpd with -x would still step the time. This has only recently been
fixed in the current ntpd stable code, but this fix is only available with a
certain patch level of ntpd 4.2.8.
So a possible solution for users who were looking for a way to come over the
leap second without the time being stepped could have been to check the
version of ntpd installed on each of their systems. If it's still 4.2.4 be
sure to start the client ntpd with -x. If it's 4.2.6 or 4.2.8 it won't work
anyway except if you had a patched ntpd version instead of the original
version. So you'd need to upgrade to the current -stable code to be able to
run ntpd with -x and get the desired result, so you'd still have the
requirement to check/update/configure every single machine in your network
that runs ntpd.
Google's leap smear approach is a very efficient solution for this, for
sites that do not require correct timestamps for legal purposes. You just
have to take care that your NTP servers support leap smearing and configure
those few servers accordingly. If the smear interval is long enough so that
NTP clients can follow the smeared time it doesn't matter at all which
version of ntpd is installed on a client machine, it just works, and it even
works around kernel bugs due to the leap second.
Since all clients follow the same smeared time the time difference between
the clients during the smear interval is as small as possible, compared to
the -x approach. The current leap second code in ntpd determines the point
in system time when the leap second is to be inserted, and given a
particular smear interval it's easy to determine the start point of the
smearing, and the smearing is finished when the leap second ends, i.e. the
next UTC day begins.
The maximum error doesn't exceed what you'd get with the old smearing caused
by -x in ntpd 4.2.4, so if users could accept the old behavior they would
even accept the smearing at the server side.
In order to affect the local timekeeping as little as possible the leap
smear support currently implemented in ntpd does not affect the internal
system time at all. Only the timestamps and refid in outgoing reply packets
*to clients* are modified by the smear offset, so this makes sure the basic
functionality of ntpd is not accidentally broken. Also peer packets
exchanged with other NTP servers are based on the real UTC system time and
the normal refid, as usual.
The leap smear implementation is optionally available in ntp-4.2.8p3 and
later, and the changes can be tracked via http://bugs.ntp.org/2855.
Using NTP's Leap Second Smearing
--------------------------------
- Leap Second Smearing MUST NOT be used for public servers, e.g. servers
provided by metrology institutes, or servers participating in the NTP pool
project. There would be a high risk that NTP clients get the time from a
mixture of smearing and non-smearing NTP servers which could result in
undefined client behavior. Instead, leap second smearing should only be
configured on time servers providing dedicated clients with time, if all
those clients can accept smeared time.
- Leap Second Smearing is NOT configured by default. The only way to get
this behavior is to invoke the ./configure script from the NTP source code
package with the --enable-leap-smear parameter before the executables are
built.
- Even if ntpd has been compiled to enable leap smearing support, leap
smearing is only done if explicitly configured.
- The leap smear interval should be at least several hours' long, and up to
1 day (86400s). If the interval is too short then the applied smear offset
is applied too quickly for clients to follow. 86400s (1 day) is a good
choice.
- If several NTP servers are set up for leap smearing then the *same* smear
interval should be configured on each server.
- Smearing NTP servers DO NOT send a leap second warning flag to client time
requests. Since the leap second is applied gradually the clients don't even
notice there's a leap second being inserted, and thus there will be no log
message or similar related to the leap second be visible on the clients.
- Since clients don't (and must not) become aware of the leap second at all,
clients getting the time from a smearing NTP server MUST NOT be configured
to use a leap second file. If they had a leap second file they would apply
the leap second twice: the smeared one from the server, plus another one
inserted by themselves due to the leap second file. As a result, the
additional correction would soon be detected and corrected/adjusted.
- Clients MUST NOT be configured to poll both smearing and non-smearing NTP
servers at the same time. During the smear interval they would get
different times from different servers and wouldn't know which server(s) to
accept.
Setting Up A Smearing NTP Server
--------------------------------
If an NTP server should perform leap smearing then the leap smear interval
(in seconds) needs to be specified in the NTP configuration file ntp.conf,
e.g.:
leapsmearinterval 86400
Please keep in mind the leap smear interval should be between several and 24
hours' long. With shorter values clients may not be able to follow the
drift caused by the smeared time, and with longer values the discrepancy
between system time and UTC will cause more problems when reconciling
timestamp differences.
When ntpd starts and a smear interval has been specified then a log message
is generated, e.g.:
ntpd[31120]: config: leap smear interval 86400 s
While ntpd is running with a leap smear interval specified the command:
ntpq -c rv
reports the smear status, e.g.:
# ntpq -c rv
associd=0 status=4419 leap_add_sec, sync_uhf_radio, 1 event, leap_armed,
version="ntpd 4.2.8p3-RC1@1.3349-o Mon Jun 22 14:24:09 UTC 2015 (26)",
processor="i586", system="Linux/3.7.1", leap=01, stratum=1,
precision=-18, rootdelay=0.000, rootdisp=1.075, refid=MRS,
reftime=d93dab96.09666671 Tue, Jun 30 2015 23:58:14.036,
clock=d93dab9b.3386a8d5 Tue, Jun 30 2015 23:58:19.201, peer=2335,
tc=3, mintc=3, offset=-0.097015, frequency=44.627, sys_jitter=0.003815,
clk_jitter=0.451, clk_wander=0.035, tai=35, leapsec=201507010000,
expire=201512280000, leapsmearinterval=86400, leapsmearoffset=-932.087
In the example above 'leapsmearinterval' reports the configured leap smear
interval all the time, while the 'leapsmearoffset' value is 0 outside the
interval and increases from 0 to -1000 ms over the interval. So this can be
used to monitor if and how the time sent to clients is smeared. With a
leapsmearoffset of -.932087, the refid reported in smeared packets would be
254.196.88.176.

796
contrib/ntp/aclocal.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -20,6 +19,61 @@
# subdir to warn folks if there is another version there.
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -42,9 +96,6 @@ 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)/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 \
@ -76,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -85,6 +137,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@ -98,9 +151,22 @@ adjtimed_LDADD = $(LDADD)
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 = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
@ -111,26 +177,48 @@ 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 = @
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
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 " $@;
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = adjtimed.c
DIST_SOURCES = adjtimed.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/check-libntp.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -181,6 +269,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -297,6 +386,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -418,7 +508,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_sr
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign adjtimed/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign adjtimed/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -427,6 +516,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@ -438,14 +528,19 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
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; \
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|.*|.|' \
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 } \
@ -466,7 +561,8 @@ uninstall-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
@ -481,14 +577,19 @@ clean-binPROGRAMS:
rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
fi; \
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; \
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|.*|.|' \
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 } \
@ -509,7 +610,8 @@ uninstall-libexecPROGRAMS:
@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)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
@ -524,14 +626,19 @@ clean-libexecPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
fi; \
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; \
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|.*|.|' \
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 } \
@ -552,7 +659,8 @@ uninstall-sbinPROGRAMS:
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
@ -565,7 +673,8 @@ clean-sbinPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
adjtimed$(EXEEXT): $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES)
adjtimed$(EXEEXT): $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES) $(EXTRA_adjtimed_DEPENDENCIES)
@rm -f adjtimed$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
@ -580,26 +689,23 @@ distclean-compile:
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@ -607,26 +713,15 @@ mostlyclean-libtool:
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
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -638,15 +733,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -655,6 +746,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -708,10 +814,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -801,22 +912,25 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
.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-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 \
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
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 \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS
.PRECIOUS: Makefile
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \

View file

@ -50,6 +50,7 @@ AUTORECONF=${AUTORECONF:-autoreconf}
# ;;
# esac
## Old way
# 20060629: HMS: Let's try checking in libopts and the autogen-generated files
## The copy for ntp...
#rm -rf libopts*
@ -64,22 +65,34 @@ AUTORECONF=${AUTORECONF:-autoreconf}
# tar -xvf -
# mv libopts-*.*.* libopts )
def_files=`find [B-Za-z]* -type f -name '*.def' -print | fgrep -v /SCCS/`
prog_opt_files=`grep -l '^prog.name' $def_files`
## EOOld way
## Unity test runners
# the ruby generator must be older than the test files.
# the test files must be older than the runner files.
runner_files=`find [B-Za-z]* -type f -name 'run-*' -print | fgrep -v /SCCS/`
l=
lt=
lr=
for f in ${runner_files}
do
fb=`echo $f | sed -e 's/run-//'`
lt="$lt $fb"
lr="$lr $f" # Yes, lr and runner_files are eventually the same
done
touch $lt
echo "Touching <$lt>"
sleep 1
touch $lr
echo "Touching <$lr>"
## EOUnity test runners
## AutoGen stuff
#incdir=${PWD}/include
#for f in ${prog_opt_files}
#do
# ( cd $(dirname ${f})
# echo "Running autogen on $f..."
# autogen -L${incdir} $(basename ${f})
# ) || exit 1
#done
## Non-AutoGen stuff
def_files=`find [B-Za-z]* -type f -name '*.def' -print | fgrep -v /SCCS/`
prog_opt_files=`grep -l '^prog.name' $def_files`
# touch the stuff generated by the opt files
@ -129,6 +142,8 @@ esac
## EOAutoGen stuff
## Yacc/bison files
# Yacc/bison files ntp_parser.[ch] so we don't require the tool if
# ntp_parser.y hasn't been updated. At the same time, keyword-gen-utd
# and ntp_keyword.h which are derived from ntp_parser.h and
@ -136,6 +151,8 @@ esac
touch ntpd/ntp_parser.[ch] ntpd/keyword-gen-utd ntpd/ntp_keyword.h
## EOYacc/bison files
cp bincheck.mf sntp/
cp depsver.mf sntp/

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -16,6 +15,61 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -35,9 +89,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(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 \
@ -69,6 +120,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -78,6 +130,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@ -89,14 +142,27 @@ 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 = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
propdelay_SOURCES = propdelay.c
propdelay_OBJECTS = propdelay.$(OBJEXT)
am__DEPENDENCIES_2 = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
propdelay_DEPENDENCIES = $(am__DEPENDENCIES_2)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
@ -107,26 +173,47 @@ 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 = @
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
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 " $@;
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = chutest.c propdelay.c
DIST_SOURCES = chutest.c propdelay.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
$(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -177,6 +264,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -293,6 +381,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -416,7 +505,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign clockstuff/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign clockstuff/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -425,6 +513,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@ -443,10 +532,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)
chutest$(EXEEXT): $(chutest_OBJECTS) $(chutest_DEPENDENCIES) $(EXTRA_chutest_DEPENDENCIES)
@rm -f chutest$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(chutest_OBJECTS) $(chutest_LDADD) $(LIBS)
propdelay$(EXEEXT): $(propdelay_OBJECTS) $(propdelay_DEPENDENCIES)
propdelay$(EXEEXT): $(propdelay_OBJECTS) $(propdelay_DEPENDENCIES) $(EXTRA_propdelay_DEPENDENCIES)
@rm -f propdelay$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
@ -462,26 +553,23 @@ distclean-compile:
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@ -489,26 +577,15 @@ mostlyclean-libtool:
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
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -520,15 +597,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -537,6 +610,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -587,10 +675,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -677,18 +770,21 @@ uninstall-am:
.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS 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
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
ctags-am 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 tags-am uninstall uninstall-am
.PRECIOUS: Makefile
check-libntp: ../libntp/libntp.a

View file

@ -333,6 +333,9 @@
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
/* Define to 1 if you have the `atomic_thread_fence' function. */
#undef HAVE_ATOMIC_THREAD_FENCE
/* Do we have audio support? */
#undef HAVE_AUDIO
@ -386,6 +389,9 @@
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if you have the `EVP_MD_do_all_sorted' function. */
#undef HAVE_EVP_MD_DO_ALL_SORTED
/* Define to 1 if you have the `fchmod' function. */
#undef HAVE_FCHMOD
@ -821,6 +827,9 @@
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define to 1 if you have the <stdatomic.h> header file. */
#undef HAVE_STDATOMIC_H
/* Define to 1 if you have the <stdbool.h> header file. */
#undef HAVE_STDBOOL_H
@ -1315,6 +1324,9 @@
/* define to 1 if library is thread safe */
#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
/* leap smear mechanism */
#undef LEAP_SMEAR
/* Define to any value to include libseccomp sandboxing. */
#undef LIBSECCOMP
@ -1473,8 +1485,8 @@
/* Do we want the SCO clock hacks? */
#undef SCO5_CLOCK
/* The size of `char*', as computed by sizeof. */
#undef SIZEOF_CHARP
/* The size of `char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT

1534
contrib/ntp/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -65,6 +65,7 @@ ntp_jupiter_ok=${ntp_jupiter_ok=no}
NTP_PROG_CC
AC_PROG_CPP
# Do we need CXX for anything besides google test?
AC_PROG_CXX
AC_PROG_YACC
AC_PROG_CC_C_O
@ -180,6 +181,15 @@ case "$PROG_NET_SNMP_CONFIG" in
esac
AC_MSG_RESULT([$PATH_NET_SNMP_CONFIG])
case "$PATH_NET_SNMP_CONFIG" in
/*) AC_CACHE_CHECK(
[for net-snmp version],
[ntp_cv_net_snmp_version],
[ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`]
)
;;
esac
case "$host" in
*-*-vxworks*)
ac_link="$ac_link $VX_KERNEL"
@ -291,7 +301,7 @@ AC_CHECK_HEADER(
AC_CHECK_HEADERS([fcntl.h fnmatch.h ieeefp.h inttypes.h kvm.h math.h])
AC_CHECK_HEADERS([memory.h netdb.h poll.h])
AC_CHECK_HEADERS([sgtty.h stdlib.h string.h termio.h])
AC_CHECK_HEADERS([sgtty.h stdatomic.h stdlib.h string.h termio.h])
AC_CHECK_HEADERS([termios.h timepps.h timex.h unistd.h])
case "$host" in
@ -375,6 +385,28 @@ case "$host" in
;;
esac
case "$ac_cv_header_stdatomic_h" in
yes)
AC_CHECK_FUNCS([atomic_thread_fence])
AC_CACHE_CHECK(
[for atomic_thread_fence()],
[ntp_cv_func_atomic_thread_fence],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <stdatomic.h>
]],
[[
atomic_thread_fence(memory_order_seq_cst);
]]
)]
[ntp_cv_func_atomic_thread_fence=yes],
[ntp_cv_func_atomic_thread_fence=no]
)]
)
;;
esac
case "$host" in
*-*-solaris2.6)
# Broken...
@ -3426,6 +3458,9 @@ AC_CACHE_CHECK(
*-sni-sysv*)
ans=dosynctodr
;;
*-stratus-vos)
ans=no
;;
*-*-aix*)
ans=dosynctodr
;;
@ -3480,6 +3515,9 @@ AC_CACHE_CHECK(
*-sni-sysv*)
ans=noprintf
;;
*-stratus-vos)
ans=no
;;
*-*-aix*)
ans=noprintf
;;
@ -3873,6 +3911,11 @@ case "$ans" in
case "$PATH_NET_SNMP_CONFIG" in
/*)
SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs`
# Bug 2815. This is a bit of a hack, but it works...
case "$ntp_cv_net_snmp_version" in
5.3*) SNMP_LIBS=`echo $SNMP_LIBS | $SED -e 's/-lnetsnmpagent/-lnetsnmpagent -lnetsnmpmibs/'`
;;
esac
AC_SUBST([SNMP_LIBS])
# HMS: we really want to separate CPPFLAGS and CFLAGS
foo=`$PATH_NET_SNMP_CONFIG --cflags`
@ -3986,6 +4029,9 @@ case "$host" in
*-sni-sysv*)
ans=yes
;;
*-stratus-vos)
ans=no
;;
*-univel-sysv*)
ans=no
;;
@ -4306,6 +4352,31 @@ esac
AM_CONDITIONAL([SAVECONFIG_ENABLED], [test x$ntp_saveconfig_enabled = x1])
AC_MSG_RESULT([$ntp_ok])
###
AC_MSG_CHECKING([if we want the experimental leap smear code])
AC_ARG_ENABLE(
[leap-smear],
[AS_HELP_STRING(
[--enable-leap-smear],
[- experimental leap smear code]
)],
[ntp_ok=$enableval],
[ntp_ok=no]
)
ntp_leap_smear_enabled=0
case "$ntp_ok" in
yes)
ntp_leap_smear_enabled=1
AC_DEFINE([LEAP_SMEAR], [1], [leap smear mechanism])
AC_SUBST([HAVE_LEAPSMEARINTERVAL])
HAVE_LEAPSMEARINTERVAL="leapsmearinterval 0"
;;
esac
AC_MSG_RESULT([$ntp_ok])
NTP_UNITYBUILD
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.
@ -4326,7 +4397,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([ntpd/complete.conf], [sed -e '/^rlimit$/d' -e '/^$/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])
@ -4349,9 +4420,13 @@ 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/update-leap/Makefile])
AC_CONFIG_FILES([scripts/update-leap/update-leap], [chmod +x scripts/update-leap/update-leap])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/bug-2803/Makefile])
AC_CONFIG_FILES([tests/libntp/Makefile])
AC_CONFIG_FILES([tests/ntpd/Makefile])
AC_CONFIG_FILES([tests/sandbox/Makefile])
AC_CONFIG_FILES([tests/sec-2853/Makefile])
AC_CONFIG_FILES([util/Makefile])
perllibdir="${datadir}/ntp/lib"

View file

@ -80,7 +80,7 @@
<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>
<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>

View file

@ -0,0 +1,534 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>JJY Receivers</title>
<link rev="made" href="http://www.bea.hi-ho.ne.jp/abetakao/">
<link rel="start" href="http://www.eecis.udel.edu/~mills/ntp/html/refclock.html">
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>JJY Receivers</h3>
<p>Last update:
<!-- #BeginDate format:En2m -->15-May-2015 00:00<!-- #EndDate -->
UTC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="driver40.html">ENGLISH英語</a> &nbsp; <a href="driver40-ja.html">JAPANESE日本語</a></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>; それぞれのJJY受信機、GPS時計、テレフォンJJYを参照して下さい。
<h4>Description</h4>
<p>このドライバーは、以下の、日本で販売されている JJY受信機、GPS時計と、電話回線による時刻配信サービスをサポートしています。
</p>
<table width="100%">
<tr>
<td width="50%" style="vertical-align:top;">
<a href="#mode-1">トライステート &nbsp; TS-JJY01, TS-JJY02</a><br>
<a href="#mode-2">シーデックス &nbsp; JST2000</a><br>
<a href="#mode-3">エコー計測器 &nbsp; LT-2000</a><br>
<a href="#mode-4">シチズンTIC &nbsp; JJY-200</a><br>
<a href="#mode-5">トライステート &nbsp; TS-GPSclock-01</a><br>
</td>
<td width="50%" style="vertical-align:top; border-left:solid; padding:0px 0px 0px 10px;">
<a href="#mode-6">セイコー タイム システム &nbsp; TDC-300</a><br>
<a href="#mode-100">テレフォンJJY</a><br>
</td>
</tr>
</table>
<ul>
<li>
<p><a name="mode-1">トライステート &nbsp; TS-JJY01, TS-JJY02</a> &nbsp; <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (日本語)</p><br>
<dl>
<dt>NTPの設定 ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 1</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN &nbsp; flag1 0|1</dt>
<dd>
<p>Time1 は、受信機からの時刻に加算する調整時間を、固定小数点形式の秒で設定します。<br>
この受信機には、数10ミリ秒 ( 0.0NN秒 ) から百数10ミリ秒 ( 0.1NN秒 ) の調整時間を設定すると良いでしょう。</p>
<p>Flag1 は、時刻同期には無関係です。Flag1 を 1 に設定すると、状態を問い合わせるコマンドを DATE コマンドと STIM コマンドの前に発行して、応答を clockstats ファイルに記録します。</p>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>DCST と STUS コマンドは、発行しません。</td></tr>
<tr><td>1</td><td>DCST と STUS コマンドを、発行します。</td></tr>
</table>
</dd>
</dl>
<br>
</dd>
<dt>インターフェース</dt>
<dd>
<p>RS-232C, 9600 BPS, 8ビット, パリティなし, 1ストップ・ビット</p>
<br>
</dd>
<dt>日時データの形式</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td><code>dcst{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>valid{CR}{LF} | invalid{CR}{LF}</code></td>
</tr>
<tr>
<td><code>stus{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>adjusted{CR}{LF} | unadjusted{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>
<tr>
<td><code>date{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>YYYY/MM/DD WWW{CR}{LF}</code></td>
</tr>
<tr>
<td><code>stim{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<p>日付と時刻は、別々に問い合わせます。日付が深夜0時の前か後かの不確定をチェックするため、日付の問い合わせの前後に時刻を問い合わせています。</p><br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-2">シーデックス &nbsp; JST2000</a> &nbsp; <a href="http://www.c-dex.co.jp/">http://www.c-dex.co.jp/</a> (日本語)</p><br>
<dl>
<dt>NTPの設定 ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 2</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>インターフェース</dt>
<dd>
<p>RS-232C, 9600 BPS, 8ビット, パリティなし, 1ストップ・ビット</p>
<br>
</dd>
<dt>日時データの形式</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td><code>{ENQ}1J{ETX}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>{STX}JYYMMDD HHMMSSS{ETX}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-3">エコー計測器 &nbsp; LT-2000</a> &nbsp; <a href="http://www.clock.co.jp/">http://www.clock.co.jp/</a> (日本語)</p><br>
<dl>
<dt>NTPの設定 ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 3</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 BPS, 8ビット, パリティなし, 1ストップ・ビット</p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td><code>C</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>( Mode 2 : Continuous )</td>
</tr>
<tr>
<td>( Every second before 0.5 second )</td>
<td></td>
<td><code>YYMMDDWHHMMSS{ST1}{ST2}{ST3}{ST4}{CR}</code></td>
</tr>
<tr>
<td><code>#</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>( Mode 1 : Request&amp;Send )</td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-4">シチズンTIC &nbsp; JJY-200</a> &nbsp; <a href="http://www.tic-citizen.co.jp/">http://www.tic-citizen.co.jp/</a> (日本語)</p><br>
<dl>
<dt>NTPの設定 ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 4</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>インターフェース</dt>
<dd>
<p>RS-232C, 4800 BPS, 8ビット, パリティなし, 1ストップ・ビット</p>
<br>
</dd>
<dt>日時データの形式</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td>( Every second )</td>
<td></td>
<td><code>'XX YY/MM/DD W HH:MM:SS{CR}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-5">トライステート &nbsp; TS-GPSclock-01</a> &nbsp; <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (日本語)</p>
<p>このドライバーは、JJY受信機ではないGPS時計のトライステート TS-GPSclock-01 のコマンド・レスポンス・モードをサポートします。<br>
TS-GPSclock-01 は、オンボードのスイッチとメニューでコマンド・レスポンス・モードとタイム・ゾーンをJST日本標準時に設定しなければなりまん。<br>
この Type 40 のドライバーの他, TS-GPSclock-01 のNMEAモードは、<a href="driver20.html">一般 NMEA GPS ドライバー ( Type 20 )</a> でも利用することができます。</p>
<dl>
<dt>NTPの設定 ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 5</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN &nbsp; flag1 0|1</dt>
<dd>
<p>Time1 は、受信機からの時刻に加算する調整時間を、固定小数点形式の秒で設定します</p>
<p>Flag1 は、時刻同期には無関係です。Flag1 を 1 に設定すると、状態を問い合わせるコマンドを DATE コマンドと STIM コマンドの前に発行して、応答を clockstats ファイルに記録します。</p>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>STUS コマンドは、発行しません。</td></tr>
<tr><td>1</td><td>STUS コマンドを、発行します。</td></tr>
</table>
</dd>
</dl>
<br>
</dd>
<dt>インターフェース</dt>
<dd>
<p>USB ( /dev/ttyACM<em>0</em> )</p>
<br>
</dd>
<dt>日時データの形式</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td><code>stus{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>*R{CR}{LF} | *G{CR}{LF} | *U{CR}{LF} | +U{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>
<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>
<p>日付と時刻は、別々に問い合わせます。日付が深夜0時の前か後かの不確定をチェックするため、日付の問い合わせの前後に時刻を問い合わせています。</p><br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-6">セイコー タイム システム &nbsp; TDC-300</a> &nbsp; <a href="http://www.seiko-sts.co.jp/">http://www.seiko-sts.co.jp/</a> (英語と日本語)</p><br>
<p>TDC-300 は、フロント・パネルのメニュー表示とスイッチで type 3 のデータ形式に設定しなければなりません。</p>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 6</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>インターフェース</dt>
<dd>
<p>RS-232C, 2400 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>日時データの形式</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td></td>
<td></td>
<td><code>{STX}YYMMDDWHHMMSS{ETX}</code></td>
</tr>
<tr>
<td>( 5 to 10 mSec. before second )</td>
<td></td>
<td><code>{STX}{xE5}{ETX}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-100">テレフォンJJY</a> &nbsp; <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> (英語と日本語)</p>
<p>テレフォンJJYは、電話回線による時刻配信サービスです。<br>
このサービスは、国立研究開発法人 情報通信研究機構が提供しています。</p>
<p>注意 このモードテレフォンJJYは、refclock_acts ( Type 18 ) のドライバーと同時に利用することはできません。
設定ファイルの phone は、server と関係付けられていないため、ドライバーの refclock_acts ( type 18 ) も、この refclock_jjy ( type 40, mode 100 to 180 ) のいずれも、
複数の phone のうち、どれが自分に関係するものか識別できないからです。</p>
<dl>
<dt>NTPの設定 ( ntp.conf )</dt>
<dd>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode (100, 101 to 180) &nbsp; minpoll N</dt>
<dd>
<p>モード 100 を設定した場合、このドライバーは、遅延を計測するためのループバック・コマンドは発行せず、電話回線とシステムの処理による遅延は調整しません。<br>
モード 101 から 180 を設定した場合、このドライバーは、ループバック・コマンドを発行して、テレフォンJJYのループバック回路を通して電話回線とシステムの処理による遅延を計測します。<br>
テレフォンJJYのループバック回路を経由した往復の時間は、5回、計測されます。
それぞれの遅延時間のうち、700ミリ秒を超えたものは、平均遅延時間の計算より除外されます。
また、700ミリ秒以下の有効な遅延時間が、3回以上の場合は、そのうち、最大の遅延時間は、平均遅延時間の計算より除外され、
4回以上の場合は、そのうち、最小の遅延時間は、平均遅延時間の計算より除外されます。
調整時間は、往復時間 × ( モード番号 - 100 ) % で計算し、同期する時刻に加算されます。<br>
モード 101 から 180 を設定して自動遅延補正を選択するなら、モード 145 から 165 が良いでしょう。</p>
<p>デフォルトの日時問い合わせ処理間隔 6 ( 64 秒 ) は、このモードには、短すぎます。 "minpoll" は、8 ( 256 秒, 約 4 分 ) 以上を設定して下さい。<br>
日時問い合わせ処理間隔は、秒数を 2 のべき乗で指定します。 minpoll の値が、12 なら 4096 秒約1時間、14 なら 16384 秒約4.5時間、16 なら 65536 秒約18時間となります。</p><br>
</dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1 &nbsp; flag2 0|1 &nbsp; flag3 0|1 &nbsp; flag4 0|1</dt>
<dd>
<p>Time1 は、受信機からの時刻に加算する調整時間を、固定小数点形式の秒で設定します。<br>
mode 100 の場合は、time1 で調整する時間を設定したほうが良いでしょう。<br>
mode 101 から 180 の場合は、このドライバーが計測したループバックの遅延時間の一定の割合を同期時刻に加算しますので、time1 は設定しないほうが良いでしょう。</p>
<div style="text-align:left;">Flag1 は、タッチ・トーンかダイヤル・パルスかを指定します。</div>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>タッチ・トーン</td><td>ATDWTnn...nn</td></tr>
<tr><td>1</td><td>ダイヤル・パルス</td><td>ATDWPnn...nn</td></tr>
</table>
<br>
<div style="text-align:left;">Flag2 は、エラー訂正プロトコルを指定します。</div>
<table border="1" summary="fudge flag2">
<tr><td>0 (Default)</td><td>ノーマル(エラー訂正なし)</td><td>AT\N0</td></tr>
<tr><td>1</td><td>V42, MNP, ノーマルの自動選択</td><td>AT\N3</td></tr>
</table>
<br>
<div style="text-align:left;">Flag3 は、スピーカーのオン/オフを指定します。</div>
<table border="1" summary="fudge flag3">
<tr><td>0 (Default)</td><td>オフ</td><td>ATM0Ln</td></tr>
<tr><td>1</td><td>オン</td><td>ATM2Ln</td></tr>
</table>
<br>
<div style="text-align:left;">Flag4 は、スピーカーの音量を指定します。</div>
<table border="1" summary="fudge flag4">
<tr><td>0 (Default)</td><td></td><td>ATMnL1</td></tr>
<tr><td>1</td><td></td><td>ATMnL2</td></tr>
</table>
<br>
</dd>
<dt>phone 042NNNNNNN</dt>
<dd>
<p>電話番号は、<a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> で公開されています。<br>
電話番号の桁数をチェックしています。もし、日本国外から発信するために国際電話アクセス番号と国番号を付加すると、桁数制限を超えます。<br>
また、電話番号の最初の2桁や3桁をチェックしています。日本の緊急番号や特別のサービスの番号を指定することはできません。<br>
内線から外線に発信する時は、"0," ( ゼロとカンマ ) を先頭に付加して下さい。外線発信番号は、チェックしていて、それ以外の外線発信番号を指定することはできません。</p>
</dd>
</dl>
<br>
</dd>
<dt>インターフェース</dt>
<dd>
<p>RS-232C 又は USB, 2400 BPS, 8ビット, パリティなし, 1ストップ・ビット</p>
<p>モデム制御コマンド:<br>
<code>ATE0Q0V1, ATMnLn, AT&amp;K4, AT+MS=V22B, AT%C0, AT\Nn, ATH1, ATDWxnn...nn</code><br>
<code>+++, ATH0</code></p>
<br>
</dd>
<dt>日時データの形式</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>プロンプト</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>コマンド</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>応答</td>
</tr>
<tr>
<td><code>Name{SP}?{SP}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>TJJY{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>Welcome messages</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>LOOP{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>( Switch to the loopback circuit )</td>
</tr>
<tr>
<td><code>&nbsp;</code></td>
<td>&nbsp;&nbsp;</td>
<td><code>( One char. )</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>( One char. )</code></td>
</tr>
<tr>
<td><code>&nbsp;</code></td>
<td>&nbsp;&nbsp;</td>
<td><code>COM{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>( Exit from the loopback circuit )</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>TIME{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}</code> 3 times on second</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>4DATE{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>YYYYMMDD{CR}</code></td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>LEAPSEC{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>{SP}0{CR} | +1{CR} | -1{CR}</code></td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>TIME{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}</code> 3 times on second</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>BYE{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>Sayounara messages</td>
</tr>
</table>
<p>日付と時刻は、別々に問い合わせます。日付が深夜0時の前か後かの不確定をチェックするため、日付の問い合わせの前後に時刻を問い合わせています。<br>
うるう秒は、処理していません。情報として clockstats ファイルに記録しているだけです。</p>
<br>
</dd>
</dl>
</li>
</ul>
<p>JJY は、長波で日本標準時(JST)を送信している無線局で、国立研究開発法人 情報通信研究機構が運用しています。JJY の運用情報などは、 <a href="http://www.nict.go.jp/">http://www.nict.go.jp/</a>(英語と日本語)や <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a>(英語と日本語)で提供されています。</p>
<p>実際のシリアル・ポートのデバイスにシンボリック・リンクを作成して下さい。シンボリック・リンクを作成するコマンドは、以下のとおりです。</p>
<p><code>ln -s /dev/ttyS0 /dev/jjy0</code></p>
<p>RS-232C から USB への変換ケーブルを利用して、JJY受信機、GPS時計、モデムをRS-232Cポートではなく、USBに接続することができます。この場合のシンボリック・リンクを作成するコマンドは、以下のとおりです。</p>
<p><code>ln -s /dev/ttyUSB0 /dev/jjy0</code></p>
<p>Windows NT の場合は、 COM<em>X</em>: の数字部分がドライバーのユニット番号に使用されます。 ドライバーのユニット 1 は、COM1: にユニット 3 は、COM3: に対応します。</p>
<h4>Monitor Data</h4>
<p>このドライバーは、JJY受信機、GPS時計、モデムとの送受信データを <code>clockstats</code> ファイルに記録します。</p>
<p><code>
statsdir /var/log/ntpd/<br>
filegen clockstats file clockstats type day enable
</code></p>
<div style="text-align:left;">レコード中のマークについて</div>
<table border="1" summary="Clockstats">
<tr><td><code>JJY</code>&nbsp;</td><td>情報(このドライバーの開始または終了)</td></tr>
<tr><td><code>--&gt;</code>&nbsp;</td><td>送信データ</td></tr>
<tr><td><code>&lt;--</code>&nbsp;</td><td>受信データ</td></tr>
<tr><td><code>---</code>&nbsp;</td><td>情報</td></tr>
<tr><td><code>===</code>&nbsp;</td><td>情報(ポーリングの開始、および、同期時刻)</td></tr>
<tr><td><code>-W-</code>&nbsp;</td><td>警告メッセージ</td></tr>
<tr><td><code>-X-</code>&nbsp;</td><td>エラー・メッセージ</td></tr>
</table>
<h4>Fudge Factors</h4>
<dl>
<dt><code>time1 <em>time</em></code></dt>
<dd>受信機からの時刻に対する調整時間を、固定小数点形式の秒で設定します。デフォルトは、0.0秒です。</dd>
<dt><code>time2 <em>time</em></code></dt>
<dd>未使用。</dd>
<dt><code>stratum <em>number</em></code></dt>
<dd>NTPの階層番号を 0 から 15 で指定します。デフォルトは、0です。</dd>
<dt><code>refid <em>string</em></code></dt>
<dd>ドライバーIDで、ASCII の1文字から4文字で指定します。デフォルトは、<code>JJY</code> です。</dd>
<dt><code>flag1 0 | 1</code></dt>
<dd>それぞれのモードを参照して下さい。</dd>
<dt><code>flag2 0 | 1</code></dt>
<dd>それぞれのモードを参照して下さい。</dd>
<dt><code>flag3 0 | 1</code></dt>
<dd>それぞれのモードを参照して下さい。</dd>
<dt><code>flag4 0 | 1</code></dt>
<dd>それぞれのモードを参照して下さい。</dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -5,6 +5,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>JJY Receivers</title>
<link rev="made" href="http://www.bea.hi-ho.ne.jp/abetakao/">
@ -15,8 +16,8 @@
<body>
<h3>JJY Receivers</h3>
<p>Last update:
<!-- #BeginDate format:En2m -->3-May-2011 00:20<!-- #EndDate -->
UTC</p>
<!-- #BeginDate format:En2m -->15-May-2015 00:00<!-- #EndDate -->
UTC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="driver40.html">ENGLISH</a> &nbsp; <a href="driver40-ja.html">JAPANESE</a></p>
<hr>
<h4>Synopsis</h4>
Address: 127.127.40.<em>u</em><br>
@ -24,19 +25,37 @@
Driver ID: <code>JJY</code><br>
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>
<p>This driver supports the following the JJY receivers and the GPS clock sold in Japan, and the time service through a telephone line.
</p>
<table width="100%">
<tr>
<td width="50%" style="vertical-align:top;">
<a href="#mode-1">Tristate Ltd. &nbsp; TS-JJY01, TS-JJY02</a><br>
<a href="#mode-2">C-DEX Co.,Ltd. &nbsp; JST2000</a><br>
<a href="#mode-3">Echo Keisokuki Co.,Ltd. &nbsp; LT-2000</a><br>
<a href="#mode-4">CITIZEN T.I.C. CO.,LTD. &nbsp; JJY-200</a><br>
<a href="#mode-5">Tristate Ltd. &nbsp; TS-GPSclock-01</a><br>
</td>
<td width="50%" style="vertical-align:top; border-left:solid; padding:0px 0px 0px 10px;">
<a href="#mode-6">SEIKO TIME SYSTEMS INC. &nbsp; TDC-300</a><br>
<a href="#mode-100">Telephone JJY</a><br>
</td>
</tr>
</table>
<ul>
<li>
<p>Tristate Ltd. JJY01, JJY02 <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p><br>
<p><a name="mode-1">Tristate Ltd. &nbsp; TS-JJY01, TS-JJY02</a> &nbsp; <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>
<dd><br>
<dl>
<dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1</dt>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 1</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN &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>
<p>Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds. You may specify the time offset from several tens of milli-seconds ( 0.0NN seconds ) to a hundred and several tens of milli-seconds ( 0.1NN seconds ) for this clock.</p>
<p>Flag1 has no effect for time synchronization. When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the 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>
@ -47,7 +66,7 @@
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
<p>RS-232C, 9600 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@ -58,6 +77,21 @@
<td>&nbsp;--&gt;&nbsp;</td>
<td>Reply</td>
</tr>
<tr>
<td><code>dcst{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>valid{CR}{LF} | invalid{CR}{LF}</code></td>
</tr>
<tr>
<td><code>stus{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>adjusted{CR}{LF} | unadjusted{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>
<tr>
<td><code>date{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
@ -69,22 +103,26 @@
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<br>
<p>The date and time are requested separately. The time is requested before and after the date request to check uncertainty of the date whether it's before or after midnight.</p><br>
</dd>
</dl>
</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>
<p><a name="mode-2">C-DEX Co.,Ltd. &nbsp; JST2000</a> &nbsp; <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>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 2</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
<p>RS-232C, 9600 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@ -107,16 +145,20 @@
</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><br>
<p><a name="mode-3">Echo Keisokuki Co.,Ltd. &nbsp; LT-2000</a> &nbsp; <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>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 3</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
<p>RS-232C, 9600 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@ -149,16 +191,20 @@
</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><br>
<p><a name="mode-4">CITIZEN T.I.C. CO.,LTD. &nbsp; JJY-200</a> &nbsp; <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>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 4</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 4800 baud, 8-bits, no parity, 1 stop bit</p>
<p>RS-232C, 4800 BPS, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@ -181,16 +227,18 @@
</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><a name="mode-5">Tristate Ltd. &nbsp; TS-GPSclock-01</a> &nbsp; <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>
<dd><br>
<dl>
<dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1</dt>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 5</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN &nbsp; flag1 0|1</dt>
<dd>
<p>Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds.</p>
<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>
@ -213,6 +261,16 @@
<td>&nbsp;--&gt;&nbsp;</td>
<td>Reply</td>
</tr>
<tr>
<td><code>stus{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>*R{CR}{LF} | *G{CR}{LF} | *U{CR}{LF} | +U{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>
<tr>
<td><code>date{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
@ -224,38 +282,250 @@
<td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<p>The date and time are requested separately. The time is requested before and after the date request to check uncertainty of the date whether it's before or after midnight.</p><br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-6">SEIKO TIME SYSTEMS INC. &nbsp; TDC-300</a> &nbsp; <a href="http://www.seiko-sts.co.jp/">http://www.seiko-sts.co.jp/</a> (English and Japanese)</p><br>
<p>The TDC-300 must be set to the type 3 data format using the front panel menu display and the switches.</p>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode 6</dt>
<dd><br></dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; time1 0.NNN</dt>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C, 2400 BPS, 8-bits, no parity, 1 stop bit</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></td>
<td></td>
<td><code>{STX}YYMMDDWHHMMSS{ETX}</code></td>
</tr>
<tr>
<td>( 5 to 10 mSec. before second )</td>
<td></td>
<td><code>{STX}{xE5}{ETX}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
</li>
<li>
<p><a name="mode-100">Telephone JJY</a> &nbsp; <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> (English and Japanese)</p>
<p>The telephone JJY is the time service through a public telephone line.<br>
The service is provided by the National Institute of Information and Communications Technology in Japan.</p>
<p>ATTENTION; This mode, the telephone JJY, can not be used with the refclock_acts ( type 18 ) at the same time.
Because the "phone" statement in the ntp configuration file is not involved with the "server" statement,
so the both the refclock_acts ( type 18 ) and this refclock_jjy ( type 40, mode 100 to 180 ) can not recognize the appropriate "phone" statement among the "phone" statements.</p>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd><br>
<dl>
<dt>server &nbsp; 127.127.40.X &nbsp; mode (100, 101 to 180) &nbsp; minpoll N</dt>
<dd>
<p>The mode 100 is specified, this driver does not issue the loopback command in order to measure the delay, and the delay of the telephone line and the system processing is not adjusted.<br>
The mode 101 to 180 is specified, this driver issues the loopback command and measures the delay of the telephone line and the system processing through the Telphone JJY loopback circuit.<br>
The round trip time through the Telphone JJY loopback circuit is measured 5 times, and each delay time is greater than 700 milli-seconds,
that delay time is ignored during average delay time calculation. Also, if the valid delay time ( &lt;= 700 mS. ) is measured more than 3 times, the maximum delay time among the valid delay times is ignored,
and if the valid delay time is measured more than 4 times, the minimum delay time among them is ignored, like marking/grading sports judgment.<br>
The adjustment time is calculated by the formula,<br>
multiply ( the measured round trip time ) by ( ( the mode number ) - 100 ) %,<br>
and the adjustment delay time is added to the syncronizing time.<br>
If you choose the automatic delay ajustment, in other words, the mode 101 to 180 is specifed, the recommended mode number is 145 to 165.</p>
<p>The default polling interval 6 ( 64 seconds ) is too short for this mode. The "minpoll" should be set to greater than or equal to 8 ( 256 seconds, about 4 minutes ).<br>
The interval time is given the value in second power of 2. The minpoll value 12 is 4096 seconds interval ( about 1 hour ), 14 is 16384 seconds interval ( about 4.5 hours ), 16 is 65536 seconds ( about 18 hours ), respectively.</p><br>
</dd>
<dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1 &nbsp; flag2 0|1 &nbsp; flag3 0|1 &nbsp; flag4 0|1</dt>
<dd>
<p>Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds.<br>
When the mode 100 is specified, the time1 may be specified in order to adjust the time offset.<br>
When the mode 101 to 180 is specified, the time1 should not be specified because this driver adds some percentage of the measured loopback delay, depending on the value of the mode number.</p>
<div style="text-align:left;">Flag1 is the modem dialing type.</div>
<table border="1" summary="fudge flag1">
<tr><td>0 (Default)</td><td>Tone</td><td>ATDWTnn...nn</td></tr>
<tr><td>1</td><td>Pulse</td><td>ATDWPnn...nn</td></tr>
</table>
<br>
<div style="text-align:left;">Flag2 is the modem error correction type.</div>
<table border="1" summary="fudge flag2">
<tr><td>0 (Default)</td><td>Normal</td><td>AT\N0</td></tr>
<tr><td>1</td><td>Auto V42, MNP, Normal</td><td>AT\N3</td></tr>
</table>
<br>
<div style="text-align:left;">Flag3 is the modem speaker switch.</div>
<table border="1" summary="fudge flag3">
<tr><td>0 (Default)</td><td>Off</td><td>ATM0Ln</td></tr>
<tr><td>1</td><td>On</td><td>ATM2Ln</td></tr>
</table>
<br>
<div style="text-align:left;">Flag4 is the modem speaker volume.</div>
<table border="1" summary="fudge flag4">
<tr><td>0 (Default)</td><td>Low</td><td>ATMnL1</td></tr>
<tr><td>1</td><td>Middle</td><td>ATMnL2</td></tr>
</table>
<br>
</dd>
<dt>phone 042NNNNNNN</dt>
<dd>
<p>The phone number is available at <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a><br>
The number of digits of the phone number is checked. If the international access number and the country number are added in order to call from outside of Japan, the number of digits is over the limit.<br>
The first 2 or 3 digits are checked. The emergency service number and the special service number in Japan are not allowed.<br>
Calling from extension line, the number for an outside line should be prefix "0," ( Zero, Comma ). The prefix is also checked, and no other outside access number is allowed.</p>
</dd>
</dl>
<br>
</dd>
<dt>Interface</dt>
<dd>
<p>RS-232C or USB, 2400 BPS, 8-bits, no parity, 1 stop bit</p>
<p>Modem control commands:<br>
<code>ATE0Q0V1, ATMnLn, AT&amp;K4, AT+MS=V22B, AT%C0, AT\Nn, ATH1, ATDWxnn...nn</code><br>
<code>+++, ATH0</code></p>
<br>
</dd>
<dt>Time code format</dt>
<dd><br>
<table summary="CommandAndReply">
<tr>
<td>Prompt</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>Command</td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>Reply</td>
</tr>
<tr>
<td><code>Name{SP}?{SP}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>TJJY{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>Welcome messages</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>LOOP{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>( Switch to the loopback circuit )</td>
</tr>
<tr>
<td><code>&nbsp;</code></td>
<td>&nbsp;&nbsp;</td>
<td><code>( One char. )</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>( One char. )</code></td>
</tr>
<tr>
<td><code>&nbsp;</code></td>
<td>&nbsp;&nbsp;</td>
<td><code>COM{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>( Exit from the loopback circuit )</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>TIME{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}</code> 3 times on second</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>4DATE{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>YYYYMMDD{CR}</code></td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>LEAPSEC{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>{SP}0{CR} | +1{CR} | -1{CR}</code></td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>TIME{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>HHMMSS{CR}HHMMSS{CR}HHMMSS{CR}</code> 3 times on second</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td><code>BYE{CR}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
<td>Sayounara messages</td>
</tr>
</table>
<p>The date and time are requested separately. The time is requested before and after the date request to check uncertainty of the date whether it's before or after midnight.<br>
The leap second is not handled, and only written in the clockstats file as an information.</p>
<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 JJY is the radio station which transmits 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 available 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><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>Using an RS-232C to USB converter cable, the clock or a modem can be connected to a USB port instead of a serial port. In this case, the typical symbolic link command is as follows;</p>
<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>
<p>The driver writes sent and received data to/from the JJY receivers, GPS clock, and the modem into the <code>clockstats</code> file.</p>
<p><code>
statsdir /var/log/ntpd/<br>
filegen clockstats file clockstats type day enable
</code></p>
<div style="text-align:left;">Mark of the clockstats record</div>
<table border="1" summary="Clockstats">
<tr><td><code>JJY</code>&nbsp;</td><td>Infomation message ( This refclock starts or stops. )</td></tr>
<tr><td><code>--&gt;</code>&nbsp;</td><td>Sent data</td></tr>
<tr><td><code>&lt;--</code>&nbsp;</td><td>Received data</td></tr>
<tr><td><code>---</code>&nbsp;</td><td>Infomation message</td></tr>
<tr><td><code>===</code>&nbsp;</td><td>Infomation message ( Start of each polling, and sync. time. )</td></tr>
<tr><td><code>-W-</code>&nbsp;</td><td>Warning message</td></tr>
<tr><td><code>-X-</code>&nbsp;</td><td>Error message</td></tr>
</table>
<h4>Fudge Factors</h4>
<dl>
<dt><code>time1 <em>time</em></code>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><code>time2 <em>time</em></code>
<dd>Not used by this driver.
<dt><code>stratum <em>number</em></code>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<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>See corresponding receiver.
<dt><code>flag2 0 | 1</code>
<dd>Not used by this driver.
<dt><code>flag3 0 | 1</code>
<dd>Not used by this driver.
<dt><code>flag4 0 | 1</code>
<dt><code>time1 <em>time</em></code></dt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
<dt><code>time2 <em>time</em></code></dt>
<dd>Not used by this driver.
<dt><code>stratum <em>number</em></code></dt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
<dt><code>refid <em>string</em></code></dt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <code>JJY</code>.</dd>
<dt><code>flag1 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
<dt><code>flag2 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
<dt><code>flag3 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
<dt><code>flag4 0 | 1</code></dt>
<dd>See corresponding receiver.</dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>

View file

@ -14,7 +14,7 @@
<body>
<h3>GPSD NG client driver</h3>
<p>Last update:
<!-- #BeginDate format:En2m -->1-Mar-2014 03:48<!-- #EndDate -->
<!-- #BeginDate format:En2m -->30-Apr-2015 05:53<!-- #EndDate -->
UTC</p>
<hr>
<h4>Synopsis</h4>
@ -28,8 +28,9 @@
Features: <tt></tt>
</p>
<h4>Description</h4>
<!-- --------------------------------------------------------- -->
<br><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
@ -68,25 +69,37 @@
<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.
<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.)
The driver needs the VERSION, TPV, PPS, WATCH and TOFF objects
of the <i>GPSD</i> protocol. (Others are quietly ignored.) The
driver can operate without the TOFF objects, which are available
with the <i>protocol</i> version 3.10 and above. (Not to be
confused with the <i>release</i> version of <i>GPSD</i>!)
Running without TOFF objects has a negative impact on the jitter
and offset of the serial timing information; if possible, a
version of <i>GPSD</i> with support for TOFF objects should be
used.
</p>
<p>The acronym <u>STI</u> is used here as a synonym for <i>serial
time information</i> from the data channel of the receiver, no
matter what objects were used to obtain it.
</p>
<!-- --------------------------------------------------------- -->
<h4>Naming a Device</h4>
<br><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.
The <i>GPSD</i> driver uses the same device 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;
@ -97,14 +110,16 @@
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><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 character special file,
which is not possible when running with root privileges already
dropped. This is not likely to change in the future.
</p>
<h4>The 'mode' byte</h4>
<!-- --------------------------------------------------------- -->
<br><h4>The 'mode' word</h4>
<p>
A few operation modes can be selected with the mode word.
</p>
@ -113,70 +128,234 @@
<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> <td rowspan="4"align="center">0..1</td>
<td align="center">0</td>
<td>STI only operation. This mode is affected by the timing
stability of whatever protocol is used between the GPS
device and GPSD.
<br>
Running on STI only is not recommended in general. Possible
use cases include:
<ul>
<li>The receiver does not provide a PPS signal.
<li>The receiver <i>does</i> provide a PPS signal and
the secondary PPS unit is used.
<li>The receiver has a stable serial timing and a proper
fudge can be established.
<li>You have other time sources available and want to
establish a useful fudge value for <tt>time2</tt>.
</ul>
</td>
</tr>
<tr><td align="center">1</td>
<td>Require TPV <b>and</b> PPS to work.</td>
<tr>
<td align="center">1</td>
<td>Strict operation. This mode needs a valid PPS and a
valid STI to combine the absolute time from the STI with
the time stamp from the PPS record. Does not feed clock
samples if no valid PPS+STI pair is available.
<br><br>
This type of operation results in an ordinary clock with a
very low jitter as long as the PPS data is available, but
the clock fails once PPS drops out. This mode is a
possible choice for receivers that provide a PPS signal
most of the time but have an unstable serial timing that
cannot be fudge-compensated.
</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>
<td>Automatic mode. Tries to operate in strict mode unless
it fails to process valid samples for some time, currently
120s. Then it reverts to STI-only operation until the PPS
is stable again for 40s, when strict mode is engaged
again.
<br><br><b>Important Notice: This is an expiremental
feature!</b><br> Switching between strict and STI-only
mode will cause changes in offset and jitter. Use this
mode only if STI-only works fairly well with your setup,
or if you expect longer dropouts of the PPS signal and
prefer to use STI alone over not getting synchronised at
all.</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>
<td align="center">3</td>
<td><i>(reserved for future extension, do not use)</i></td>
</tr>
<tr>
<td align="center">2..31</td>
<td colspan="2"><i>(reserved for future extension, do not
use)</i></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>
<br><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>
<!-- --------------------------------------------------------- -->
<br><h4>PPS secondary clock unit</h4>
<p>Units with numbers &ge;128 act as secondary clock unit for the
primary clock unit (u mod 128). A secondary unit processes only
the PPS data from <i>GPSD</i> and needs the corresponding master
unit to work<a href="#fn1" name="fn1bl"><sup>1</sup></a>. Use
the 'noselect' keyword on the primary unit if you are not
interested in its data.
</p><p>The secondary unit employs the usual precautions before
feeding clock samples:</p>
<ul>
<li>The system must be already in a synchronised state.
<li>The system offset must be less than 400ms absolute.
<li>The phase adjustment from the PPS signal must also be less
than 400ms absolute.
</ul>
<p>If fudge flag <tt>flag1</tt> is set for the secondary unit, the
unit asserts the PPS flag on the clock as long as PPS data is
available. This makes the unit eligible as PPS peer and should
only be used if the GPS receiver can be trusted for the quality
of its PPS signal<a href="fn2"
name="fn2bl"><sup>2</sup></a>. The PPS flag gets cleared if no
PPS records can be aquired for some time. The unit also flushes
the sample buffer at this point to avoid the use of stale PPS
data.</p>
<p><b>Attention:</b> This unit uses its own PPS fudge value
which must be set as fudge <tt>time1</tt>. Only the fudge
values <tt>time1</tt> and <tt>flag1</tt> have an impact on secondary
units.</p>
<!-- --------------------------------------------------------- -->
<br><h4>Clockstats</h4>
<p>If flag4 is set when the driver is polled, a clockstats record
is written for the primary clock unit. (The secondary PPS unit
does not provide clock stats on its own.) The first 3 fields are
the normal date, time, and IP address common to all clockstats
records.
</p><p>
<table border="1" frame="box" rules="all">
<th colspan="2">The Clockstats Line</th>
<tr> <td>field</td><td>Description</td> </tr>
<tr>
<td align="center">1</td>
<td>Date as day number since NTP epoch.</td>
</tr><tr>
<td align="center">2</td>
<td>Time as seconds since midnight.</td>
</tr><tr>
<td align="center">3</td>
<td>(Pseudo-) IP address of clock unit.</td>
</tr><tr>
<td align="center">4</td>
<td>Number of received known JSON records since last
poll. The driver knows about TPV, PPS, TOFF, VERSION and
WATCH records; others are silently ignored.
</td>
</tr><tr>
<td align="center">5</td>
<td>Bad replies since last poll. A record is considered
malformed or a bad reply when it is missing vital fields
or the fields contain malformed data that cannot be
parsed.
</td>
</tr><tr>
<td align="center">6</td>
<td>Number of sample cycles since last poll that were
discarded because there was no GPS fix. This is
effectively the number of TPV records with a fix value
&lt; 2 or without a time stamp.
</td>
</tr><tr>
<td align="center">7</td>
<td>Number of serial time information records (TPV or TOFF,
depending on the GPSD version) received since last poll.
</td>
</tr><tr>
<td align="center">8</td>
<td>Number of serial time information records used for
clock samples since the last poll.
</td>
</tr><tr>
<td align="center">9</td>
<td>Number of PPS records received since the last poll.</td>
</tr><tr>
<td align="center">10</td>
<td>Number of PPS records used for clock samples on the
secondary channel since the last poll.
</td>
</tr>
</table>
</p>
<!-- --------------------------------------------------------- -->
<br><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>
<dd><em>[Primary Unit]</em> Specifies the TPV/TIME 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>
<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>
<dt><tt>flag1 0 | 1</tt></dt><dd><em>[<b>Secondary</b>
Unit]</em> When set, flags the secondary clock unit as a
potential PPS peer as long as good PPS data is available.
</dd>
<dt><tt>flag2 0 | 1</tt></dt>
<dd><em>[Primary Unit]</em> When set, <u>disables</u> the
processing of incoming PPS records. Intended as an aide to
test the effects of a PPS dropout when using automatic mode
(mode 2).
</dd>
<dt><tt>flag3 0 | 1</tt></dt><dd><em>[Primary Unit]</em>
If set, <u>disables</u> 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><em>[Primary Unit]</em>
If set, write a clock stats line on every poll cycle.
</dd>
</dl>
<!-- -- footnotes -------------------------------------------- -->
<hr>
<p><a name="fn1" href="#fn1bl"><sup>1</sup>) </a>Data transmission
an decoding is done only once by the primary unit. The decoded
data is then processed independently in both clock units. This
avoids double transmission over two sockets and decoding the
same data twice, but the primary unit is always needed as a
downside of this approach.
</p>
<p><a name="fn2" href="#fn2bl"><sup>2</sup>) </a>The clock driver
suppresses the processing PPS records when the TPV/TIME data
indicates the receiver has no fix. It can also deal with
situations where the PPS signal is not delivered
to <i>GPSD</i>. But once it is available, it is also processed
and used to create samples. If a receiver cannot be trusted for
the precision of its PPS signal, it should not be used to create
a possible PPS peer: These get extra clout and can effectively
become the sole source of input for the control loop. You do not
want to use sloppy data for that.
<hr>
<p>Additional Information</p>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
<hr>

View file

@ -3,6 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Miscellaneous Commands and Options</title>
<!-- Changed by: Harlan Stenn, 29-Jun-2015 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
@ -10,7 +11,7 @@
<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 -->28-Feb-2015 12:01<!-- #EndDate -->
<!-- #BeginDate format:En2m -->29-Jun-2015 05:56<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@ -26,6 +27,8 @@
<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="dscp"><tt>dscp <i>dscp</i></tt></dt>
<dd>This command specifies the Differentiated Services Code Point (DSCP) value that is used in sent NTP packets. The default value is 46 for Expedited Forwarding (EF).</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.
@ -57,6 +60,8 @@
<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="leapsmearinterval"><tt>leapsmearinterval <i>seconds</i></tt></dt>
<dd>This EXPERIMENTAL option is only available if <tt>ntpd</tt> was built with the <tt>--enable-leap-smear</tt> option to the <tt>configure</tt> script. It specifies the interval over which a leap second correction will be applied. Recommended values for this option are between 7200 (2 hours) and 86400 (24 hours). <b>DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!</b> See http://bugs.ntp.org/2855 for more information.</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>
@ -95,6 +100,18 @@
<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="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="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>
@ -120,18 +137,6 @@
<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>

View file

@ -28,7 +28,7 @@
<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>server</tt> command is used to configure a reference clock. Only the <tt>mode</tt>, <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>

View file

@ -64,6 +64,7 @@ noinst_HEADERS = \
parse_conf.h \
recvbuff.h \
refclock_atom.h \
refidsmear.h \
ssl_applink.c \
timepps-SCO.h \
timepps-Solaris.h \

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -16,6 +15,61 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -35,8 +89,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = include
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)/sntp/libopts/m4/stdnoreturn.m4 \
@ -67,6 +119,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -76,34 +129,69 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
$(am__DIST_COMMON)
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_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
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_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-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 \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(noinst_HEADERS)
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 \
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@ -179,6 +267,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -295,6 +384,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -455,6 +545,7 @@ noinst_HEADERS = \
parse_conf.h \
recvbuff.h \
refclock_atom.h \
refidsmear.h \
ssl_applink.c \
timepps-SCO.h \
timepps-Solaris.h \
@ -481,7 +572,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
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*) \
@ -507,22 +597,25 @@ 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; \
# 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.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@ -537,57 +630,12 @@ $(RECURSIVE_TARGETS):
$(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: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; 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)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@ -603,12 +651,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -620,15 +663,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -637,6 +676,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -673,13 +727,10 @@ distdir: $(DISTFILES)
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 \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@ -714,10 +765,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -795,22 +851,22 @@ ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.MAKE: $(am__recursive_targets) install-am install-strip
.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
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-libtool cscopelist-am ctags \
ctags-am 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-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -16,6 +15,61 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -35,8 +89,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = include/isc
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)/sntp/libopts/m4/stdnoreturn.m4 \
@ -67,6 +119,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -76,21 +129,52 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
$(am__DIST_COMMON)
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_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -141,6 +225,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -257,6 +342,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -373,7 +459,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/isc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign include/isc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -398,26 +483,15 @@ mostlyclean-libtool:
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
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -429,15 +503,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -446,6 +516,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -494,10 +579,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -577,19 +667,21 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags 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 maintainer-clean \
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool cscopelist-am ctags ctags-am 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 maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: 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.

View file

@ -80,6 +80,7 @@ typedef enum {
} nic_rule_action;
extern int qos;
SOCKET move_fd(SOCKET fd);
isc_boolean_t get_broadcastclient_flag(void);
extern int is_ip_address(const char *, u_short, sockaddr_u *);

View file

@ -102,26 +102,35 @@ extern u_int32 addr2refid (sockaddr_u *);
/* emalloc.c */
#ifndef EREALLOC_CALLSITE /* ntp_malloc.h defines */
extern void * ereallocz (void *, size_t, size_t, int);
#define erealloczsite(p, n, o, z, f, l) ereallocz(p, n, o, (z))
#define emalloc(n) ereallocz(NULL, n, 0, FALSE)
extern void * oreallocarray (void *optr, size_t nmemb, size_t size);
#define erealloczsite(p, n, o, z, f, l) ereallocz((p), (n), (o), (z))
#define emalloc(n) ereallocz(NULL, (n), 0, FALSE)
#define emalloc_zero(c) ereallocz(NULL, (c), 0, TRUE)
#define erealloc(p, c) ereallocz(p, (c), 0, FALSE)
#define erealloc_zero(p, n, o) ereallocz(p, n, (o), TRUE)
extern char * estrdup_impl (const char *);
#define erealloc(p, c) ereallocz((p), (c), 0, FALSE)
#define erealloc_zero(p, n, o) ereallocz((p), (n), (o), TRUE)
#define ereallocarray(p, n, s) oreallocarray((p), (n), (s))
#define eallocarray(n, s) oreallocarray(NULL, (n), (s))
extern char * estrdup_impl(const char *);
#define estrdup(s) estrdup_impl(s)
#else
extern void * ereallocz (void *, size_t, size_t, int,
const char *, int);
extern void * oreallocarray (void *optr, size_t nmemb, size_t size,
const char *, int);
#define erealloczsite ereallocz
#define emalloc(c) ereallocz(NULL, (c), 0, FALSE, \
__FILE__, __LINE__)
#define emalloc_zero(c) ereallocz(NULL, (c), 0, TRUE, \
__FILE__, __LINE__)
#define erealloc(p, c) ereallocz(p, (c), 0, FALSE, \
#define erealloc(p, c) ereallocz((p), (c), 0, FALSE, \
__FILE__, __LINE__)
#define erealloc_zero(p, n, o) ereallocz(p, n, (o), TRUE, \
#define erealloc_zero(p, n, o) ereallocz((p), (n), (o), TRUE, \
__FILE__, __LINE__)
extern char * estrdup_impl (const char *, const char *, int);
#define ereallocarray(p, n, s) oreallocarray((p), (n), (s), \
__FILE__, __LINE__)
#define eallocarray(n, s) oreallocarray(NULL, (n), (s), \
__FILE__, __LINE__)
extern char * estrdup_impl(const char *, const char *, int);
#define estrdup(s) estrdup_impl((s), __FILE__, __LINE__)
#endif

View file

@ -19,6 +19,11 @@
# include <stdint.h>
#endif
/* Bug 2813 */
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#include "ntp_machine.h"

View file

@ -201,6 +201,7 @@ extern keyid_t session_key (sockaddr_u *, sockaddr_u *, keyid_t,
extern int make_keylist (struct peer *, struct interface *);
extern void key_expire (struct peer *);
extern void crypto_update (void);
extern void crypto_update_taichange(void);
extern void crypto_config (int, char *);
extern void crypto_setup (void);
extern u_int crypto_ident (struct peer *);
@ -222,6 +223,7 @@ extern void receive (struct recvbuf *);
extern void peer_clear (struct peer *, const char *);
extern void process_packet (struct peer *, struct pkt *, u_int);
extern void clock_select (void);
extern void set_sys_leap (u_char);
extern u_long leapsec; /* seconds to next leap (proximity class) */
extern int leapdif; /* TAI difference step at next leap second*/
@ -532,6 +534,11 @@ extern u_long current_time; /* seconds since startup */
extern u_long timer_timereset;
extern u_long timer_overflows;
extern u_long timer_xmtcalls;
extern int leap_sec_in_progress;
#ifdef LEAP_SMEAR
extern struct leap_smear_info leap_smear;
extern int leap_smear_intv;
#endif
#ifdef SYS_WINNT
HANDLE WaitableTimerHandle;
#endif

View file

@ -3,7 +3,7 @@
*
* parse.h,v 4.12 2007/01/14 08:36:03 kardel RELEASE_20070114_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1995-2015 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
@ -141,7 +141,7 @@ extern unsigned int splclock (void);
* feature information
*/
#define PARSEB_S_LEAP 0x00010000 /* supports LEAP */
#define PARSEB_S_ANTENNA 0x00020000 /* supports antenna information */
#define PARSEB_S_CALLBIT 0x00020000 /* supports callbit information */
#define PARSEB_S_PPS 0x00040000 /* supports PPS time stamping */
#define PARSEB_S_POSITION 0x00080000 /* supports position information (GPS) */
@ -167,7 +167,7 @@ extern unsigned int splclock (void);
#define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
#define PARSE_S_LEAP(x) ((x) & PARSEB_S_LEAP)
#define PARSE_S_ANTENNA(x) ((x) & PARSEB_S_ANTENNA)
#define PARSE_S_CALLBIT(x) ((x) & PARSEB_S_CALLBIT)
#define PARSE_S_PPS(x) ((x) & PARSEB_S_PPS)
#define PARSE_S_POSITION(x) ((x) & PARSEB_S_POSITION)

View file

@ -0,0 +1,3 @@
extern l_fp convertRefIDToLFP(uint32_t r);
extern uint32_t convertLFPToRefID(l_fp num);

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -15,6 +14,61 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -34,7 +88,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = kernel
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 \
@ -65,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -74,33 +128,67 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
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_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
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_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-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 \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
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 \
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@ -176,6 +264,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -292,6 +381,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -404,7 +494,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign kernel/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign kernel/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -430,22 +519,25 @@ 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; \
# 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.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@ -460,57 +552,12 @@ $(RECURSIVE_TARGETS):
$(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: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; 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)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@ -526,12 +573,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -543,15 +585,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -560,6 +598,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -596,13 +649,10 @@ distdir: $(DISTFILES)
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 \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@ -637,10 +687,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -718,22 +773,22 @@ ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.MAKE: $(am__recursive_targets) install-am install-strip
.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
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-libtool cscopelist-am ctags \
ctags-am 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-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -16,6 +15,61 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -35,8 +89,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = kernel/sys
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)/sntp/libopts/m4/stdnoreturn.m4 \
@ -67,6 +119,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -76,21 +129,52 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
$(am__DIST_COMMON)
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_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -141,6 +225,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -257,6 +342,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -371,7 +457,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign kernel/sys/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign kernel/sys/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -396,26 +481,15 @@ mostlyclean-libtool:
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
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -427,15 +501,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -444,6 +514,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -492,10 +577,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -575,19 +665,21 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags 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 maintainer-clean \
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool cscopelist-am ctags ctags-am 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 maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: 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.

View file

@ -147,6 +147,14 @@ internal_current(isc_interfaceiter_t *iter) {
ifa = iter->pos;
#ifdef __linux
/*
* [Bug 2792]
* burnicki: iter->pos is usually never NULL here (anymore?),
* so linux_if_inet6_current(iter) is never called here.
* However, that routine would check (under Linux), if the
* interface is in a tentative state, e.g. if there's no link
* yet but an IPv6 address has already be assigned.
*/
if (iter->pos == NULL)
return (linux_if_inet6_current(iter));
#endif
@ -154,6 +162,17 @@ internal_current(isc_interfaceiter_t *iter) {
INSIST(ifa != NULL);
INSIST(ifa->ifa_name != NULL);
#ifdef IFF_RUNNING
/*
* [Bug 2792]
* burnicki: if the interface is not running then
* it may be in a tentative state. See above.
*/
if ((ifa->ifa_flags & IFF_RUNNING) == 0)
return (ISC_R_IGNORE);
#endif
if (ifa->ifa_addr == NULL)
return (ISC_R_IGNORE);

View file

@ -13,15 +13,23 @@ test: jsmn_test
./jsmn_test
jsmn_test: jsmn_test.o
$(CC) -L. -ljsmn $< -o $@
$(CC) $(LDFLAGS) -L. -ljsmn $< -o $@
jsmn_test.o: jsmn_test.c libjsmn.a
simple_example: example/simple.o libjsmn.a
$(CC) $(LDFLAGS) $^ -o $@
jsondump: example/jsondump.o libjsmn.a
$(CC) $(LDFLAGS) $^ -o $@
clean:
rm -f jsmn.o jsmn_test.o
rm -f jsmn.o jsmn_test.o example/simple.o
rm -f jsmn_test
rm -f jsmn_test.exe
rm -f libjsmn.a
rm -f simple_example
rm -f jsondump
.PHONY: all clean test

View file

@ -82,9 +82,8 @@ 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.
Repository layout is simple: jsmn.c and jsmn.h are library files, tests are in
the jsmn\_test.c, 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.
@ -127,20 +126,27 @@ 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;
jsmn_parser parser;
jsmntok_t tokens[10];
jsmn_init(&parser);
// js - pointer to JSON string
// tokens - an array of tokens available
// 10 - number of tokens available
jsmn_init_parser(&parser, js, tokens, 10);
jsmn_parse(&parser, js, tokens, 10);
This will create a parser, that can parse up to 10 JSON tokens from `js` string.
This will create a parser, and then it tries to parse up to 10 JSON tokens from
the `js` string.
A non-negative reutrn value of `jsmn_parse` is the number of tokens actually
used by the parser.
Passing NULL instead of the tokens array would not store parsing results, but
instead the function will return the value of tokens needed to parse the given
string. This can be useful if you don't know yet how many tokens to allocate.
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

View file

@ -0,0 +1,112 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "../jsmn.h"
/*
* An example of reading JSON from stdin and printing its content to stdout.
* The output looks like YAML, but I'm not sure if it's really compatible.
*/
static int dump(const char *js, jsmntok_t *t, size_t count, int indent) {
int i, j, k;
if (count == 0) {
return 0;
}
if (t->type == JSMN_PRIMITIVE) {
printf("%.*s", t->end - t->start, js+t->start);
return 1;
} else if (t->type == JSMN_STRING) {
printf("'%.*s'", t->end - t->start, js+t->start);
return 1;
} else if (t->type == JSMN_OBJECT) {
printf("\n");
j = 0;
for (i = 0; i < t->size; i++) {
for (k = 0; k < indent; k++) printf(" ");
j += dump(js, t+1+j, count-j, indent+1);
printf(": ");
j += dump(js, t+1+j, count-j, indent+1);
printf("\n");
}
return j+1;
} else if (t->type == JSMN_ARRAY) {
j = 0;
printf("\n");
for (i = 0; i < t->size; i++) {
for (k = 0; k < indent-1; k++) printf(" ");
printf(" - ");
j += dump(js, t+1+j, count-j, indent+1);
printf("\n");
}
return j+1;
}
return 0;
}
int main() {
int r;
int eof_expected = 0;
char *js = NULL;
size_t jslen = 0;
char buf[BUFSIZ];
jsmn_parser p;
jsmntok_t *tok;
size_t tokcount = 2;
/* Prepare parser */
jsmn_init(&p);
/* Allocate some tokens as a start */
tok = malloc(sizeof(*tok) * tokcount);
if (tok == NULL) {
fprintf(stderr, "malloc(): errno=%d\n", errno);
return 3;
}
for (;;) {
/* Read another chunk */
r = fread(buf, 1, sizeof(buf), stdin);
if (r < 0) {
fprintf(stderr, "fread(): %d, errno=%d\n", r, errno);
return 1;
}
if (r == 0) {
if (eof_expected != 0) {
return 0;
} else {
fprintf(stderr, "fread(): unexpected EOF\n");
return 2;
}
}
js = realloc(js, jslen + r + 1);
if (js == NULL) {
fprintf(stderr, "realloc(): errno=%d\n", errno);
return 3;
}
strncpy(js + jslen, buf, r);
jslen = jslen + r;
again:
r = jsmn_parse(&p, js, jslen, tok, tokcount);
if (r < 0) {
if (r == JSMN_ERROR_NOMEM) {
tokcount = tokcount * 2;
tok = realloc(tok, sizeof(*tok) * tokcount);
if (tok == NULL) {
fprintf(stderr, "realloc(): errno=%d\n", errno);
return 3;
}
goto again;
}
} else {
dump(js, tok, p.toknext, 0);
eof_expected = 1;
}
}
return 0;
}

View file

@ -0,0 +1,75 @@
#include <stdio.h>
#include <string.h>
#include "../jsmn.h"
/*
* A small example of jsmn parsing when JSON structure is known and number of
* tokens is predictable.
*/
const char *JSON_STRING =
"{\"user\": \"johndoe\", \"admin\": false, \"uid\": 1000,\n "
"\"groups\": [\"users\", \"wheel\", \"audio\", \"video\"]}";
static int jsoneq(const char *json, jsmntok_t *tok, const char *s) {
if (tok->type == JSMN_STRING && (int) strlen(s) == tok->end - tok->start &&
strncmp(json + tok->start, s, tok->end - tok->start) == 0) {
return 0;
}
return -1;
}
int main() {
int i;
int r;
jsmn_parser p;
jsmntok_t t[128]; /* We expect no more than 128 tokens */
jsmn_init(&p);
r = jsmn_parse(&p, JSON_STRING, strlen(JSON_STRING), t, sizeof(t)/sizeof(t[0]));
if (r < 0) {
printf("Failed to parse JSON: %d\n", r);
return 1;
}
/* Assume the top-level element is an object */
if (r < 1 || t[0].type != JSMN_OBJECT) {
printf("Object expected\n");
return 1;
}
/* Loop over all keys of the root object */
for (i = 1; i < r; i++) {
if (jsoneq(JSON_STRING, &t[i], "user") == 0) {
/* We may use strndup() to fetch string value */
printf("- User: %.*s\n", t[i+1].end-t[i+1].start,
JSON_STRING + t[i+1].start);
i++;
} else if (jsoneq(JSON_STRING, &t[i], "admin") == 0) {
/* We may additionally check if the value is either "true" or "false" */
printf("- Admin: %.*s\n", t[i+1].end-t[i+1].start,
JSON_STRING + t[i+1].start);
i++;
} else if (jsoneq(JSON_STRING, &t[i], "uid") == 0) {
/* We may want to do strtol() here to get numeric value */
printf("- UID: %.*s\n", t[i+1].end-t[i+1].start,
JSON_STRING + t[i+1].start);
i++;
} else if (jsoneq(JSON_STRING, &t[i], "groups") == 0) {
int j;
printf("- Groups:\n");
if (t[i+1].type != JSMN_ARRAY) {
continue; /* We expect groups to be an array of strings */
}
for (j = 0; j < t[i+1].size; j++) {
jsmntok_t *g = &t[i+j+2];
printf(" * %.*s\n", g->end - g->start, JSON_STRING + g->start);
}
i += t[i+1].size + 1;
} else {
printf("Unexpected key: %.*s\n", t[i].end-t[i].start,
JSON_STRING + t[i].start);
}
}
return 0;
}

View file

@ -1,15 +1,14 @@
#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,
static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser,
jsmntok_t *tokens, size_t num_tokens) {
jsmntok_t *tok;
if ((size_t)parser->toknext >= num_tokens) {
if (parser->toknext >= num_tokens) {
return NULL;
}
tok = &tokens[parser->toknext++];
@ -24,7 +23,7 @@ static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser,
/**
* Fills token type and boundaries.
*/
static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type,
static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type,
int start, int end) {
token->type = type;
token->start = start;
@ -36,13 +35,13 @@ static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type,
* 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) {
size_t len, jsmntok_t *tokens, size_t num_tokens) {
jsmntok_t *token;
int start;
start = parser->pos;
for (; js[parser->pos] != '\0'; parser->pos++) {
for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
switch (js[parser->pos]) {
#ifndef JSMN_STRICT
/* In strict mode primitive must be followed by "," or "}" or "]" */
@ -64,6 +63,10 @@ static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js,
#endif
found:
if (tokens == NULL) {
parser->pos--;
return 0;
}
token = jsmn_alloc_token(parser, tokens, num_tokens);
if (token == NULL) {
parser->pos = start;
@ -74,14 +77,14 @@ found:
token->parent = parser->toksuper;
#endif
parser->pos--;
return JSMN_SUCCESS;
return 0;
}
/**
* 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) {
size_t len, jsmntok_t *tokens, size_t num_tokens) {
jsmntok_t *token;
int start = parser->pos;
@ -89,11 +92,14 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
parser->pos++;
/* Skip starting quote */
for (; js[parser->pos] != '\0'; parser->pos++) {
for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
char c = js[parser->pos];
/* Quote: end of string */
if (c == '\"') {
if (tokens == NULL) {
return 0;
}
token = jsmn_alloc_token(parser, tokens, num_tokens);
if (token == NULL) {
parser->pos = start;
@ -103,13 +109,12 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
#ifdef JSMN_PARENT_LINKS
token->parent = parser->toksuper;
#endif
return JSMN_SUCCESS;
return 0;
}
/* Backslash: Quoted symbol expected */
if (c == '\\') {
int i = 0;
if (c == '\\' && parser->pos + 1 < len) {
int i;
parser->pos++;
switch (js[parser->pos]) {
/* Allowed escaped symbols */
@ -119,7 +124,7 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
/* Allows escaped symbol \uXXXX */
case 'u':
parser->pos++;
for(; i < 4 && js[parser->pos] != '\0'; i++) {
for(i = 0; i < 4 && parser->pos < len && 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 */
@ -145,19 +150,24 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
/**
* 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 jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
jsmntok_t *tokens, unsigned int num_tokens) {
jsmnerr_t r;
int i;
jsmntok_t *token;
int count = 0;
for (; js[parser->pos] != '\0'; parser->pos++) {
for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
char c;
jsmntype_t type;
c = js[parser->pos];
switch (c) {
case '{': case '[':
count++;
if (tokens == NULL) {
break;
}
token = jsmn_alloc_token(parser, tokens, num_tokens);
if (token == NULL)
return JSMN_ERROR_NOMEM;
@ -172,6 +182,8 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens,
parser->toksuper = parser->toknext - 1;
break;
case '}': case ']':
if (tokens == NULL)
break;
type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY);
#ifdef JSMN_PARENT_LINKS
if (parser->toknext < 1) {
@ -216,25 +228,56 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens,
#endif
break;
case '\"':
r = jsmn_parse_string(parser, js, tokens, num_tokens);
r = jsmn_parse_string(parser, js, len, tokens, num_tokens);
if (r < 0) return r;
if (parser->toksuper != -1)
count++;
if (parser->toksuper != -1 && tokens != NULL)
tokens[parser->toksuper].size++;
break;
case '\t' : case '\r' : case '\n' : case ':' : case ',': case ' ':
case '\t' : case '\r' : case '\n' : case ' ':
break;
case ':':
parser->toksuper = parser->toknext - 1;
break;
case ',':
if (tokens != NULL &&
tokens[parser->toksuper].type != JSMN_ARRAY &&
tokens[parser->toksuper].type != JSMN_OBJECT) {
#ifdef JSMN_PARENT_LINKS
parser->toksuper = tokens[parser->toksuper].parent;
#else
for (i = parser->toknext - 1; i >= 0; i--) {
if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) {
if (tokens[i].start != -1 && tokens[i].end == -1) {
parser->toksuper = i;
break;
}
}
}
#endif
}
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' :
/* And they must not be keys of the object */
if (tokens != NULL) {
jsmntok_t *t = &tokens[parser->toksuper];
if (t->type == JSMN_OBJECT ||
(t->type == JSMN_STRING && t->size != 0)) {
return JSMN_ERROR_INVAL;
}
}
#else
/* In non-strict mode every unquoted value is a primitive */
default:
#endif
r = jsmn_parse_primitive(parser, js, tokens, num_tokens);
r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens);
if (r < 0) return r;
if (parser->toksuper != -1)
count++;
if (parser->toksuper != -1 && tokens != NULL)
tokens[parser->toksuper].size++;
break;
@ -243,22 +286,22 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens,
default:
return JSMN_ERROR_INVAL;
#endif
}
}
if (tokens != NULL) {
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;
}
}
}
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;
return count;
}
/**
* Creates a new parser based over a given buffer with an array of tokens
* Creates a new parser based over a given buffer with an array of tokens
* available.
*/
void jsmn_init(jsmn_parser *parser) {

View file

@ -1,6 +1,12 @@
#ifndef __JSMN_H_
#define __JSMN_H_
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* JSON type identifier. Basic types are:
* o Object
@ -21,9 +27,7 @@ typedef enum {
/* 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
JSMN_ERROR_PART = -3
} jsmnerr_t;
/**
@ -48,7 +52,7 @@ typedef struct {
*/
typedef struct {
unsigned int pos; /* offset in the JSON string */
int toknext; /* next token to allocate */
unsigned int toknext; /* next token to allocate */
int toksuper; /* superior token node, e.g parent object or array */
} jsmn_parser;
@ -61,7 +65,11 @@ 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,
jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
jsmntok_t *tokens, unsigned int num_tokens);
#ifdef __cplusplus
}
#endif
#endif /* __JSMN_H_ */

View file

@ -2,8 +2,6 @@
#include <stdlib.h>
#include <string.h>
#include "jsmn.c"
static int test_passed = 0;
static int test_failed = 0;
@ -40,6 +38,9 @@ static void test(int (*func)(void), const char *name) {
printf("start: %d, end: %d, type: %d, size: %d\n", \
(t).start, (t).end, (t).type, (t).size)
#define JSMN_STRICT
#include "jsmn.c"
int test_empty() {
const char *js;
int r;
@ -48,30 +49,30 @@ int test_empty() {
js = "{}";
jsmn_init(&p);
r = jsmn_parse(&p, js, t, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), t, 10);
check(r >= 0);
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);
r = jsmn_parse(&p, js, strlen(js), t, 10);
check(r >= 0);
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);
r = jsmn_parse(&p, js, strlen(js), t, 10);
check(r >= 0);
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);
r = jsmn_parse(&p, js, strlen(js), t, 10);
check(r >= 0);
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);
@ -87,8 +88,8 @@ int test_simple() {
js = "{\"a\": 0}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
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));
@ -99,59 +100,59 @@ int test_simple() {
jsmn_init(&p);
js = "[\"a\":{},\"b\":{}]";
r = jsmn_parse(&p, js, tokens, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
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);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
return 0;
}
int test_primitive() {
#ifndef JSMN_STRICT
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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && tok[0].type == JSMN_STRING
&& tok[1].type == JSMN_PRIMITIVE);
check(TOKEN_STRING(js, tok[0], "nullVar"));
check(TOKEN_STRING(js, tok[1], "null"));
@ -167,24 +168,24 @@ int test_string() {
js = "\"strVar\" : \"hello world\"";
jsmn_init(&p);
r = jsmn_parse(&p, js, tok, 10);
check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && tok[0].type == JSMN_STRING
&& tok[1].type == JSMN_STRING);
check(TOKEN_STRING(js, tok[0], "strVar"));
check(TOKEN_STRING(js, tok[1], ""));
@ -200,27 +201,37 @@ int test_partial_string() {
jsmn_init(&p);
js = "\"x\": \"va";
r = jsmn_parse(&p, js, tok, 10);
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING);
check(TOKEN_STRING(js, tok[0], "x"));
check(p.toknext == 1);
jsmn_init(&p);
char js_slash[9] = "\"x\": \"va\\";
r = jsmn_parse(&p, js_slash, sizeof(js_slash), tok, 10);
check(r == JSMN_ERROR_PART);
jsmn_init(&p);
char js_unicode[10] = "\"x\": \"va\\u";
r = jsmn_parse(&p, js_unicode, sizeof(js_unicode), tok, 10);
check(r == JSMN_ERROR_PART);
js = "\"x\": \"valu";
r = jsmn_parse(&p, js, tok, 10);
r = jsmn_parse(&p, js, strlen(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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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"));
@ -241,8 +252,8 @@ int test_unquoted_keys() {
jsmn_init(&p);
js = "key1: \"value\"\nkey2 : 123";
r = jsmn_parse(&p, js, tok, 10);
check(r == JSMN_SUCCESS && tok[0].type == JSMN_PRIMITIVE
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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"));
@ -261,19 +272,19 @@ int test_partial_array() {
jsmn_init(&p);
js = " [ 1, true, ";
r = jsmn_parse(&p, js, tok, 10);
check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY
r = jsmn_parse(&p, js, strlen(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
r = jsmn_parse(&p, js, strlen(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
r = jsmn_parse(&p, js, strlen(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);
@ -281,8 +292,8 @@ int test_partial_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
r = jsmn_parse(&p, js, strlen(js), tok, 10);
check(r >= 0 && 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);
@ -304,13 +315,13 @@ int test_array_nomem() {
jsmn_init(&p);
memset(toksmall, 0, sizeof(toksmall));
memset(toklarge, 0, sizeof(toklarge));
r = jsmn_parse(&p, js, toksmall, i);
r = jsmn_parse(&p, js, strlen(js), toksmall, i);
check(r == JSMN_ERROR_NOMEM);
memcpy(toklarge, toksmall, sizeof(toksmall));
r = jsmn_parse(&p, js, toklarge, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), toklarge, 10);
check(r >= 0);
check(toklarge[0].type == JSMN_ARRAY && toklarge[0].size == 3);
check(toklarge[3].type == JSMN_ARRAY && toklarge[3].size == 2);
@ -319,7 +330,6 @@ int test_array_nomem() {
}
int test_objects_arrays() {
int i;
int r;
jsmn_parser p;
jsmntok_t tokens[10];
@ -327,27 +337,60 @@ int test_objects_arrays() {
js = "[10}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "[10]";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
js = "{\"a\": 1]";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
r = jsmn_parse(&p, js, strlen(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);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
return 0;
}
int test_issue_22() {
int r;
jsmn_parser p;
jsmntok_t tokens[128];
const char *js;
js = "{ \"height\":10, \"layers\":[ { \"data\":[6,6], \"height\":10, "
"\"name\":\"Calque de Tile 1\", \"opacity\":1, \"type\":\"tilelayer\", "
"\"visible\":true, \"width\":10, \"x\":0, \"y\":0 }], "
"\"orientation\":\"orthogonal\", \"properties\": { }, \"tileheight\":32, "
"\"tilesets\":[ { \"firstgid\":1, \"image\":\"..\\/images\\/tiles.png\", "
"\"imageheight\":64, \"imagewidth\":160, \"margin\":0, \"name\":\"Tiles\", "
"\"properties\":{}, \"spacing\":0, \"tileheight\":32, \"tilewidth\":32 }], "
"\"tilewidth\":32, \"version\":1, \"width\":10 }";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 128);
check(r >= 0);
#if 0
for (i = 1; tokens[i].end < tokens[0].end; i++) {
if (tokens[i].type == JSMN_STRING || tokens[i].type == JSMN_PRIMITIVE) {
printf("%.*s\n", tokens[i].end - tokens[i].start, js + tokens[i].start);
} else if (tokens[i].type == JSMN_ARRAY) {
printf("[%d elems]\n", tokens[i].size);
} else if (tokens[i].type == JSMN_OBJECT) {
printf("{%d elems}\n", tokens[i].size);
} else {
TOKEN_PRINT(tokens[i]);
}
}
#endif
return 0;
}
int test_unicode_characters() {
jsmn_parser p;
jsmntok_t tokens[10];
@ -356,42 +399,193 @@ int test_unicode_characters() {
int r;
js = "{\"a\":\"\\uAbcD\"}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
js = "{\"a\":\"str\\u0000\"}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
js = "{\"a\":\"\\uFFFFstr\"}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
check(r == JSMN_SUCCESS);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
js = "{\"a\":\"str\\uFFGFstr\"}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "{\"a\":\"str\\u@FfF\"}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "{\"a\":[\"\\u028\"]}";
jsmn_init(&p);
r = jsmn_parse(&p, js, tokens, 10);
r = jsmn_parse(&p, js, strlen(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);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r >= 0);
return 0;
}
int test_input_length() {
const char *js;
int r;
jsmn_parser p;
jsmntok_t tokens[10];
js = "{\"a\": 0}garbage";
jsmn_init(&p);
r = jsmn_parse(&p, js, 8, tokens, 10);
check(r == 3);
check(TOKEN_STRING(js, tokens[0], "{\"a\": 0}"));
check(TOKEN_STRING(js, tokens[1], "a"));
check(TOKEN_STRING(js, tokens[2], "0"));
return 0;
}
int test_count() {
jsmn_parser p;
const char *js;
js = "{}";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 1);
js = "[]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 1);
js = "[[]]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 2);
js = "[[], []]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 3);
js = "[[], []]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 3);
js = "[[], [[]], [[], []]]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 7);
js = "[\"a\", [[], []]]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 5);
js = "[[], \"[], [[]]\", [[]]]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 5);
js = "[1, 2, 3]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 4);
js = "[1, 2, [3, \"a\"], null]";
jsmn_init(&p);
check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 7);
return 0;
}
int test_keyvalue() {
const char *js;
int r;
jsmn_parser p;
jsmntok_t tokens[10];
js = "{\"a\": 0, \"b\": \"c\"}";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == 5);
check(tokens[0].size == 2); /* two keys */
check(tokens[1].size == 1 && tokens[3].size == 1); /* one value per key */
check(tokens[2].size == 0 && tokens[4].size == 0); /* values have zero size */
js = "{\"a\"\n0}";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "{\"a\", 0}";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "{\"a\": {2}}";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "{\"a\": {2: 3}}";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
js = "{\"a\": {\"a\": 2 3}}";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == JSMN_ERROR_INVAL);
return 0;
}
/** A huge redefinition of everything to include jsmn in non-script mode */
#define jsmn_init jsmn_init_nonstrict
#define jsmn_parse jsmn_parse_nonstrict
#define jsmn_parser jsmn_parser_nonstrict
#define jsmn_alloc_token jsmn_alloc_token_nonstrict
#define jsmn_fill_token jsmn_fill_token_nonstrict
#define jsmn_parse_primitive jsmn_parse_primitive_nonstrict
#define jsmn_parse_string jsmn_parse_string_nonstrict
#define jsmntype_t jsmntype_nonstrict_t
#define jsmnerr_t jsmnerr_nonstrict_t
#define jsmntok_t jsmntok_nonstrict_t
#define JSMN_PRIMITIVE JSMN_PRIMITIVE_NONSTRICT
#define JSMN_OBJECT JSMN_OBJECT_NONSTRICT
#define JSMN_ARRAY JSMN_ARRAY_NONSTRICT
#define JSMN_STRING JSMN_STRING_NONSTRICT
#define JSMN_ERROR_NOMEM JSMN_ERROR_NOMEM_NONSTRICT
#define JSMN_ERROR_INVAL JSMN_ERROR_INVAL_NONSTRICT
#define JSMN_ERROR_PART JSMN_ERROR_PART_NONSTRICT
#undef __JSMN_H_
#undef JSMN_STRICT
#include "jsmn.c"
int test_nonstrict() {
const char *js;
int r;
jsmn_parser p;
jsmntok_t tokens[10];
js = "a: 0garbage";
jsmn_init(&p);
r = jsmn_parse(&p, js, 4, tokens, 10);
check(r == 2);
check(TOKEN_STRING(js, tokens[0], "a"));
check(TOKEN_STRING(js, tokens[1], "0"));
js = "Day : 26\nMonth : Sep\n\nYear: 12";
jsmn_init(&p);
r = jsmn_parse(&p, js, strlen(js), tokens, 10);
check(r == 6);
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");
@ -403,6 +597,11 @@ int main() {
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");
test(test_input_length, "test strings that are not null-terminated");
test(test_issue_22, "test issue #22");
test(test_count, "test tokens count estimation");
test(test_nonstrict, "test for non-strict mode");
test(test_keyvalue, "test for keys/values");
printf("\nPASSED: %d\nFAILED: %d\n", test_passed, test_failed);
return 0;
}

View file

@ -89,6 +89,7 @@ libntp_a_SRCS = \
numtohost.c \
octtoint.c \
prettydate.c \
refidsmear.c \
recvbuff.c \
refnumtoa.c \
snprintf.c \

File diff suppressed because it is too large Load diff

View file

@ -60,6 +60,59 @@ ereallocz(
return mem;
}
/* oreallocarray.c is licensed under the following:
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
*
* 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 <stdint.h>
/*
* This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
* if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
*/
#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4))
void *
oreallocarray(
void *optr,
size_t nmemb,
size_t size
#ifdef EREALLOC_CALLSITE /* ntp_malloc.h */
,
const char * file,
int line
#endif
)
{
if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
nmemb > 0 && SIZE_MAX / nmemb < size) {
#ifndef EREALLOC_CALLSITE
msyslog(LOG_ERR, "fatal allocation size overflow");
#else
msyslog(LOG_ERR,
"fatal allocation size overflow %s line %d",
file, line);
#endif
exit(1);
}
#ifndef EREALLOC_CALLSITE
return ereallocz(optr, (size * nmemb), 0, FALSE);
#else
return ereallocz(optr, (size * nmemb), 0, FALSE, file, line);
#endif
}
char *
estrdup_impl(

View file

@ -0,0 +1,58 @@
#include <config.h>
#include <ntp.h>
#include <ntp_fp.h>
#include <refidsmear.h>
/*
* we want to test a refid format of:
* 254.x.y.x
*
* where x.y.z are 24 bits containing 2 (signed) integer bits
* and 22 fractional bits.
*
*/
l_fp
convertRefIDToLFP(uint32_t r)
{
l_fp temp;
r = ntohl(r);
// printf("%03d %08x: ", (r >> 24) & 0xFF, (r & 0x00FFFFFF) );
temp.l_uf = (r << 10); /* 22 fractional bits */
temp.l_ui = (r >> 22) & 0x3;
temp.l_ui |= ~(temp.l_ui & 2) + 1;
return temp;
}
uint32_t
convertLFPToRefID(l_fp num)
{
uint32_t temp;
/* round the input with the highest bit to shift out from the
* fraction, then keep just two bits from the integral part.
*
* TODO: check for overflows; should we clamp/saturate or just
* complain?
*/
L_ADDUF(&num, 0x200);
num.l_ui &= 3;
/* combine integral and fractional part to 24 bits */
temp = (num.l_ui << 22) | (num.l_uf >> 10);
/* put in the leading 254.0.0.0 */
temp |= UINT32_C(0xFE000000);
// printf("%03d %08x: ", (temp >> 24) & 0xFF, (temp & 0x00FFFFFF) );
return htonl(temp);
}

View file

@ -1,7 +1,8 @@
#include <config.h>
#include <string.h>
#include <ntp_assert.h>
#include "ntp_malloc.h"
#include <string.h>
#ifndef HAVE_STRDUP
@ -15,15 +16,13 @@ strdup(
size_t octets;
char * cp;
if (s) {
octets = 1 + strlen(s);
cp = malloc(octets);
if (NULL != cp)
memcpy(cp, s, octets);
else
cp = NULL;
REQUIRE(s);
octets = strlen(s) + 1;
if ((cp = malloc(octets)) == NULL)
return NULL;
memcpy(cp, s, octets);
return(cp);
return cp;
}
#else
int strdup_c_nonempty_compilation_unit;

View file

@ -8,6 +8,7 @@
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <sys/wait.h>
#include "iosignal.h"
#include "ntp_stdlib.h"
@ -111,6 +112,23 @@ interrupt_worker_sleep(void)
}
/*
* harvest_child_status() runs in the parent.
*/
static void
harvest_child_status(
blocking_child * c
)
{
if (c->pid)
{
/* Wait on the child so it can finish terminating */
if (waitpid(c->pid, NULL, 0) == c->pid)
TRACE(4, ("harvested child %d\n", c->pid));
else msyslog(LOG_ERR, "error waiting on child %d: %m", c->pid);
}
}
/*
* req_child_exit() runs in the parent.
*/
@ -124,6 +142,8 @@ req_child_exit(
c->req_write_pipe = -1;
return 0;
}
/* Closing the pipe forces the child to exit */
harvest_child_status(c);
return -1;
}
@ -136,10 +156,7 @@ cleanup_after_child(
blocking_child * c
)
{
if (-1 != c->req_write_pipe) {
close(c->req_write_pipe);
c->req_write_pipe = -1;
}
harvest_child_status(c);
if (-1 != c->resp_read_pipe) {
(*addremove_io_fd)(c->resp_read_pipe, c->ispipe, TRUE);
close(c->resp_read_pipe);
@ -209,6 +226,8 @@ send_blocking_req_internal(
"send_blocking_req_internal: short write %d of %d",
rc, octets);
/* Fatal error. Clean up the child process. */
req_child_exit(c);
exit(1); /* otherwise would be return -1 */
}

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -17,6 +16,61 @@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -36,9 +90,6 @@ POST_UNINSTALL = :
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)/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 \
@ -70,6 +121,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -79,18 +131,17 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
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 = @
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libparse_a_AR = $(AR) $(ARFLAGS)
libparse_a_LIBADD =
am__objects_1 =
@ -119,12 +170,25 @@ 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 = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
parsestreams_SOURCES = parsestreams.c
parsestreams_OBJECTS = parsestreams.$(OBJEXT)
parsestreams_LDADD = $(LDADD)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
@ -135,25 +199,49 @@ 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_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
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 " $@;
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \
parsesolaris.c parsestreams.c
DIST_SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \
parsesolaris.c parsestreams.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
$(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -204,6 +292,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -320,6 +409,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -506,7 +596,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libparse/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign libparse/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -515,6 +604,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@ -527,11 +617,13 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libparse.a: $(libparse_a_OBJECTS) $(libparse_a_DEPENDENCIES)
libparse.a: $(libparse_a_OBJECTS) $(libparse_a_DEPENDENCIES) $(EXTRA_libparse_a_DEPENDENCIES)
$(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)
libparse_kernel.a: $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_DEPENDENCIES) $(EXTRA_libparse_kernel_a_DEPENDENCIES)
$(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
@ -544,10 +636,12 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
parsesolaris$(EXEEXT): $(parsesolaris_OBJECTS) $(parsesolaris_DEPENDENCIES)
parsesolaris$(EXEEXT): $(parsesolaris_OBJECTS) $(parsesolaris_DEPENDENCIES) $(EXTRA_parsesolaris_DEPENDENCIES)
@rm -f parsesolaris$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(parsesolaris_OBJECTS) $(parsesolaris_LDADD) $(LIBS)
parsestreams$(EXEEXT): $(parsestreams_OBJECTS) $(parsestreams_DEPENDENCIES)
parsestreams$(EXEEXT): $(parsestreams_OBJECTS) $(parsestreams_DEPENDENCIES) $(EXTRA_parsestreams_DEPENDENCIES)
@rm -f parsestreams$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(parsestreams_OBJECTS) $(parsestreams_LDADD) $(LIBS)
@ -584,26 +678,23 @@ distclean-compile:
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@ -611,26 +702,15 @@ mostlyclean-libtool:
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
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -642,15 +722,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -659,6 +735,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -709,10 +800,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -799,19 +895,21 @@ uninstall-am:
.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS 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 \
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS \
cscopelist-am ctags ctags-am 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
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
vphack:

View file

@ -5,7 +5,7 @@
*
* Meinberg clock support
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1995-2015 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
@ -400,7 +400,7 @@ cvt_meinberg(
if (format->flags & MBG_EXTENDED)
{
clock_time->flags |= PARSEB_S_ANTENNA;
clock_time->flags |= PARSEB_S_CALLBIT;
/*
* DCF77 does not encode the direction -

View file

@ -5,7 +5,7 @@
*
* Raw DCF77 pulse clock support
*
* Copyright (c) 1995-2006 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1995-2015 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
@ -41,6 +41,7 @@
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_RAWDCF)
#include "ntp_fp.h"
#include "timevalops.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
@ -107,7 +108,9 @@ static parse_cvt_fnc_t cvt_rawdcf;
static parse_inp_fnc_t inp_rawdcf;
typedef struct last_tcode {
time_t tcode; /* last converted time code */
time_t tcode; /* last converted time code */
timestamp_t tminute; /* sample time for minute start */
timestamp_t timeout; /* last timeout timestamp */
} last_tcode_t;
#define BUFFER_MAX 61
@ -230,14 +233,14 @@ convert_rawdcf(
const unsigned char *c = dcfprm->zerobits;
int i;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%s\"\n", buffer));
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%.*s\"\n", size, buffer));
if (size < 57)
{
#ifndef PARSEKERNEL
msyslog(LOG_ERR, "parse: convert_rawdcf: INCOMPLETE DATA - time code only has %d bits", size);
#endif
return CVT_NONE;
return CVT_FAIL|CVT_BADFMT;
}
for (i = 0; i < size; i++)
@ -250,7 +253,7 @@ convert_rawdcf(
#ifndef PARSEKERNEL
msyslog(LOG_ERR, "parse: convert_rawdcf: BAD DATA - no conversion");
#endif
return CVT_NONE;
return CVT_FAIL|CVT_BADFMT;
}
if (*b) b++;
if (*c) c++;
@ -270,7 +273,7 @@ convert_rawdcf(
*/
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: parity check passed\n"));
clock_time->flags = PARSEB_S_ANTENNA|PARSEB_S_LEAP;
clock_time->flags = PARSEB_S_CALLBIT|PARSEB_S_LEAP;
clock_time->utctime= 0;
clock_time->usecond= 0;
clock_time->second = 0;
@ -310,7 +313,7 @@ convert_rawdcf(
if (ext_bf(buffer, DCF_R, dcfprm->zerobits))
clock_time->flags |= PARSEB_CALLBIT;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: TIME CODE OK: %d:%d, %d.%d.%d, flags 0x%lx\n",
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: TIME CODE OK: %02d:%02d, %02d.%02d.%02d, flags 0x%lx\n",
(int)clock_time->hour, (int)clock_time->minute, (int)clock_time->day, (int)clock_time->month,(int) clock_time->year,
(u_long)clock_time->flags));
return CVT_OK;
@ -321,7 +324,7 @@ convert_rawdcf(
* bad format - not for us
*/
#ifndef PARSEKERNEL
msyslog(LOG_ERR, "parse: convert_rawdcf: parity check FAILED for \"%s\"", buffer);
msyslog(LOG_ERR, "parse: convert_rawdcf: start bit / parity check FAILED for \"%.*s\"", size, buffer);
#endif
return CVT_FAIL|CVT_BADFMT;
}
@ -484,6 +487,8 @@ cvt_rawdcf(
if (*c) c++;
}
*s = '\0';
if (rtc == CVT_NONE)
{
rtc = convert_rawdcf(buffer, size, &dcfparameter, clock_time);
@ -494,13 +499,15 @@ cvt_rawdcf(
newtime = parse_to_unixtime(clock_time, &rtc);
if ((rtc == CVT_OK) && t)
{
if ((newtime - t->tcode) == 60) /* guard against multi bit errors */
if ((newtime - t->tcode) <= 600) /* require a successful telegram within last 10 minutes */
{
parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: recent timestamp check OK\n"));
clock_time->utctime = newtime;
}
else
{
rtc = CVT_FAIL|CVT_BADTIME;
parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: recent timestamp check FAIL - ignore timestamp\n"));
rtc = CVT_SKIP;
}
t->tcode = newtime;
}
@ -533,13 +540,63 @@ pps_rawdcf(
return CVT_NONE;
}
static long
calc_usecdiff(
timestamp_t *ref,
timestamp_t *base,
long offset
)
{
struct timeval delta;
long delta_usec = 0;
#ifdef PARSEKERNEL
delta.tv_sec = ref->tv.tv_sec - offset - base->tv.tv_sec;
delta.tv_usec = ref->tv.tv_usec - base->tv.tv_usec;
if (delta.tv_usec < 0)
{
delta.tv_sec -= 1;
delta.tv_usec += 1000000;
}
#else
l_fp delt;
delt = ref->fp;
delt.l_i -= offset;
L_SUB(&delt, &base->fp);
TSTOTV(&delt, &delta);
#endif
delta_usec = 1000000 * (int32_t)delta.tv_sec + delta.tv_usec;
return delta_usec;
}
static u_long
snt_rawdcf(
parse_t *parseio,
timestamp_t *ptime
)
{
if ((parseio->parse_dtime.parse_status & CVT_MASK) == CVT_OK)
/*
* only synthesize if all of following conditions are met:
* - CVT_OK parse_status (we have a time stamp base)
* - ABS(ptime - tminute - (parse_index - 1) sec) < 500ms (spaced by 1 sec +- 500ms)
* - minute marker is available (confirms minute raster as base)
*/
last_tcode_t *t = (last_tcode_t *)parseio->parse_pdata;
long delta_usec = -1;
if (t != NULL && t->tminute.tv.tv_sec != 0) {
delta_usec = calc_usecdiff(ptime, &t->tminute, parseio->parse_index - 1);
if (delta_usec < 0)
delta_usec = -delta_usec;
}
parseprintf(DD_RAWDCF,("parse: snt_rawdcf: synth for offset %d seconds - absolute usec error %ld\n",
parseio->parse_index - 1, delta_usec));
if (((parseio->parse_dtime.parse_status & CVT_MASK) == CVT_OK) &&
(delta_usec < 500000 && delta_usec >= 0)) /* only if minute marker is available */
{
parseio->parse_dtime.parse_stime = *ptime;
@ -576,10 +633,43 @@ inp_rawdcf(
if (parse_timedout(parseio, tstamp, &timeout))
{
parseprintf(DD_PARSE, ("inp_rawdcf: time out seen\n"));
last_tcode_t *t = (last_tcode_t *)parseio->parse_pdata;
long delta_usec;
parseprintf(DD_RAWDCF, ("inp_rawdcf: time out seen\n"));
/* finish collection */
(void) parse_end(parseio);
if (t != NULL)
{
/* remember minute start sample time if timeouts occur in minute raster */
if (t->timeout.tv.tv_sec != 0)
{
delta_usec = calc_usecdiff(tstamp, &t->timeout, 60);
if (delta_usec < 0)
delta_usec = -delta_usec;
}
else
{
delta_usec = -1;
}
if (delta_usec < 500000 && delta_usec >= 0)
{
parseprintf(DD_RAWDCF, ("inp_rawdcf: timeout time difference %ld usec - minute marker set\n", delta_usec));
/* collect minute markers only if spaced by 60 seconds */
t->tminute = *tstamp;
}
else
{
parseprintf(DD_RAWDCF, ("inp_rawdcf: timeout time difference %ld usec - minute marker cleared\n", delta_usec));
memset((char *)&t->tminute, 0, sizeof(t->tminute));
}
t->timeout = *tstamp;
}
(void) parse_addchar(parseio, ch);
/* pass up to higher layers */
return PARSE_INP_TIME;
}
else

View file

@ -6,7 +6,7 @@
* Schmid clock support
* based on information and testing from Adam W. Feigin et. al (Swisstime iis.ethz.ch)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1995-2015 by Frank Kardel <kardel <AT> ntp.org>
* Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
@ -184,7 +184,7 @@ cvt_schmid(
}
}
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_ANTENNA;
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_CALLBIT;
return CVT_OK;
}

View file

@ -697,14 +697,14 @@ timepacket(
{
case CVT_FAIL:
parseio->parse_badformat++;
break;
return cvtrtc;
case CVT_NONE:
/*
* too bad - pretend bad format
*/
parseio->parse_badformat++;
break;
return CVT_NONE;
case CVT_OK:
break;

View file

@ -232,6 +232,7 @@ libntpd_a_SOURCES = \
ntp_timer.c \
ntp_util.c \
ppsapi_timepps.h \
rc_cmdlength.c \
refclock_acts.c \
refclock_arbiter.c \
refclock_arc.c \

View file

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.15 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.
# Copyright (C) 1994-2014 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.
@ -23,6 +22,61 @@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -43,11 +97,6 @@ build_triplet = @build@
host_triplet = @host@
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 \
@ -79,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@ -88,18 +138,18 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = complete.conf
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = @ARFLAGS@
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 = @
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libntpd_a_AR = $(AR) $(ARFLAGS)
libntpd_a_LIBADD =
am__objects_1 =
@ -109,28 +159,28 @@ am_libntpd_a_OBJECTS = cmd_args.$(OBJEXT) ntp_control.$(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) \
refclock_jjy.$(OBJEXT) refclock_jupiter.$(OBJEXT) \
refclock_leitch.$(OBJEXT) refclock_local.$(OBJEXT) \
refclock_mx4200.$(OBJEXT) refclock_neoclock4x.$(OBJEXT) \
refclock_nmea.$(OBJEXT) refclock_oncore.$(OBJEXT) \
refclock_palisade.$(OBJEXT) refclock_parse.$(OBJEXT) \
refclock_pcf.$(OBJEXT) refclock_pst.$(OBJEXT) \
refclock_ripencc.$(OBJEXT) refclock_shm.$(OBJEXT) \
refclock_tpro.$(OBJEXT) refclock_true.$(OBJEXT) \
refclock_tt560.$(OBJEXT) refclock_ulink.$(OBJEXT) \
refclock_wwv.$(OBJEXT) refclock_wwvb.$(OBJEXT) \
refclock_zyfer.$(OBJEXT) refclock_tsyncpci.$(OBJEXT) \
$(am__objects_1)
ntp_util.$(OBJEXT) rc_cmdlength.$(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) refclock_jjy.$(OBJEXT) \
refclock_jupiter.$(OBJEXT) refclock_leitch.$(OBJEXT) \
refclock_local.$(OBJEXT) refclock_mx4200.$(OBJEXT) \
refclock_neoclock4x.$(OBJEXT) refclock_nmea.$(OBJEXT) \
refclock_oncore.$(OBJEXT) refclock_palisade.$(OBJEXT) \
refclock_parse.$(OBJEXT) refclock_pcf.$(OBJEXT) \
refclock_pst.$(OBJEXT) refclock_ripencc.$(OBJEXT) \
refclock_shm.$(OBJEXT) refclock_tpro.$(OBJEXT) \
refclock_true.$(OBJEXT) refclock_tt560.$(OBJEXT) \
refclock_ulink.$(OBJEXT) refclock_wwv.$(OBJEXT) \
refclock_wwvb.$(OBJEXT) refclock_zyfer.$(OBJEXT) \
refclock_tsyncpci.$(OBJEXT) $(am__objects_1)
libntpd_a_OBJECTS = $(am_libntpd_a_OBJECTS)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
@ -144,9 +194,10 @@ 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 = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
keyword_gen_SOURCES = keyword-gen.c
keyword_gen_OBJECTS = keyword-gen.$(OBJEXT)
keyword_gen_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
@ -169,6 +220,18 @@ am_ntpdsim_OBJECTS = $(am__objects_2) ntpdsim-ntp_prio_q.$(OBJEXT) \
ntpdsim_OBJECTS = $(am_ntpdsim_OBJECTS)
ntpdsim_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntpsim.a \
$(am__DEPENDENCIES_3)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
@ -179,30 +242,37 @@ 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_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
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 " $@;
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
-e s/c++$$/h++/ -e s/c$$/h/
YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
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 " $@;
$(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
AM_V_YACC = $(am__v_YACC_@AM_V@)
am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
am__v_YACC_0 = @echo " YACC " $@;
am__v_YACC_1 =
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 \
$(ntpd_SOURCES) $(ntpdsim_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -224,6 +294,12 @@ 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__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man1dir = $(mandir)/man1
man5dir = $(mandir)/man5
man8dir = $(mandir)/man8
@ -231,8 +307,32 @@ NROFF = nroff
MANS = $(man1_MANS) $(man5_MANS) $(man8_MANS) $(man_MANS)
DATA = $(html_DATA) $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(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 \
$(top_srcdir)/sntp/libevent/build-aux/depcomp \
$(top_srcdir)/sntp/libevent/build-aux/ylwrap ntp_parser.c \
ntp_parser.h
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@ -283,6 +383,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@ -399,6 +500,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@ -675,6 +777,7 @@ libntpd_a_SOURCES = \
ntp_timer.c \
ntp_util.c \
ppsapi_timepps.h \
rc_cmdlength.c \
refclock_acts.c \
refclock_arbiter.c \
refclock_arc.c \
@ -739,7 +842,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_sr
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ntpd/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign ntpd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -748,6 +850,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@ -762,20 +865,26 @@ complete.conf: $(top_builddir)/config.status $(srcdir)/complete.conf.in
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libntpd.a: $(libntpd_a_OBJECTS) $(libntpd_a_DEPENDENCIES)
libntpd.a: $(libntpd_a_OBJECTS) $(libntpd_a_DEPENDENCIES) $(EXTRA_libntpd_a_DEPENDENCIES)
$(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)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
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; \
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|.*|.|' \
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 } \
@ -796,7 +905,8 @@ uninstall-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
@ -820,14 +930,19 @@ clean-checkPROGRAMS:
rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
fi; \
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; \
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|.*|.|' \
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 } \
@ -848,7 +963,8 @@ uninstall-libexecPROGRAMS:
@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)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
@ -863,14 +979,19 @@ clean-libexecPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
fi; \
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; \
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|.*|.|' \
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 } \
@ -891,7 +1012,8 @@ uninstall-sbinPROGRAMS:
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
@ -904,21 +1026,23 @@ clean-sbinPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES) $(EXTRA_check_y2k_DEPENDENCIES)
@rm -f check_y2k$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
keyword-gen$(EXEEXT): $(keyword_gen_OBJECTS) $(keyword_gen_DEPENDENCIES)
keyword-gen$(EXEEXT): $(keyword_gen_OBJECTS) $(keyword_gen_DEPENDENCIES) $(EXTRA_keyword_gen_DEPENDENCIES)
@rm -f keyword-gen$(EXEEXT)
$(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; \
$(MAKE) $(AM_MAKEFLAGS) ntp_parser.c; \
else :; fi
ntpd$(EXEEXT): $(ntpd_OBJECTS) $(ntpd_DEPENDENCIES)
@if test ! -f $@; then rm -f ntp_parser.c; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) ntp_parser.c; else :; fi
ntpd$(EXEEXT): $(ntpd_OBJECTS) $(ntpd_DEPENDENCIES) $(EXTRA_ntpd_DEPENDENCIES)
@rm -f ntpd$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS)
ntpdsim$(EXEEXT): $(ntpdsim_OBJECTS) $(ntpdsim_DEPENDENCIES)
ntpdsim$(EXEEXT): $(ntpdsim_OBJECTS) $(ntpdsim_DEPENDENCIES) $(EXTRA_ntpdsim_DEPENDENCIES)
@rm -f ntpdsim$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ntpdsim_OBJECTS) $(ntpdsim_LDADD) $(LIBS)
@ -959,6 +1083,7 @@ distclean-compile:
@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@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpsim.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rc_cmdlength.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_acts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arbiter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arc.Po@am__quote@
@ -1004,157 +1129,138 @@ distclean-compile:
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
ntpdsim-ntp_config.o: ntp_config.c
@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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config.o `test -f 'ntp_config.c' || echo '$(srcdir)/'`ntp_config.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io.o `test -f 'ntp_io.c' || echo '$(srcdir)/'`ntp_io.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_parser.o `test -f 'ntp_parser.c' || echo '$(srcdir)/'`ntp_parser.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_scanner.o `test -f 'ntp_scanner.c' || echo '$(srcdir)/'`ntp_scanner.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd.o `test -f 'ntpd.c' || echo '$(srcdir)/'`ntpd.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts.o `test -f 'ntpd-opts.c' || echo '$(srcdir)/'`ntpd-opts.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(AM_V_CC)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
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(AM_V_CC)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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim.o `test -f 'ntpsim.c' || echo '$(srcdir)/'`ntpsim.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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@ $(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@ $(AM_V_CC)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) $(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`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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_V_YACC)$(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 `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
mostlyclean-libtool:
-rm -f *.lo
@ -1163,11 +1269,18 @@ 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'; \
@list1='$(man1_MANS)'; \
list2='$(man_MANS)'; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -1196,16 +1309,21 @@ uninstall-man1:
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; }
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
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'; \
@list1='$(man5_MANS)'; \
list2='$(man_MANS)'; \
test -n "$(man5dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.5[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -1234,16 +1352,21 @@ uninstall-man5:
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; }
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
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'; \
@list1='$(man8_MANS)'; \
list2='$(man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -1272,13 +1395,14 @@ uninstall-man8:
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; }
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
install-htmlDATA: $(html_DATA)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -1292,30 +1416,17 @@ 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
dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
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
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
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; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -1327,15 +1438,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$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; }; }'`; \
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -1344,24 +1451,26 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
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)'; \
@ -1412,10 +1521,15 @@ install-am: all-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
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -1512,27 +1626,29 @@ 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 \
.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
clean-binPROGRAMS clean-checkPROGRAMS 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 \
clean-sbinPROGRAMS cscopelist-am ctags ctags-am 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 \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
uninstall-man1 uninstall-man5 uninstall-man8 \
uninstall-sbinPROGRAMS
.PRECIOUS: Makefile
vphack:
test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .

View file

@ -2,8 +2,10 @@ saveconfigdir "/etc/ntp/conf"
driftfile "/etc/ntp.drift" 1e-7
logfile "/var/log/ntp.log"
leapfile "/etc/ntp.leapseconds"
@HAVE_LEAPSMEARINTERVAL@
nonvolatile 1e-7
ident "udent"
dscp 46
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 clockstats cryptostats loopstats peerstats protostats rawstats sysstats timingstats

View file

@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
# It has been AutoGen-ed April 7, 2015 at 04:25:50 AM by AutoGen 5.18.5pre4
# It has been AutoGen-ed June 29, 2015 at 04:30:28 PM by AutoGen 5.18.5
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@ -2291,6 +2291,9 @@ This implies that
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{dscp} @kbd{value}
This option specifies the Differentiated Services Control Point (DSCP) value,
a 6-bit code. The default value is 46, signifying Expedited Forwarding.
@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.
@ -2376,6 +2379,19 @@ 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{leapsmearinterval} @kbd{seconds}
This EXPERIMENTAL option is only available if
@code{ntpd(1ntpdmdoc)}
was built with the
@code{--enable-leap-smear}
option to the
@code{configure}
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
@item @code{logconfig} @kbd{configkeyword}
This command controls the amount and type of output written to
the system
@ -2570,11 +2586,11 @@ 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).
@item @code{filenum} @kbd{Nfiledescriptors}
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
@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

View file

@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
# It has been AutoGen-ed April 7, 2015 at 04:25:52 AM by AutoGen 5.18.5pre4
# It has been AutoGen-ed June 29, 2015 at 04:30:31 PM by AutoGen 5.18.5
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore

View file

@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
# It has been AutoGen-ed April 7, 2015 at 04:25:54 AM by AutoGen 5.18.5pre4
# It has been AutoGen-ed June 29, 2015 at 04:30:33 PM by AutoGen 5.18.5
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
ntpd - NTP daemon program - Ver. 4.2.8p2
ntpd - NTP daemon program - Ver. 4.2.8p3
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description

View file

@ -1 +1 @@
* Generated 2015-03-16 09:05:44 UTC diff_ignore_line
* Generated 2015-06-25 03:57:00 UTC diff_ignore_line

View file

@ -46,6 +46,7 @@ struct key_tok ntp_keywords[] = {
{ "ctl", T_Ctl, FOLLBY_TOKEN },
{ "disable", T_Disable, FOLLBY_TOKEN },
{ "driftfile", T_Driftfile, FOLLBY_STRING },
{ "dscp", T_Dscp, FOLLBY_TOKEN },
{ "enable", T_Enable, FOLLBY_TOKEN },
{ "end", T_End, FOLLBY_TOKEN },
{ "filegen", T_Filegen, FOLLBY_TOKEN },
@ -53,6 +54,7 @@ struct key_tok ntp_keywords[] = {
{ "io", T_Io, FOLLBY_TOKEN },
{ "includefile", T_Includefile, FOLLBY_STRING },
{ "leapfile", T_Leapfile, FOLLBY_STRING },
{ "leapsmearinterval", T_Leapsmearinterval, FOLLBY_TOKEN },
{ "logconfig", T_Logconfig, FOLLBY_STRINGS_TO_EOC },
{ "logfile", T_Logfile, FOLLBY_STRING },
{ "manycastclient", T_Manycastclient, FOLLBY_STRING },
@ -333,12 +335,11 @@ generate_fsm(void)
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
* not necessary, but minimizes nonfunctional changes in the
* generated finite state machine when keywords are modified.
@ -347,7 +348,7 @@ generate_fsm(void)
sizeof(ntp_keywords[0]), compare_key_tok_text);
/*
* To save space, reserve the state array entry matching each
* To save space, reserve the state array entry matching each
* token number for its terminal state, so the token identifier
* does not need to be stored in each state, but can be
* recovered trivially. To mark the entry reserved,
@ -414,7 +415,7 @@ generate_fsm(void)
}
if (sst[i].finishes_token) {
snprintf(token_id_comment,
snprintf(token_id_comment,
sizeof(token_id_comment), "%5d %-17s",
i, symbname(sst[i].finishes_token));
if (i != sst[i].finishes_token) {
@ -442,7 +443,6 @@ generate_fsm(void)
* spellings result in the same T_* value.
*/
prefix_len = 0;
prev_state = 0;
this_state = i;
do {
for (state = 1; state < sst_highwater; state++)
@ -468,8 +468,8 @@ generate_fsm(void)
snprintf(token_id_comment,
sizeof(token_id_comment), "%5d %-17s",
i, (initial_state == i)
? "[initial state]"
i, (initial_state == i)
? "[initial state]"
: prefix);
}
@ -497,8 +497,8 @@ generate_fsm(void)
*/
static u_short
create_scan_states(
char * text,
u_short token,
char * text,
u_short token,
follby followedby,
u_short prev_state
)
@ -512,7 +512,7 @@ create_scan_states(
curr_char_s = prev_state;
prev_char_s = 0;
/* Find the correct position to insert the state.
/* Find the correct position to insert the state.
* All states should be in alphabetical order
*/
while (curr_char_s && (text[0] < sst[curr_char_s].ch)) {
@ -520,7 +520,7 @@ create_scan_states(
curr_char_s = sst[curr_char_s].other_next_s;
}
/*
/*
* Check if a previously seen keyword has the same prefix as
* the current keyword. If so, simply use the state for that
* keyword as my_state, otherwise, allocate a new state.
@ -548,7 +548,7 @@ create_scan_states(
exit(3);
}
/* Store the next character of the keyword */
sst[my_state].ch = text[0];
sst[my_state].ch = text[0];
sst[my_state].other_next_s = curr_char_s;
sst[my_state].followedby = FOLLBY_NON_ACCEPTING;
@ -587,7 +587,7 @@ create_scan_states(
return_state = my_state;
}
} else
sst[my_state].match_next_s =
sst[my_state].match_next_s =
create_scan_states(
&text[1],
token,
@ -615,8 +615,8 @@ create_keyword_scanner(void)
current_keyword = ntp_keywords[i].key;
scanner =
create_scan_states(
ntp_keywords[i].key,
ntp_keywords[i].token,
ntp_keywords[i].key,
ntp_keywords[i].token,
ntp_keywords[i].followedby,
scanner);
}
@ -657,7 +657,7 @@ generate_token_text(void)
if (i > 0)
printf(",");
printf("\n\t/* %-5d %5d %20s */\t\"%s\"",
id - lowest_id, id, symbname(id),
id - lowest_id, id, symbname(id),
ntp_keywords[i].key);
i++;
id++;
@ -666,7 +666,7 @@ generate_token_text(void)
printf("\n};\n\n");
}
int
compare_key_tok_id(
const void *a1,
@ -749,7 +749,7 @@ symbname(
} else {
LIB_GETBUF(name);
snprintf(name, LIB_BUFLENGTH, "%d", token);
}
}
return name;
}

View file

@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntp.conf 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.TH ntp.conf 5man "29 Jun 2015" "4.2.8p3" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-R0aO7B/ag-30aG6B)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:16 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@ -35,7 +35,7 @@ All arguments must be options.
The
\f\*[B-Font]ntp.conf\fP
configuration file is read at initial startup by the
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
daemon in order to specify the synchronization sources,
modes and other related information.
Usually, it is installed in the
@ -307,7 +307,7 @@ 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[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
is started with the
\f\*[B-Font]\-q\f[]
option.
@ -528,7 +528,7 @@ and
\f\*[B-Font]disable\f[]
commands and also by remote
configuration commands sent by a
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
program running in
another machine.
If this flag is enabled, which is the default
@ -595,15 +595,15 @@ 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[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
utility programs.
.sp \n(Ppu
.ne 2
When
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\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
@ -617,17 +617,17 @@ allows, for instance, the installation of possibly
several batches of keys and
then activating or deactivating each batch
remotely using
\fCntpdc\fR(1ntpdcmdoc)\f[].
\fCntpdc\f[]\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[]
\fCntpdc\f[]\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[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
utility.
.SS Public Key Cryptography
NTPv4 supports the original NTPv3 symmetric key scheme
@ -674,7 +674,7 @@ page.
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[]
\fCntp-keygen\f[]\fR(1ntpkeygenmdoc)\f[]
program.
This includes a required host key file,
required certificate file and optional sign key file,
@ -721,7 +721,7 @@ DNS compromise is essential.
By convention, the name of an Autokey host is the name returned
by the Unix
\fCgethostname\fR(2)\f[]
\fCgethostname\f[]\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.
@ -821,7 +821,7 @@ 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[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
program.
.sp \n(Ppu
.ne 2
@ -846,7 +846,7 @@ 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[]
\fCntp-keygen\f[]\fR(1ntpkeygenmdoc)\f[]
utility program, including symmetric key, host key and
public certificate files, as well as sign key, identity parameters
and leapseconds files.
@ -855,9 +855,9 @@ 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[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
utility programs.
The remaining files are necessary only for the
Autokey protocol.
@ -895,7 +895,7 @@ 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[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
utility, which uses the standard
protocol defined in RFC-1305.
The
@ -984,10 +984,10 @@ not found, the host key is also the sign key.
.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[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[],
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
when operating with symmetric key cryptography.
This is the same operation as the
\f\*[B-Font]\-k\f[]
@ -1001,10 +1001,10 @@ The default is
.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[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
utility program, which uses a
proprietary protocol specific to this implementation of
\fCntpd\fR(1ntpdmdoc)\f[].
\fCntpd\f[]\fR(1ntpdmdoc)\f[].
The
\f\*[I-Font]key\f[]
argument is a key identifier
@ -1027,9 +1027,9 @@ for every message sent.
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[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
programs.
The authentication procedures require that both the local
and remote servers share the same key and key identifier for this
@ -1106,7 +1106,7 @@ The certificate is missing, corrupted or bogus.
The identity key is missing, corrupt or bogus.
.PP
.SH Monitoring Support
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
includes a comprehensive monitoring facility suitable
for continuous, long term recording of server and client
timekeeping performance.
@ -1122,7 +1122,7 @@ directory of this distribution.
Using
these facilities and
UNIX
\fCcron\fR(8)\f[]
\fCcron\f[]\fR(8)\f[]
jobs, the data can be
automatically summarized and archived for retrospective analysis.
.SS Monitoring Commands
@ -1348,7 +1348,7 @@ produced.)
.ne 2
Note that this command can be sent from the
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
program running at a remote location.
.RS
.TP 7
@ -1422,7 +1422,7 @@ 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[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
server incarnations.
The set member filename is built by appending a
\[oq]\&.\[cq]
@ -1432,7 +1432,7 @@ and
\f\*[I-Font]filename\f[]
strings, and
appending the decimal representation of the process ID of the
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
server process.
.TP 7
.NOP \f\*[B-Font]day\f[]
@ -1524,7 +1524,7 @@ Enables or disables the recording function.
.PP
.SH Access Control Support
The
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
daemon implements a general purpose address/mask based restriction
list.
The list contains address/match entries sorted first
@ -1672,9 +1672,9 @@ may be specified:
.TP 7
.NOP \f\*[B-Font]ignore\f[]
Deny packets of all kinds, including
\fCntpq\fR(1ntpqmdoc)\f[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
queries.
.TP 7
.NOP \f\*[B-Font]kod\f[]
@ -1690,7 +1690,7 @@ 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[].
\fCntpd\f[]\fR(1ntpdmdoc)\f[].
Thus, monitoring is always active as
long as there is a restriction entry with the
\f\*[B-Font]limited\f[]
@ -1709,9 +1709,9 @@ be overridden by later requests for normal priority traps.
.TP 7
.NOP \f\*[B-Font]nomodify\f[]
Deny
\fCntpq\fR(1ntpqmdoc)\f[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
queries which attempt to modify the state of the
server (i.e., run time reconfiguration).
Queries which return
@ -1719,9 +1719,9 @@ information are permitted.
.TP 7
.NOP \f\*[B-Font]noquery\f[]
Deny
\fCntpq\fR(1ntpqmdoc)\f[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
queries.
Time service is not affected.
.TP 7
@ -1746,9 +1746,9 @@ directive.
.TP 7
.NOP \f\*[B-Font]noserve\f[]
Deny all packets except
\fCntpq\fR(1ntpqmdoc)\f[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
and
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
queries.
.TP 7
.NOP \f\*[B-Font]notrap\f[]
@ -2078,11 +2078,11 @@ re-associate accordingly.
.ne 2
Some administrators prefer to avoid running
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
continuously and run either
\fCntpdate\fR(8)\f[]
\fCntpdate\f[]\fR(8)\f[]
or
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
\f\*[B-Font]\-q\f[]
as a cron job.
In either case the servers must be
@ -2090,7 +2090,7 @@ 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[]
\fCntpd\f[]\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
@ -2260,7 +2260,7 @@ hazardous.
.ne 2
For the purposes of configuration,
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
treats
reference clocks in a manner analogous to normal NTP peers as much
as possible.
@ -2348,7 +2348,7 @@ command as well.
The stratum number of a reference clock is by default zero.
Since the
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
daemon adds one to the stratum of each
peer, a primary server ordinarily displays an external stratum of
one.
@ -2422,7 +2422,7 @@ It must immediately follow the
command which configures the driver.
Note that the same capability
is possible at run time using the
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
program.
The options are interpreted as
follows:
@ -2564,11 +2564,15 @@ 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[]
\fCntpd\f[]\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]dscp\f[] \f\*[I-Font]value\f[]
This option specifies the Differentiated Services Control Point (DSCP) value,
a 6-bit code. The default value is 46, signifying Expedited Forwarding.
.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[]]
@ -2576,7 +2580,7 @@ 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[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
utility program.
.RS
.TP 7
@ -2613,21 +2617,21 @@ if support is available, otherwise
.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[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
program.
The default for this flag is disable.
This flag is excluded from runtime configuration using
\fCntpq\fR(1ntpqmdoc)\f[].
\fCntpq\f[]\fR(1ntpqmdoc)\f[].
The
\fCntpq\fR(1ntpqmdoc)\f[]
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
program provides the same capabilities as
\fCntpdc\fR(1ntpdcmdoc)\f[]
\fCntpdc\f[]\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[]
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[]
program
and the
\f\*[B-Font]monlist\f[]
@ -2661,14 +2665,28 @@ 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[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
.TP 7
.NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
This EXPERIMENTAL option is only available if
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
was built with the
\f\*[B-Font]\--enable-leap-smear\f[]
option to the
\f\*[B-Font]configure\f[]
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
.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[]
\fCsyslog\f[]\fR(3)\f[]
facility or the alternate
\f\*[B-Font]logfile\f[]
log file.
@ -2683,14 +2701,14 @@ and
where
\[oq]=\[cq]
sets the
\fCsyslog\fR(3)\f[]
\fCsyslog\f[]\fR(3)\f[]
priority mask,
\[oq]+\[cq]
adds and
\[oq]\-\[cq]
removes
messages.
\fCsyslog\fR(3)\f[]
\fCsyslog\f[]\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[]).
@ -2728,7 +2746,7 @@ logconfig =syncstatus +sysevents
.ne 2
This would just list the synchronizations state of
\fCntpd\fR(1ntpdmdoc)\f[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
and the major system events.
For a simple reference server, the
following minimum message configuration could be useful:
@ -2749,7 +2767,7 @@ peers, system events and so on is suppressed.
.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[]
\fCsyslog\f[]\fR(3)\f[]
facility.
This is the same operation as the \-l command line option.
.TP 7
@ -2764,7 +2782,7 @@ 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)).
(\fCntpq\f[]\fR(1ntpqmdoc)\f[] \f\*[B-Font]rv\f[] command)).
These additional variables serve
informational purposes only.
They are not related to the protocol
@ -2888,12 +2906,12 @@ The default is 32 megabytes. Setting this to zero will prevent any attemp to loc
.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
\fBmlockall\f[]\fR()\f[]
function.
Defaults to 50 4k pages (200 4k pages in OpenBSD).
.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[]]
@ -2986,9 +3004,9 @@ 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[]
\fCntpd\f[]\fR(1ntpdmdoc)\f[],
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[],
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
.sp \n(Ppu
.ne 2

View file

@ -1,9 +1,9 @@
.Dd April 7 2015
.Dd June 29 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:36 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@ -2386,6 +2386,9 @@ This implies that
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 Ic dscp Ar value
This option specifies the Differentiated Services Control Point (DSCP) value,
a 6\-bit code. The default value is 46, signifying Expedited Forwarding.
.It Xo Ic enable
.Oo
.Cm auth | Cm bclient |
@ -2485,6 +2488,19 @@ 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 leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd 1ntpdmdoc
was built with the
.Cm \-\-enable\-leap\-smear
option to the
.Cm configure
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC\-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
.It Ic logconfig Ar configkeyword
This command controls the amount and type of output written to
the system
@ -2717,11 +2733,11 @@ 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).
.It Cm filenum Ar Nfiledescriptors
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
.El
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number

View file

@ -2388,6 +2388,9 @@ This implies that
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 Ic dscp Ar value
This option specifies the Differentiated Services Control Point (DSCP) value,
a 6-bit code. The default value is 46, signifying Expedited Forwarding.
.It Xo Ic enable
.Oo
.Cm auth | Cm bclient |
@ -2487,6 +2490,19 @@ 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 leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd 1ntpdmdoc
was built with the
.Cm --enable-leap-smear
option to the
.Cm configure
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
.It Ic logconfig Ar configkeyword
This command controls the amount and type of output written to
the system
@ -2719,11 +2735,11 @@ 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).
.It Cm filenum Ar Nfiledescriptors
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
.El
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number

View file

@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
<p>This document applies to version 4.2.8p2 of <code>ntp.conf</code>.
<p>This document applies to version 4.2.8p3 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@ -2286,6 +2286,8 @@ This implies that
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>dscp</code> <kbd>value</kbd><dd>This option specifies the Differentiated Services Control Point (DSCP) value,
a 6-bit code. The default value is 46, signifying Expedited Forwarding.
<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
@ -2360,6 +2362,18 @@ 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>leapsmearinterval</code> <kbd>seconds</kbd><dd>This EXPERIMENTAL option is only available if
<code>ntpd(1ntpdmdoc)</code>
was built with the
<code>--enable-leap-smear</code>
option to the
<code>configure</code>
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
<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>
@ -2539,10 +2553,10 @@ when dropping root (the
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).
<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.
</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

View file

@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntp.conf 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.TH ntp.conf 5 "29 Jun 2015" "4.2.8p3" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-R0aO7B/ag-30aG6B)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:16 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@ -35,7 +35,7 @@ All arguments must be options.
The
\f\*[B-Font]ntp.conf\fP
configuration file is read at initial startup by the
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
daemon in order to specify the synchronization sources,
modes and other related information.
Usually, it is installed in the
@ -307,7 +307,7 @@ 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[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
is started with the
\f\*[B-Font]\-q\f[]
option.
@ -528,7 +528,7 @@ and
\f\*[B-Font]disable\f[]
commands and also by remote
configuration commands sent by a
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
program running in
another machine.
If this flag is enabled, which is the default
@ -595,15 +595,15 @@ 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[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
utility programs.
.sp \n(Ppu
.ne 2
When
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\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
@ -617,17 +617,17 @@ 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[].
\fCntpdc\f[]\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[]
\fCntpdc\f[]\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[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
utility.
.SS Public Key Cryptography
NTPv4 supports the original NTPv3 symmetric key scheme
@ -674,7 +674,7 @@ page.
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[]
\fCntp-keygen\f[]\fR(1ntpkeygenmdoc)\f[]
program.
This includes a required host key file,
required certificate file and optional sign key file,
@ -721,7 +721,7 @@ DNS compromise is essential.
By convention, the name of an Autokey host is the name returned
by the Unix
\fCgethostname\fR(2)\f[]
\fCgethostname\f[]\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.
@ -821,7 +821,7 @@ 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[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
program.
.sp \n(Ppu
.ne 2
@ -846,7 +846,7 @@ 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[]
\fCntp-keygen\f[]\fR(1ntpkeygenmdoc)\f[]
utility program, including symmetric key, host key and
public certificate files, as well as sign key, identity parameters
and leapseconds files.
@ -855,9 +855,9 @@ 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[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
utility programs.
The remaining files are necessary only for the
Autokey protocol.
@ -895,7 +895,7 @@ 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[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
utility, which uses the standard
protocol defined in RFC-1305.
The
@ -984,10 +984,10 @@ not found, the host key is also the sign key.
.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[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[],
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
when operating with symmetric key cryptography.
This is the same operation as the
\f\*[B-Font]\-k\f[]
@ -1001,10 +1001,10 @@ The default is
.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[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
utility program, which uses a
proprietary protocol specific to this implementation of
\fCntpd\fR(@NTPD_MS@)\f[].
\fCntpd\f[]\fR(@NTPD_MS@)\f[].
The
\f\*[I-Font]key\f[]
argument is a key identifier
@ -1027,9 +1027,9 @@ for every message sent.
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[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\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
@ -1106,7 +1106,7 @@ The certificate is missing, corrupted or bogus.
The identity key is missing, corrupt or bogus.
.PP
.SH Monitoring Support
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
includes a comprehensive monitoring facility suitable
for continuous, long term recording of server and client
timekeeping performance.
@ -1122,7 +1122,7 @@ directory of this distribution.
Using
these facilities and
UNIX
\fCcron\fR(8)\f[]
\fCcron\f[]\fR(8)\f[]
jobs, the data can be
automatically summarized and archived for retrospective analysis.
.SS Monitoring Commands
@ -1348,7 +1348,7 @@ produced.)
.ne 2
Note that this command can be sent from the
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
program running at a remote location.
.RS
.TP 7
@ -1422,7 +1422,7 @@ 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[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
server incarnations.
The set member filename is built by appending a
\[oq]\&.\[cq]
@ -1432,7 +1432,7 @@ and
\f\*[I-Font]filename\f[]
strings, and
appending the decimal representation of the process ID of the
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
server process.
.TP 7
.NOP \f\*[B-Font]day\f[]
@ -1524,7 +1524,7 @@ Enables or disables the recording function.
.PP
.SH Access Control Support
The
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
daemon implements a general purpose address/mask based restriction
list.
The list contains address/match entries sorted first
@ -1672,9 +1672,9 @@ may be specified:
.TP 7
.NOP \f\*[B-Font]ignore\f[]
Deny packets of all kinds, including
\fCntpq\fR(@NTPQ_MS@)\f[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
queries.
.TP 7
.NOP \f\*[B-Font]kod\f[]
@ -1690,7 +1690,7 @@ 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[].
\fCntpd\f[]\fR(@NTPD_MS@)\f[].
Thus, monitoring is always active as
long as there is a restriction entry with the
\f\*[B-Font]limited\f[]
@ -1709,9 +1709,9 @@ be overridden by later requests for normal priority traps.
.TP 7
.NOP \f\*[B-Font]nomodify\f[]
Deny
\fCntpq\fR(@NTPQ_MS@)\f[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
queries which attempt to modify the state of the
server (i.e., run time reconfiguration).
Queries which return
@ -1719,9 +1719,9 @@ information are permitted.
.TP 7
.NOP \f\*[B-Font]noquery\f[]
Deny
\fCntpq\fR(@NTPQ_MS@)\f[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
queries.
Time service is not affected.
.TP 7
@ -1746,9 +1746,9 @@ directive.
.TP 7
.NOP \f\*[B-Font]noserve\f[]
Deny all packets except
\fCntpq\fR(@NTPQ_MS@)\f[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
and
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
queries.
.TP 7
.NOP \f\*[B-Font]notrap\f[]
@ -2078,11 +2078,11 @@ re-associate accordingly.
.ne 2
Some administrators prefer to avoid running
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
continuously and run either
\fCntpdate\fR(8)\f[]
\fCntpdate\f[]\fR(8)\f[]
or
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
\f\*[B-Font]\-q\f[]
as a cron job.
In either case the servers must be
@ -2090,7 +2090,7 @@ 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[]
\fCntpd\f[]\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
@ -2260,7 +2260,7 @@ hazardous.
.ne 2
For the purposes of configuration,
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
treats
reference clocks in a manner analogous to normal NTP peers as much
as possible.
@ -2348,7 +2348,7 @@ command as well.
The stratum number of a reference clock is by default zero.
Since the
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
daemon adds one to the stratum of each
peer, a primary server ordinarily displays an external stratum of
one.
@ -2422,7 +2422,7 @@ It must immediately follow the
command which configures the driver.
Note that the same capability
is possible at run time using the
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
program.
The options are interpreted as
follows:
@ -2564,11 +2564,15 @@ 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[]
\fCntpd\f[]\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]dscp\f[] \f\*[I-Font]value\f[]
This option specifies the Differentiated Services Control Point (DSCP) value,
a 6-bit code. The default value is 46, signifying Expedited Forwarding.
.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[]]
@ -2576,7 +2580,7 @@ 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[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
utility program.
.RS
.TP 7
@ -2613,21 +2617,21 @@ if support is available, otherwise
.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[]
\fCntpdc\f[]\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[].
\fCntpq\f[]\fR(@NTPQ_MS@)\f[].
The
\fCntpq\fR(@NTPQ_MS@)\f[]
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
program provides the same capabilities as
\fCntpdc\fR(@NTPDC_MS@)\f[]
\fCntpdc\f[]\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[]
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
program
and the
\f\*[B-Font]monlist\f[]
@ -2661,14 +2665,28 @@ 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[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
.TP 7
.NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
This EXPERIMENTAL option is only available if
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
was built with the
\f\*[B-Font]\--enable-leap-smear\f[]
option to the
\f\*[B-Font]configure\f[]
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
.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[]
\fCsyslog\f[]\fR(3)\f[]
facility or the alternate
\f\*[B-Font]logfile\f[]
log file.
@ -2683,14 +2701,14 @@ and
where
\[oq]=\[cq]
sets the
\fCsyslog\fR(3)\f[]
\fCsyslog\f[]\fR(3)\f[]
priority mask,
\[oq]+\[cq]
adds and
\[oq]\-\[cq]
removes
messages.
\fCsyslog\fR(3)\f[]
\fCsyslog\f[]\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[]).
@ -2728,7 +2746,7 @@ logconfig =syncstatus +sysevents
.ne 2
This would just list the synchronizations state of
\fCntpd\fR(@NTPD_MS@)\f[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
and the major system events.
For a simple reference server, the
following minimum message configuration could be useful:
@ -2749,7 +2767,7 @@ peers, system events and so on is suppressed.
.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[]
\fCsyslog\f[]\fR(3)\f[]
facility.
This is the same operation as the \-l command line option.
.TP 7
@ -2764,7 +2782,7 @@ 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)).
(\fCntpq\f[]\fR(@NTPQ_MS@)\f[] \f\*[B-Font]rv\f[] command)).
These additional variables serve
informational purposes only.
They are not related to the protocol
@ -2888,12 +2906,12 @@ The default is 32 megabytes. Setting this to zero will prevent any attemp to loc
.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
\fBmlockall\f[]\fR()\f[]
function.
Defaults to 50 4k pages (200 4k pages in OpenBSD).
.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[]]
@ -2986,9 +3004,9 @@ 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[]
\fCntpd\f[]\fR(@NTPD_MS@)\f[],
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[],
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
.sp \n(Ppu
.ne 2

View file

@ -1,9 +1,9 @@
.Dd April 7 2015
.Dd June 29 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:36 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@ -2386,6 +2386,9 @@ This implies that
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 Ic dscp Ar value
This option specifies the Differentiated Services Control Point (DSCP) value,
a 6\-bit code. The default value is 46, signifying Expedited Forwarding.
.It Xo Ic enable
.Oo
.Cm auth | Cm bclient |
@ -2485,6 +2488,19 @@ 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 leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd @NTPD_MS@
was built with the
.Cm \-\-enable\-leap\-smear
option to the
.Cm configure
script.
It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
7200 (2 hours) and 86400 (24 hours).
.Sy DO NOT USE THIS OPTION ON PUBLIC\-ACCESS SERVERS!
See http://bugs.ntp.org/2855 for more information.
.It Ic logconfig Ar configkeyword
This command controls the amount and type of output written to
the system
@ -2717,11 +2733,11 @@ 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).
.It Cm filenum Ar Nfiledescriptors
Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
.El
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number

View file

@ -1,8 +1,8 @@
.TH ntp.keys 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.TH ntp.keys 5man "29 Jun 2015" "4.2.8p3" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:21 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@ -40,12 +40,12 @@ 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[]
\fCntp.conf\f[]\fR(5)\f[]
page.
.sp \n(Ppu
.ne 2
\fCntpd\fR(8)\f[]
\fCntpd\f[]\fR(8)\f[]
reads its keys from a file specified using the
\f\*[B-Font]\-k\f[]
command line option or the
@ -140,9 +140,9 @@ which is truncated as necessary.
.ne 2
Note that the keys used by the
\fCntpq\fR(8)\f[]
\fCntpq\f[]\fR(8)\f[]
and
\fCntpdc\fR(8)\f[]
\fCntpdc\f[]\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.
@ -152,11 +152,11 @@ so it is generally appropriate to specify these keys in ASCII format.
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[]
\fCntp.conf\f[]\fR(5)\f[],
\fCntpd\f[]\fR(1ntpdmdoc)\f[],
\fCntpdate\f[]\fR(1ntpdatemdoc)\f[],
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[],
\fCsntp\f[]\fR(1sntpmdoc)\f[]
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"

View file

@ -1,9 +1,9 @@
.Dd April 7 2015
.Dd June 29 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:39 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME

View file

@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<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.8p2 of <code>ntp.keys</code>.
<p>This document applies to version 4.2.8p3 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>

View file

@ -1,8 +1,8 @@
.TH ntp.keys 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.TH ntp.keys 5 "29 Jun 2015" "4.2.8p3" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:21 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@ -40,12 +40,12 @@ 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[]
\fCntp.conf\f[]\fR(5)\f[]
page.
.sp \n(Ppu
.ne 2
\fCntpd\fR(8)\f[]
\fCntpd\f[]\fR(8)\f[]
reads its keys from a file specified using the
\f\*[B-Font]\-k\f[]
command line option or the
@ -140,9 +140,9 @@ which is truncated as necessary.
.ne 2
Note that the keys used by the
\fCntpq\fR(8)\f[]
\fCntpq\f[]\fR(8)\f[]
and
\fCntpdc\fR(8)\f[]
\fCntpdc\f[]\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.
@ -152,11 +152,11 @@ so it is generally appropriate to specify these keys in ASCII format.
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[]
\fCntp.conf\f[]\fR(5)\f[],
\fCntpd\f[]\fR(@NTPD_MS@)\f[],
\fCntpdate\f[]\fR(@NTPDATE_MS@)\f[],
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[],
\fCsntp\f[]\fR(@SNTP_MS@)\f[]
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"

View file

@ -1,9 +1,9 @@
.Dd April 7 2015
.Dd June 29 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" It has been AutoGen-ed June 29, 2015 at 04:30:39 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME

View file

@ -54,9 +54,6 @@
#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;
@ -134,8 +131,6 @@ typedef struct peer_resolved_ctx_tag {
* Definitions of things either imported from or exported to outside
*/
extern int yydebug; /* ntp_parser.c (.y) */
int curr_include_level; /* The current include level */
struct FILE_INFO *fp[MAXINCLUDELEVEL+1];
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 */
@ -181,11 +176,6 @@ struct netinfo_config_state {
struct REMOTE_CONFIG_INFO remote_config; /* Remote configuration buffer and
pointer info */
int input_from_file = 1; /* A boolean flag, which when set, indicates that
the input is to be taken from the configuration
file, instead of the remote-configuration buffer
*/
int old_config_style = 1; /* A boolean flag, which when set,
* indicates that the old configuration
* format with a newline at the end of
@ -257,7 +247,7 @@ static void free_config_tree(config_tree *ptree);
static void destroy_restrict_node(restrict_node *my_node);
static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
static void save_and_apply_config_tree(void);
static void save_and_apply_config_tree(int/*BOOL*/ from_file);
static void destroy_int_fifo(int_fifo *);
#define FREE_INT_FIFO(pf) \
do { \
@ -314,7 +304,7 @@ 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_ntpd(config_tree *, int/*BOOL*/ input_from_file);
static void config_other_modes(config_tree *);
static void config_auth(config_tree *);
static void config_access(config_tree *);
@ -326,7 +316,7 @@ 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_nic_rules(config_tree *, int/*BOOL*/ input_from_file);
static void config_reset_counters(config_tree *);
static u_char get_correct_host_mode(int token);
static int peerflag_bits(peer_node *);
@ -2751,7 +2741,8 @@ free_config_tinker(
#ifndef SIM
static void
config_nic_rules(
config_tree *ptree
config_tree *ptree,
int/*BOOL*/ input_from_file
)
{
nic_rule_node * curr_node;
@ -3502,6 +3493,11 @@ config_vars(
stats_config(STATS_FREQ_FILE, curr_var->value.s);
break;
case T_Dscp:
/* DSCP is in the upper 6 bits of the IP TOS/DS field */
qos = curr_var->value.i << 2;
break;
case T_Ident:
sys_ident = curr_var->value.s;
break;
@ -3515,6 +3511,13 @@ config_vars(
stats_config(STATS_LEAP_FILE, curr_var->value.s);
break;
#ifdef LEAP_SMEAR
case T_Leapsmearinterval:
leap_smear_intv = curr_var->value.i;
msyslog(LOG_INFO, "config: leap smear interval %i s", leap_smear_intv);
break;
#endif
case T_Pidfile:
stats_config(STATS_PID_FILE, curr_var->value.s);
break;
@ -4224,7 +4227,7 @@ config_sim(
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 *
simulation.servers = eallocarray(simulation.num_of_servers,
sizeof(simulation.servers[0]));
i = 0;
@ -4295,11 +4298,11 @@ free_config_sim(
#ifndef SIM
static void
config_ntpd(
config_tree *ptree
config_tree *ptree,
int/*BOOL*/ input_from_files
)
{
config_nic_rules(ptree);
io_open_sockets();
config_nic_rules(ptree, input_from_files);
config_monitor(ptree);
config_auth(ptree);
config_tos(ptree);
@ -4314,6 +4317,9 @@ config_ntpd(
config_ttl(ptree);
config_trap(ptree);
config_vars(ptree);
io_open_sockets();
config_other_modes(ptree);
config_peers(ptree);
config_unpeers(ptree);
@ -4370,28 +4376,22 @@ config_remotely(
sockaddr_u * remote_addr
)
{
struct FILE_INFO remote_cuckoo;
char origin[128];
snprintf(origin, sizeof(origin), "remote config from %s",
stoa(remote_addr));
ZERO(remote_cuckoo);
remote_cuckoo.fname = origin;
remote_cuckoo.line_no = 1;
remote_cuckoo.col_no = 1;
input_from_file = 0;
lex_init_stack(origin, NULL); /* no checking needed... */
init_syntax_tree(&cfgt);
yyparse(&remote_cuckoo);
yyparse();
lex_drop_stack();
cfgt.source.attr = CONF_SOURCE_NTPQ;
cfgt.timestamp = time(NULL);
cfgt.source.value.s = estrdup(stoa(remote_addr));
DPRINTF(1, ("Finished Parsing!!\n"));
save_and_apply_config_tree();
input_from_file = 1;
save_and_apply_config_tree(FALSE);
}
@ -4443,9 +4443,8 @@ getconfig(
getCmdOpts(argc, argv);
init_syntax_tree(&cfgt);
curr_include_level = 0;
if (
(fp[curr_include_level] = F_OPEN(FindConfig(config_file), "r")) == NULL
!lex_init_stack(FindConfig(config_file), "r")
#ifdef HAVE_NETINFO
/* If there is no config_file, try NetInfo. */
&& check_netinfo && !(config_netinfo = get_netinfo_config())
@ -4459,8 +4458,7 @@ getconfig(
#else
/* Under WinNT try alternate_config_file name, first NTP.CONF, then NTP.INI */
if ((fp[curr_include_level] = F_OPEN(FindConfig(alt_config_file), "r")) == NULL) {
if (!lex_init_stack(FindConfig(alt_config_file), "r")) {
/*
* Broadcast clients can sometimes run without
* a configuration file.
@ -4480,17 +4478,15 @@ getconfig(
#ifdef DEBUG
yydebug = !!(debug >= 5);
#endif
yyparse(fp[curr_include_level]);
yyparse();
lex_drop_stack();
DPRINTF(1, ("Finished Parsing!!\n"));
cfgt.source.attr = CONF_SOURCE_FILE;
cfgt.timestamp = time(NULL);
save_and_apply_config_tree();
while (curr_include_level != -1)
FCLOSE(fp[curr_include_level--]);
save_and_apply_config_tree(TRUE);
#ifdef HAVE_NETINFO
if (config_netinfo)
@ -4500,7 +4496,7 @@ getconfig(
void
save_and_apply_config_tree(void)
save_and_apply_config_tree(int/*BOOL*/ input_from_file)
{
config_tree *ptree;
#ifndef SAVECONFIG
@ -4554,7 +4550,7 @@ save_and_apply_config_tree(void)
*/
#ifndef SIM
config_ntpd(ptree);
config_ntpd(ptree, input_from_file);
#else
config_ntpdsim(ptree);
#endif
@ -4785,8 +4781,9 @@ gettokens_netinfo (
if (namelist.ni_namelist_len == 0) continue;
config->val_list =
emalloc(sizeof(char*) *
(namelist.ni_namelist_len + 1));
eallocarray(
(namelist.ni_namelist_len + 1),
sizeof(char*));
val_list = config->val_list;
for (index = 0;
@ -4936,7 +4933,7 @@ ntp_rlimit(
case RLIMIT_NOFILE:
/*
* For large systems the default file descriptor limit may
* not be enough.
* not be enough.
*/
DPRINTF(2, ("ntp_rlimit: NOFILE: %d %s\n",
(int)(rl_value / rl_scale), rl_sstr));
@ -4956,7 +4953,7 @@ ntp_rlimit(
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");
msyslog(LOG_ERR, "getrlimit(RLIMIT_STACK) failed: %m");
} else {
if (rl_value > rl.rlim_max) {
msyslog(LOG_WARNING,
@ -4965,9 +4962,10 @@ ntp_rlimit(
(u_long)rl_value);
rl_value = rl.rlim_max;
}
rl.rlim_cur = rl_value;
if (-1 == setrlimit(RLIMIT_STACK, &rl)) {
msyslog(LOG_ERR,
"ntp_rlimit: Cannot adjust stack limit: %m");
"ntp_rlimit: Cannot set RLIMIT_STACK: %m");
}
}
break;

View file

@ -36,6 +36,7 @@
# include "ntp_syscall.h"
#endif
extern size_t remoteconfig_cmdlength( const char *src_buf, const char *src_end );
#ifndef MIN
#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
@ -229,7 +230,9 @@ static const struct ctl_proc control_codes[] = {
#define CS_TIMER_XMTS 87
#define CS_FUZZ 88
#define CS_WANDER_THRESH 89
#define CS_MAX_NOAUTOKEY CS_WANDER_THRESH
#define CS_LEAPSMEARINTV 90
#define CS_LEAPSMEAROFFS 91
#define CS_MAX_NOAUTOKEY CS_LEAPSMEAROFFS
#ifdef AUTOKEY
#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
#define CS_HOST (2 + CS_MAX_NOAUTOKEY)
@ -425,6 +428,10 @@ static const struct ctl_var sys_var[] = {
{ CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
{ CS_FUZZ, RO, "fuzz" }, /* 88 */
{ CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
#ifdef LEAP_SMEAR
{ CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 90 */
{ CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 91 */
#endif /* LEAP_SMEAR */
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
{ CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
@ -467,6 +474,8 @@ static const u_char def_sys_var[] = {
CS_TAI,
CS_LEAPTAB,
CS_LEAPEND,
CS_LEAPSMEARINTV,
CS_LEAPSMEAROFFS,
#ifdef AUTOKEY
CS_HOST,
CS_IDENT,
@ -1980,6 +1989,19 @@ ctl_putsys(
break;
}
#ifdef LEAP_SMEAR
case CS_LEAPSMEARINTV:
if (leap_smear_intv > 0)
ctl_putuint(sys_var[CS_LEAPSMEARINTV].text, leap_smear_intv);
break;
case CS_LEAPSMEAROFFS:
if (leap_smear_intv > 0)
ctl_putdbl(sys_var[CS_LEAPSMEAROFFS].text,
leap_smear.doffset * 1e3);
break;
#endif /* LEAP_SMEAR */
case CS_RATE:
ctl_putuint(sys_var[CS_RATE].text, ntp_minpoll);
break;
@ -3289,6 +3311,7 @@ write_variables(
ctl_flushpkt(0);
}
/*
* configure() processes ntpq :config/config-from-file, allowing
* generic runtime reconfiguration.
@ -3300,7 +3323,6 @@ static void configure(
{
size_t data_count;
int retval;
int replace_nl;
/* I haven't yet implemented changes to an existing association.
* Hence check if the association id is 0
@ -3326,7 +3348,7 @@ static void configure(
}
/* Initialize the remote config buffer */
data_count = reqend - reqpt;
data_count = remoteconfig_cmdlength(reqpt, reqend);
if (data_count > sizeof(remote_config.buffer) - 2) {
snprintf(remote_config.err_msg,
@ -3340,34 +3362,41 @@ static void configure(
stoa(&rbufp->recv_srcadr));
return;
}
memcpy(remote_config.buffer, reqpt, data_count);
if (data_count > 0
&& '\n' != remote_config.buffer[data_count - 1])
remote_config.buffer[data_count++] = '\n';
remote_config.buffer[data_count] = '\0';
remote_config.pos = 0;
remote_config.err_pos = 0;
remote_config.no_errors = 0;
/* do not include terminating newline in log */
if (data_count > 0
&& '\n' == remote_config.buffer[data_count - 1]) {
remote_config.buffer[data_count - 1] = '\0';
replace_nl = TRUE;
} else {
replace_nl = FALSE;
/* Bug 2853 -- check if all characters were acceptable */
if (data_count != (size_t)(reqend - reqpt)) {
snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"runtime configuration failed: request contains an unprintable character");
ctl_putdata(remote_config.err_msg,
strlen(remote_config.err_msg), 0);
ctl_flushpkt(0);
msyslog(LOG_NOTICE,
"runtime config from %s rejected: request contains an unprintable character: %0x",
stoa(&rbufp->recv_srcadr),
reqpt[data_count]);
return;
}
memcpy(remote_config.buffer, reqpt, data_count);
/* The buffer has no trailing linefeed or NUL right now. For
* logging, we do not want a newline, so we do that first after
* adding the necessary NUL byte.
*/
remote_config.buffer[data_count] = '\0';
DPRINTF(1, ("Got Remote Configuration Command: %s\n",
remote_config.buffer));
msyslog(LOG_NOTICE, "%s config: %s",
stoa(&rbufp->recv_srcadr),
remote_config.buffer);
if (replace_nl)
remote_config.buffer[data_count - 1] = '\n';
/* Now we have to make sure there is a NL/NUL sequence at the
* end of the buffer before we parse it.
*/
remote_config.buffer[data_count++] = '\n';
remote_config.buffer[data_count] = '\0';
remote_config.pos = 0;
remote_config.err_pos = 0;
remote_config.no_errors = 0;
config_remotely(&rbufp->recv_srcadr);
/*

Some files were not shown because too many files have changed in this diff Show more