1 /* $NetBSD: refclock_conf.c,v 1.3 2006/06/11 19:34:12 kardel Exp $ */
4 * refclock_conf.c - reference clock configuration
11 #include <sys/types.h>
14 #include "ntp_refclock.h"
15 #include "ntp_stdlib.h"
19 static struct refclock refclock_none
= {
20 noentry
, noentry
, noentry
, noentry
, noentry
, noentry
, NOFLAGS
24 extern struct refclock refclock_local
;
26 #define refclock_local refclock_none
29 #if 0 && defined(CLOCK_TRAK) && defined(PPS)
30 extern struct refclock refclock_trak
;
32 #define refclock_trak refclock_none
36 extern struct refclock refclock_pst
;
38 #define refclock_pst refclock_none
42 extern struct refclock refclock_chu
;
44 #define refclock_chu refclock_none
48 extern struct refclock refclock_wwv
;
50 #define refclock_wwv refclock_none
53 #ifdef CLOCK_SPECTRACOM
54 extern struct refclock refclock_wwvb
;
56 #define refclock_wwvb refclock_none
60 extern struct refclock refclock_parse
;
62 #define refclock_parse refclock_none
65 #if defined(CLOCK_MX4200) && defined(HAVE_PPSAPI)
66 extern struct refclock refclock_mx4200
;
68 #define refclock_mx4200 refclock_none
72 extern struct refclock refclock_as2201
;
74 #define refclock_as2201 refclock_none
78 extern struct refclock refclock_arbiter
;
80 #define refclock_arbiter refclock_none
84 extern struct refclock refclock_tpro
;
86 #define refclock_tpro refclock_none
90 extern struct refclock refclock_leitch
;
92 #define refclock_leitch refclock_none
96 extern struct refclock refclock_irig
;
98 #define refclock_irig refclock_none
101 #if 0 && defined(CLOCK_MSFEES) && defined(PPS)
102 extern struct refclock refclock_msfees
;
104 #define refclock_msfees refclock_none
108 extern struct refclock refclock_bancomm
;
110 #define refclock_bancomm refclock_none
113 #ifdef CLOCK_TRUETIME
114 extern struct refclock refclock_true
;
116 #define refclock_true refclock_none
120 extern struct refclock refclock_datum
;
122 #define refclock_datum refclock_none
126 extern struct refclock refclock_acts
;
128 #define refclock_acts refclock_none
132 extern struct refclock refclock_heath
;
134 #define refclock_heath refclock_none
138 extern struct refclock refclock_nmea
;
140 #define refclock_nmea refclock_none
144 extern struct refclock refclock_atom
;
146 #define refclock_atom refclock_none
150 extern struct refclock refclock_hpgps
;
152 #define refclock_hpgps refclock_none
156 extern struct refclock refclock_gpsvme
;
158 #define refclock_gpsvme refclock_none
161 #ifdef CLOCK_ARCRON_MSF
162 extern struct refclock refclock_arc
;
164 #define refclock_arc refclock_none
168 extern struct refclock refclock_shm
;
170 #define refclock_shm refclock_none
173 #ifdef CLOCK_PALISADE
174 extern struct refclock refclock_palisade
;
176 #define refclock_palisade refclock_none
179 #if defined(CLOCK_ONCORE)
180 extern struct refclock refclock_oncore
;
182 #define refclock_oncore refclock_none
185 #if defined(CLOCK_JUPITER) && defined(HAVE_PPSAPI)
186 extern struct refclock refclock_jupiter
;
188 #define refclock_jupiter refclock_none
191 #if defined(CLOCK_CHRONOLOG)
192 extern struct refclock refclock_chronolog
;
194 #define refclock_chronolog refclock_none
197 #if defined(CLOCK_DUMBCLOCK)
198 extern struct refclock refclock_dumbclock
;
200 #define refclock_dumbclock refclock_none
204 extern struct refclock refclock_ulink
;
206 #define refclock_ulink refclock_none
210 extern struct refclock refclock_pcf
;
212 #define refclock_pcf refclock_none
216 extern struct refclock refclock_fg
;
218 #define refclock_fg refclock_none
221 #ifdef CLOCK_HOPF_SERIAL
222 extern struct refclock refclock_hopfser
;
224 #define refclock_hopfser refclock_none
227 #ifdef CLOCK_HOPF_PCI
228 extern struct refclock refclock_hopfpci
;
230 #define refclock_hopfpci refclock_none
234 extern struct refclock refclock_jjy
;
236 #define refclock_jjy refclock_none
240 extern struct refclock refclock_tt560
;
242 #define refclock_tt560 refclock_none
246 extern struct refclock refclock_zyfer
;
248 #define refclock_zyfer refclock_none
252 extern struct refclock refclock_ripencc
;
254 #define refclock_ripencc refclock_none
257 #ifdef CLOCK_NEOCLOCK4X
258 extern struct refclock refclock_neoclock4x
;
260 #define refclock_neoclock4x refclock_none
264 * Order is clock_start(), clock_shutdown(), clock_poll(),
265 * clock_control(), clock_init(), clock_buginfo, clock_flags;
267 * Types are defined in ntp.h. The index must match this.
269 struct refclock
*refclock_conf
[] = {
270 &refclock_none
, /* 0 REFCLK_NONE */
271 &refclock_local
, /* 1 REFCLK_LOCAL */
272 &refclock_none
, /* 2 deprecated: REFCLK_GPS_TRAK */
273 &refclock_pst
, /* 3 REFCLK_WWV_PST */
274 &refclock_wwvb
, /* 4 REFCLK_SPECTRACOM */
275 &refclock_true
, /* 5 REFCLK_TRUETIME */
276 &refclock_irig
, /* 6 REFCLK_IRIG_AUDIO */
277 &refclock_chu
, /* 7 REFCLK_CHU_AUDIO */
278 &refclock_parse
, /* 8 REFCLK_PARSE */
279 &refclock_mx4200
, /* 9 REFCLK_GPS_MX4200 */
280 &refclock_as2201
, /* 10 REFCLK_GPS_AS2201 */
281 &refclock_arbiter
, /* 11 REFCLK_GPS_ARBITER */
282 &refclock_tpro
, /* 12 REFCLK_IRIG_TPRO */
283 &refclock_leitch
, /* 13 REFCLK_ATOM_LEITCH */
284 &refclock_none
, /* 14 deprecated: REFCLK_MSF_EES */
285 &refclock_none
, /* 15 not used */
286 &refclock_bancomm
, /* 16 REFCLK_IRIG_BANCOMM */
287 &refclock_datum
, /* 17 REFCLK_GPS_DATUM */
288 &refclock_acts
, /* 18 REFCLK_ACTS */
289 &refclock_heath
, /* 19 REFCLK_WWV_HEATH */
290 &refclock_nmea
, /* 20 REFCLK_GPS_NMEA */
291 &refclock_gpsvme
, /* 21 REFCLK_GPS_VME */
292 &refclock_atom
, /* 22 REFCLK_ATOM_PPS */
293 &refclock_none
, /* 23 not used */
294 &refclock_none
, /* 24 not used */
295 &refclock_none
, /* 25 not used */
296 &refclock_hpgps
, /* 26 REFCLK_GPS_HP */
297 &refclock_arc
, /* 27 REFCLK_ARCRON_MSF */
298 &refclock_shm
, /* 28 REFCLK_SHM */
299 &refclock_palisade
, /* 29 REFCLK_PALISADE */
300 &refclock_oncore
, /* 30 REFCLK_ONCORE */
301 &refclock_jupiter
, /* 31 REFCLK_GPS_JUPITER */
302 &refclock_chronolog
, /* 32 REFCLK_CHRONOLOG */
303 &refclock_dumbclock
, /* 33 REFCLK_DUMBCLOCK */
304 &refclock_ulink
, /* 34 REFCLOCK_ULINK */
305 &refclock_pcf
, /* 35 REFCLOCK_PCF */
306 &refclock_wwv
, /* 36 REFCLOCK_WWV_AUDIO */
307 &refclock_fg
, /* 37 REFCLOCK_FG */
308 &refclock_hopfser
, /* 38 REFCLK_HOPF_SERIAL */
309 &refclock_hopfpci
, /* 39 REFCLK_HOPF_PCI */
310 &refclock_jjy
, /* 40 REFCLK_JJY */
311 &refclock_tt560
, /* 41 REFCLK_TT560 */
312 &refclock_zyfer
, /* 42 REFCLK_ZYFER */
313 &refclock_ripencc
, /* 43 REFCLK_RIPENCC */
314 &refclock_neoclock4x
/* 44 REFCLK_NEOCLOCK4X */
317 u_char num_refclock_conf
= sizeof(refclock_conf
)/sizeof(struct refclock
*);
320 int refclock_conf_bs
;