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 >
Text File  |  1992-08-29  |  4KB  |  135 lines

  1. /*
  2.  * refclock_conf.c - reference clock configuration
  3.  */
  4. #include <stdio.h>
  5. #include <sys/types.h>
  6. #include <sys/socket.h>
  7. #include <netinet/in.h>
  8.  
  9. #include "ntp_syslog.h"
  10. #include "ntp_fp.h"
  11. #include "ntp.h"
  12. #include "ntp_refclock.h"
  13.  
  14. #ifdef REFCLOCK
  15.  
  16. #ifdef LOCAL_CLOCK
  17. extern int local_start();
  18. extern void local_shutdown(), local_poll(), local_control();
  19. extern void local_init();
  20. #endif
  21.  
  22. #ifdef PST
  23. extern int pst_start();
  24. extern void pst_shutdown(), pst_control();
  25. extern void pst_init(), pst_buginfo();
  26. #endif
  27.  
  28. #ifdef CHU
  29. extern int chu_start();
  30. extern void chu_shutdown(), chu_poll(), chu_control();
  31. extern void chu_init();
  32. #endif
  33.  
  34. #ifdef GOES
  35. extern int goes_start();
  36. extern void goes_shutdown(), goes_poll(), goes_control();
  37. extern void goes_init();
  38. #endif
  39.  
  40. #ifdef WWVB
  41. extern int wwvb_start();
  42. extern void wwvb_shutdown(), wwvb_poll(), wwvb_control();
  43. extern void wwvb_init(), wwvb_buginfo();
  44. #endif
  45.  
  46. #ifdef DCF
  47. extern int dcf_start();
  48. extern void dcf_shutdown(), dcf_poll(), dcf_control(), dcf_init();
  49. #endif
  50.  
  51. #ifdef MX4200
  52. extern int mx4200_start();
  53. extern void mx4200_shutdown(), mx4200_control();
  54. extern void mx4200_init(), mx4200_buginfo();
  55. #endif
  56.  
  57. /*
  58.  * Order is clock_start(), clock_shutdown(), clock_poll(), (unused),
  59.  * clock_control(), clock_init(), clock_xmitinterval, clock_flags;
  60.  *
  61.  * Types are defined in ntp.h.  The index must match this.
  62.  */
  63. struct refclock refclock_conf[] = {
  64.     { noentry, noentry, noentry, noentry,    /* 0 REFCLK_NONE */
  65.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  66.  
  67. #ifdef LOCAL_CLOCK
  68.     { local_start, local_shutdown, local_poll, noentry,
  69.       local_control, local_init, noentry, STDPOLL, NOFLAGS },
  70. #else
  71.     { noentry, noentry, noentry, noentry,    /* 1 REFCLK_LOCALCLOCK */
  72.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  73. #endif
  74.  
  75.     { noentry, noentry, noentry, noentry,    /* 2 REFCLK_WWV_HEATH */
  76.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  77.  
  78. #ifdef PST
  79.     { pst_start, pst_shutdown, noentry, noentry,
  80.       pst_control, pst_init, pst_buginfo, STDPOLL, NOFLAGS },
  81. #else
  82.     { noentry, noentry, noentry, noentry,    /* 3 REFCLK_WWV_PST */
  83.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  84. #endif
  85.  
  86. #ifdef WWVB
  87.     { wwvb_start, wwvb_shutdown, wwvb_poll, noentry,
  88.       wwvb_control, wwvb_init, wwvb_buginfo, STDPOLL, NOFLAGS },
  89. #else
  90.     { noentry, noentry, noentry, noentry,    /* 4 REFCLK_WWVB_SPECTRACOM */
  91.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  92. #endif
  93.  
  94. #ifdef GOES
  95.     { goes_start, goes_shutdown, goes_poll, noentry,
  96.       goes_control, goes_init, noentry, STDPOLL, NOFLAGS },
  97. #else
  98.     { noentry, noentry, noentry, noentry,    /* 5 REFCLK_GOES_TRUETIME */
  99.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  100. #endif
  101.  
  102.     { noentry, noentry, noentry, noentry,    /* 6 REFCLK_GOES_TRAK */
  103.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  104.  
  105. #ifdef CHU
  106.     { chu_start, chu_shutdown, chu_poll, noentry,
  107.       chu_control, chu_init, noentry, STDPOLL, NOFLAGS },
  108. #else
  109.     { noentry, noentry, noentry, noentry,    /* 7 REFCLK_CHU */
  110.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  111. #endif
  112. #ifdef DCF
  113.     { dcf_start, dcf_shutdown, dcf_poll, noentry,
  114.       dcf_control, dcf_init, noentry, STDPOLL, NOFLAGS },
  115. #else
  116.     { noentry, noentry, noentry, noentry,    /* 8 REFCLK_DCF77 */
  117.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  118. #endif
  119.  
  120. #ifdef MX4200
  121.     { mx4200_start, mx4200_shutdown, noentry, noentry,
  122.       mx4200_control, mx4200_init, mx4200_buginfo, NOPOLL, NOFLAGS },
  123. #else
  124.     { noentry, noentry, noentry, noentry,    /* 10 REFCLK_GPS_MX4200 */
  125.       noentry, noentry, noentry, NOPOLL, NOFLAGS },
  126. #endif
  127.  
  128.     { noentry, noentry, noentry, noentry,    /* extra, no comma for ANSI */
  129.       noentry, noentry, noentry, NOPOLL, NOFLAGS }
  130. };
  131.  
  132. int num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock);
  133.  
  134. #endif
  135.