home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xntp3.zip / gizmo / gizclock_conf. next >
Text File  |  1989-09-17  |  2KB  |  85 lines

  1. /*
  2.  * gizclock_conf.c - reference clock configuration for the gizmo board
  3.  */
  4. #include <stdio.h>
  5. #include <sys/types.h>
  6. #include <sys/socket.h>
  7. #include <netinet/in.h>
  8.  
  9. #include "gizmo_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(), local_init();
  19. #endif
  20.  
  21. #ifdef PST
  22. extern int pst_start();
  23. extern void pst_shutdown(), pst_leap(), pst_control(), pst_init();
  24. #endif
  25.  
  26. #ifdef CHU
  27. extern int chu_start();
  28. extern void chu_shutdown(), chu_poll(), chu_control(), chu_init();
  29. #endif
  30.  
  31.  
  32. /*
  33.  * Order is clock_start(), clock_shutdown(), clock_poll(), clock_leap(),
  34.  * clock_control(), clock_init(), clock_xmitinterval, clock_flags;
  35.  *
  36.  * Types are defined in ntp.h.  The index must match this.
  37.  */
  38. struct refclock refclock_conf[] = {
  39.     { noentry, noentry, noentry, noentry,    /* 0 REFCLOCK_NONE */
  40.       noentry, noentry, NOPOLL, NOFLAGS },
  41.  
  42. #ifdef LOCAL_CLOCK
  43.     { local_start, local_shutdown, local_poll, noentry,
  44.       local_control, local_init, STDPOLL, NOFLAGS },
  45. #else
  46.     { noentry, noentry, noentry, noentry,    /* 1 REFCLOCK_LOCALCLOCK */
  47.       noentry, noentry, NOPOLL, NOFLAGS },
  48. #endif
  49.  
  50.     { noentry, noentry, noentry, noentry,    /* 2 REFCLOCK_WWV_HEATH */
  51.       noentry, noentry, NOPOLL, NOFLAGS },
  52.  
  53. #ifdef PST
  54.     { pst_start, pst_shutdown, noentry, pst_leap,
  55.       pst_control, pst_init, STDPOLL, REF_FLAG_BCLIENT },
  56. #else
  57.     { noentry, noentry, noentry, noentry,    /* 3 REFCLOCK_WWV_PST */
  58.       noentry, noentry, NOPOLL, NOFLAGS },
  59. #endif
  60.  
  61.     { noentry, noentry, noentry, noentry,    /* 4 REFCLOCK_WWVB_SPECTRACOM */
  62.       noentry, noentry, NOPOLL, NOFLAGS },
  63.  
  64.     { noentry, noentry, noentry, noentry,    /* 5 REFCLOCK_GOES_TRUETIME */
  65.       noentry, noentry, NOPOLL, NOFLAGS },
  66.  
  67.     { noentry, noentry, noentry, noentry,    /* 6 REFCLOCK_GOES_TRAK */
  68.       noentry, noentry, NOPOLL, NOFLAGS },
  69.  
  70. #ifdef CHU
  71.     { chu_start, chu_shutdown, chu_poll, noentry,
  72.       chu_control, chu_init, STDPOLL, NOFLAGS },
  73. #else
  74.     { noentry, noentry, noentry, noentry,    /* 7 REFCLOCK_CHU */
  75.       noentry, noentry, NOPOLL, NOFLAGS },
  76. #endif
  77.  
  78.     { noentry, noentry, noentry, noentry,    /* extra, no comma for ANSI */
  79.       noentry, noentry, NOPOLL, NOFLAGS }
  80. };
  81.  
  82. int num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock);
  83.  
  84. #endif
  85.