summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/lib/clocktypes.c
blob: 38b8cd28a6b22c1a863563e5287dacc2bc90d84c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * Data for pretty printing clock types
 */
#include <stdio.h>

#include "ntp_fp.h"
#include "ntp.h"
#include "lib_strbuf.h"
#include "ntp_refclock.h"

struct clktype clktypes[] = {
	{ REFCLK_NONE,		"unspecified type (0)",
	    "UNKNOWN" },
	{ REFCLK_LOCALCLOCK,	"Undisciplined local clock (1)",
	    "LOCAL" },
	{ REFCLK_GPS_TRAK,	"TRAK 8810 GPS Receiver (2)",
	    "GPS_TRAK" },
	{ REFCLK_WWV_PST,	"PSTI/Traconex WWV/WWVH Receiver (3)",
	    "WWV_PST" },
	{ REFCLK_WWVB_SPECTRACOM, "Spectracom WWVB Receiver (4)",
	    "WWVB_SPEC" },
	{ REFCLK_GOES_TRUETIME,	"TrueTime GPS/GOES Receivers (5)",
	    "GPS_GOES_TRUE" },
	{ REFCLK_IRIG_AUDIO,	"IRIG Audio Decoder (6)",
	    "IRIG_AUDIO" },
	{ REFCLK_CHU,		"Scratchbuilt CHU Receiver (7)",
            "CHU" },
	{ REFCLK_PARSE,		"Generic reference clock driver (8)",
	    "GENERIC" },
	{ REFCLK_GPS_MX4200,	"Magnavox MX4200 GPS Receiver (9)",
	    "GPS_MX4200" },
	{ REFCLK_GPS_AS2201,	"Austron 2201A GPS Receiver (10)",
	    "GPS_AS2201" },
	{ REFCLK_OMEGA_TRUETIME, "TrueTime OM-DC OMEGA Receiver (11)",
	    "OMEGA_TRUE" },
	{ REFCLK_IRIG_TPRO,	"KSI/Odetics TPRO/S IRIG Interface (12)",
	    "IRIG_TPRO" },
	{ REFCLK_ATOM_LEITCH,	"Leitch CSD 5300 Master Clock Controller (13)",
	    "ATOM_LEITCH" },
	{ REFCLK_MSF_EES,	"EES M201 MSF Receiver (14)",
            "MSF_EES" },
	{ REFCLK_GPSTM_TRUETIME, "TrueTime GPS/TM-TMD Receiver (15)",
	    "GPS_TRUE" },
	{ REFCLK_IRIG_BANCOMM,	"Bancomm GPS/IRIG Receiver (16)",
	    "GPS_BANC" },
	{ REFCLK_GPS_DATUM,	"Datum Precision Time System (17)",
	    "GPS_DATUM" },
	{ REFCLK_NIST_ACTS,	"NIST Automated Computer Time Service (18)",
	    "NIST_ACTS" },
	{ REFCLK_WWV_HEATH,	"Heath WWV/WWVH Receiver (19)",
	    "WWV_HEATH" },
	{ REFCLK_GPS_NMEA,	"Generic NMEA GPS Receiver (20)",
	    "GPS_NMEA" },
	{ REFCLK_GPS_MOTO,	"Motorola Six Gun GPS Receiver (21)",
	    "GPS_MOTO" },
	{ REFCLK_ATOM_PPS,	"PPS Clock Discipline (22)",
	    "ATOM_PPS" },
	{ -1,			"", "" }
};

const char *
clockname(num)
	int num;
{
	register struct clktype *clk;
  
	for (clk = clktypes; clk->code != -1; clk++) {
		if (num == clk->code)
			return (clk->abbrev);
	}
	return (NULL);
}
OpenPOWER on IntegriCloud