From nobody@FreeBSD.ORG  Fri Nov 24 11:29:12 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id DCECF37B4C5; Fri, 24 Nov 2000 11:29:12 -0800 (PST)
Message-Id: <20001124192912.DCECF37B4C5@hub.freebsd.org>
Date: Fri, 24 Nov 2000 11:29:12 -0800 (PST)
From: kazarov@izmiran.rssi.ru
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: ntpd has only one reference-clock parser compiled - No way to add another throu /etc/make.conf
X-Send-Pr-Version: www-1.0

>Number:         23082
>Category:       bin
>Synopsis:       ntpd has only one reference-clock parser compiled - No way to add another throu /etc/make.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 24 11:30:01 PST 2000
>Closed-Date:    Thu Feb 23 14:59:15 GMT 2006
>Last-Modified:  Thu Feb 23 14:59:15 GMT 2006
>Originator:     Dmitry Kazarov
>Release:        FreeBSD-4.1
>Organization:
IZMIRAN
>Environment:
>Description:
I've tryed to install Trimble Acutime II GPS receiver on FreeBSD server and found that by default (in /usr/src/usr.sbin/ntp/config.h ) only one ref-clock parser ( RawDCF  ) is enabled while Generic reference driver 'PARSE' understands more types of ref-clocks.  In my case this produce completely cryptic error message 'parse_setfmt FAILED' and only digging into the sources showed that my GPS receiver is just not supported which is not mentioned in the man or documentation.

It's necesary to make possible to add other drivers and parsers to ntpd by specifying them in /etc/make.conf or just include them all as it was in xntpd. This could possible by overriding macro CLOCKDEFS if its definition in /usr/src/usr.sbin/ntp/Makefile.inc would change from 'CLOCKDEFS=' to 'CLOCKDEFS?='. Then specifing 
CLOCKDEFS=-DCLOCK_TRIMTSIP compiles Trimble support into ntpd.
>How-To-Repeat:
root@host# echo server 127.127.8.0 mode 10 >> /etc/ntp.conf
root@host# ntpd -d
...
...ntpd[1234]: PARSE receiver #0: parse_start: parse_setfmt()AILED
>Fix:
*** Makefile.inc.orig   Fri Nov 24 20:39:22 2000
--- Makefile.inc        Fri Nov 24 21:13:20 2000
*************** MAINTAINER=     roberto
*** 4,10 ****

  DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H
  NTPDEFS=   -DSYS_FREEBSD
! CLOCKDEFS=
  #     -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
  #     -DLEITCH -DTRAK -DACTS -DATOM -DDATUM -DHEATH -DMSFEES \
  #     -DMX4200 -DNMEA -DBOEDER
--- 4,10 ----

  DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H
  NTPDEFS=   -DSYS_FREEBSD
! CLOCKDEFS?=
  #     -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
  #     -DLEITCH -DTRAK -DACTS -DATOM -DDATUM -DHEATH -DMSFEES \
  #     -DMX4200 -DNMEA -DBOEDER

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Sun Nov 26 03:14:44 PST 2000 
Responsible-Changed-Why:  
I'm interested in committing this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23082 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Thu Feb 23 13:41:46 UTC 2006 
State-Changed-Why:  
This was fixed in 2002, but I forgot to close the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23082 
>Unformatted:
