Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / ntpd / refclock_conf.c
blobd85eb5376732bd973df7a831082e66fc3c9d6750
1 /* $NetBSD: refclock_conf.c,v 1.3 2006/06/11 19:34:12 kardel Exp $ */
3 /*
4 * refclock_conf.c - reference clock configuration
5 */
6 #ifdef HAVE_CONFIG_H
7 #include <config.h>
8 #endif
10 #include <stdio.h>
11 #include <sys/types.h>
13 #include "ntpd.h"
14 #include "ntp_refclock.h"
15 #include "ntp_stdlib.h"
17 #ifdef REFCLOCK
19 static struct refclock refclock_none = {
20 noentry, noentry, noentry, noentry, noentry, noentry, NOFLAGS
23 #ifdef CLOCK_LOCAL
24 extern struct refclock refclock_local;
25 #else
26 #define refclock_local refclock_none
27 #endif
29 #if 0 && defined(CLOCK_TRAK) && defined(PPS)
30 extern struct refclock refclock_trak;
31 #else
32 #define refclock_trak refclock_none
33 #endif
35 #ifdef CLOCK_PST
36 extern struct refclock refclock_pst;
37 #else
38 #define refclock_pst refclock_none
39 #endif
41 #ifdef CLOCK_CHU
42 extern struct refclock refclock_chu;
43 #else
44 #define refclock_chu refclock_none
45 #endif
47 #ifdef CLOCK_WWV
48 extern struct refclock refclock_wwv;
49 #else
50 #define refclock_wwv refclock_none
51 #endif
53 #ifdef CLOCK_SPECTRACOM
54 extern struct refclock refclock_wwvb;
55 #else
56 #define refclock_wwvb refclock_none
57 #endif
59 #ifdef CLOCK_PARSE
60 extern struct refclock refclock_parse;
61 #else
62 #define refclock_parse refclock_none
63 #endif
65 #if defined(CLOCK_MX4200) && defined(HAVE_PPSAPI)
66 extern struct refclock refclock_mx4200;
67 #else
68 #define refclock_mx4200 refclock_none
69 #endif
71 #ifdef CLOCK_AS2201
72 extern struct refclock refclock_as2201;
73 #else
74 #define refclock_as2201 refclock_none
75 #endif
77 #ifdef CLOCK_ARBITER
78 extern struct refclock refclock_arbiter;
79 #else
80 #define refclock_arbiter refclock_none
81 #endif
83 #ifdef CLOCK_TPRO
84 extern struct refclock refclock_tpro;
85 #else
86 #define refclock_tpro refclock_none
87 #endif
89 #ifdef CLOCK_LEITCH
90 extern struct refclock refclock_leitch;
91 #else
92 #define refclock_leitch refclock_none
93 #endif
95 #ifdef CLOCK_IRIG
96 extern struct refclock refclock_irig;
97 #else
98 #define refclock_irig refclock_none
99 #endif
101 #if 0 && defined(CLOCK_MSFEES) && defined(PPS)
102 extern struct refclock refclock_msfees;
103 #else
104 #define refclock_msfees refclock_none
105 #endif
107 #ifdef CLOCK_BANC
108 extern struct refclock refclock_bancomm;
109 #else
110 #define refclock_bancomm refclock_none
111 #endif
113 #ifdef CLOCK_TRUETIME
114 extern struct refclock refclock_true;
115 #else
116 #define refclock_true refclock_none
117 #endif
119 #ifdef CLOCK_DATUM
120 extern struct refclock refclock_datum;
121 #else
122 #define refclock_datum refclock_none
123 #endif
125 #ifdef CLOCK_ACTS
126 extern struct refclock refclock_acts;
127 #else
128 #define refclock_acts refclock_none
129 #endif
131 #ifdef CLOCK_HEATH
132 extern struct refclock refclock_heath;
133 #else
134 #define refclock_heath refclock_none
135 #endif
137 #ifdef CLOCK_NMEA
138 extern struct refclock refclock_nmea;
139 #else
140 #define refclock_nmea refclock_none
141 #endif
143 #ifdef CLOCK_ATOM
144 extern struct refclock refclock_atom;
145 #else
146 #define refclock_atom refclock_none
147 #endif
149 #ifdef CLOCK_HPGPS
150 extern struct refclock refclock_hpgps;
151 #else
152 #define refclock_hpgps refclock_none
153 #endif
155 #ifdef CLOCK_GPSVME
156 extern struct refclock refclock_gpsvme;
157 #else
158 #define refclock_gpsvme refclock_none
159 #endif
161 #ifdef CLOCK_ARCRON_MSF
162 extern struct refclock refclock_arc;
163 #else
164 #define refclock_arc refclock_none
165 #endif
167 #ifdef CLOCK_SHM
168 extern struct refclock refclock_shm;
169 #else
170 #define refclock_shm refclock_none
171 #endif
173 #ifdef CLOCK_PALISADE
174 extern struct refclock refclock_palisade;
175 #else
176 #define refclock_palisade refclock_none
177 #endif
179 #if defined(CLOCK_ONCORE)
180 extern struct refclock refclock_oncore;
181 #else
182 #define refclock_oncore refclock_none
183 #endif
185 #if defined(CLOCK_JUPITER) && defined(HAVE_PPSAPI)
186 extern struct refclock refclock_jupiter;
187 #else
188 #define refclock_jupiter refclock_none
189 #endif
191 #if defined(CLOCK_CHRONOLOG)
192 extern struct refclock refclock_chronolog;
193 #else
194 #define refclock_chronolog refclock_none
195 #endif
197 #if defined(CLOCK_DUMBCLOCK)
198 extern struct refclock refclock_dumbclock;
199 #else
200 #define refclock_dumbclock refclock_none
201 #endif
203 #ifdef CLOCK_ULINK
204 extern struct refclock refclock_ulink;
205 #else
206 #define refclock_ulink refclock_none
207 #endif
209 #ifdef CLOCK_PCF
210 extern struct refclock refclock_pcf;
211 #else
212 #define refclock_pcf refclock_none
213 #endif
215 #ifdef CLOCK_FG
216 extern struct refclock refclock_fg;
217 #else
218 #define refclock_fg refclock_none
219 #endif
221 #ifdef CLOCK_HOPF_SERIAL
222 extern struct refclock refclock_hopfser;
223 #else
224 #define refclock_hopfser refclock_none
225 #endif
227 #ifdef CLOCK_HOPF_PCI
228 extern struct refclock refclock_hopfpci;
229 #else
230 #define refclock_hopfpci refclock_none
231 #endif
233 #ifdef CLOCK_JJY
234 extern struct refclock refclock_jjy;
235 #else
236 #define refclock_jjy refclock_none
237 #endif
239 #ifdef CLOCK_TT560
240 extern struct refclock refclock_tt560;
241 #else
242 #define refclock_tt560 refclock_none
243 #endif
245 #ifdef CLOCK_ZYFER
246 extern struct refclock refclock_zyfer;
247 #else
248 #define refclock_zyfer refclock_none
249 #endif
251 #ifdef CLOCK_RIPENCC
252 extern struct refclock refclock_ripencc;
253 #else
254 #define refclock_ripencc refclock_none
255 #endif
257 #ifdef CLOCK_NEOCLOCK4X
258 extern struct refclock refclock_neoclock4x;
259 #else
260 #define refclock_neoclock4x refclock_none
261 #endif
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 *);
319 #else
320 int refclock_conf_bs;
321 #endif