home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
x
/
xntp3.zip
/
xntpd
/
refclock_conf.
< prev
next >
Wrap
Text File
|
1992-08-29
|
4KB
|
135 lines
/*
* refclock_conf.c - reference clock configuration
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "ntp_syslog.h"
#include "ntp_fp.h"
#include "ntp.h"
#include "ntp_refclock.h"
#ifdef REFCLOCK
#ifdef LOCAL_CLOCK
extern int local_start();
extern void local_shutdown(), local_poll(), local_control();
extern void local_init();
#endif
#ifdef PST
extern int pst_start();
extern void pst_shutdown(), pst_control();
extern void pst_init(), pst_buginfo();
#endif
#ifdef CHU
extern int chu_start();
extern void chu_shutdown(), chu_poll(), chu_control();
extern void chu_init();
#endif
#ifdef GOES
extern int goes_start();
extern void goes_shutdown(), goes_poll(), goes_control();
extern void goes_init();
#endif
#ifdef WWVB
extern int wwvb_start();
extern void wwvb_shutdown(), wwvb_poll(), wwvb_control();
extern void wwvb_init(), wwvb_buginfo();
#endif
#ifdef DCF
extern int dcf_start();
extern void dcf_shutdown(), dcf_poll(), dcf_control(), dcf_init();
#endif
#ifdef MX4200
extern int mx4200_start();
extern void mx4200_shutdown(), mx4200_control();
extern void mx4200_init(), mx4200_buginfo();
#endif
/*
* Order is clock_start(), clock_shutdown(), clock_poll(), (unused),
* clock_control(), clock_init(), clock_xmitinterval, clock_flags;
*
* Types are defined in ntp.h. The index must match this.
*/
struct refclock refclock_conf[] = {
{ noentry, noentry, noentry, noentry, /* 0 REFCLK_NONE */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#ifdef LOCAL_CLOCK
{ local_start, local_shutdown, local_poll, noentry,
local_control, local_init, noentry, STDPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 1 REFCLK_LOCALCLOCK */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
{ noentry, noentry, noentry, noentry, /* 2 REFCLK_WWV_HEATH */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#ifdef PST
{ pst_start, pst_shutdown, noentry, noentry,
pst_control, pst_init, pst_buginfo, STDPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 3 REFCLK_WWV_PST */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
#ifdef WWVB
{ wwvb_start, wwvb_shutdown, wwvb_poll, noentry,
wwvb_control, wwvb_init, wwvb_buginfo, STDPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 4 REFCLK_WWVB_SPECTRACOM */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
#ifdef GOES
{ goes_start, goes_shutdown, goes_poll, noentry,
goes_control, goes_init, noentry, STDPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 5 REFCLK_GOES_TRUETIME */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
{ noentry, noentry, noentry, noentry, /* 6 REFCLK_GOES_TRAK */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#ifdef CHU
{ chu_start, chu_shutdown, chu_poll, noentry,
chu_control, chu_init, noentry, STDPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 7 REFCLK_CHU */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
#ifdef DCF
{ dcf_start, dcf_shutdown, dcf_poll, noentry,
dcf_control, dcf_init, noentry, STDPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 8 REFCLK_DCF77 */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
#ifdef MX4200
{ mx4200_start, mx4200_shutdown, noentry, noentry,
mx4200_control, mx4200_init, mx4200_buginfo, NOPOLL, NOFLAGS },
#else
{ noentry, noentry, noentry, noentry, /* 10 REFCLK_GPS_MX4200 */
noentry, noentry, noentry, NOPOLL, NOFLAGS },
#endif
{ noentry, noentry, noentry, noentry, /* extra, no comma for ANSI */
noentry, noentry, noentry, NOPOLL, NOFLAGS }
};
int num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock);
#endif