1 /* 2 * Configuration file name 3 */ 4 #ifndef CONFIG_FILE 5 # ifndef SYS_WINNT 6 # define CONFIG_FILE "/etc/ntp.conf" 7 # else /* SYS_WINNT */ 8 # define CONFIG_FILE "%windir%\\system32\\drivers\\etc\\ntp.conf" 9 # define ALT_CONFIG_FILE "%windir%\\ntp.conf" 10 # endif /* SYS_WINNT */ 11 #endif /* not CONFIG_FILE */ 12 13 /* 14 * Types of entries we understand. 15 */ 16 #define CONFIG_UNKNOWN 0 17 18 /* 19 * Command keywords 20 */ 21 #define CONFIG_PEER 1 22 #define CONFIG_SERVER 2 23 #define CONFIG_AUTOMAX 3 24 #define CONFIG_DRIFTFILE 4 25 #define CONFIG_BROADCAST 5 26 #define CONFIG_BROADCASTCLIENT 6 27 #define CONFIG_AUTHENTICATE 7 28 #define CONFIG_KEYS 8 29 #define CONFIG_REVOKE 9 30 #define CONFIG_PPS 10 31 #define CONFIG_RESTRICT 11 32 #define CONFIG_BDELAY 12 33 #define CONFIG_TRUSTEDKEY 13 34 #define CONFIG_REQUESTKEY 14 35 #define CONFIG_CONTROLKEY 15 36 #define CONFIG_TRAP 16 37 #define CONFIG_FUDGE 17 38 #define CONFIG_TINKER 18 39 #define CONFIG_STATSDIR 19 40 #define CONFIG_FILEGEN 20 41 #define CONFIG_STATISTICS 21 42 #define CONFIG_PIDFILE 22 43 #define CONFIG_SETVAR 23 44 #define CONFIG_CLIENTLIMIT 24 45 #define CONFIG_CLIENTPERIOD 25 46 #define CONFIG_MULTICASTCLIENT 26 47 #define CONFIG_ENABLE 27 48 #define CONFIG_DISABLE 28 49 #define CONFIG_PHONE 29 50 #define CONFIG_LOGFILE 30 51 #define CONFIG_LOGCONFIG 31 52 #define CONFIG_MANYCASTCLIENT 32 53 #define CONFIG_MANYCASTSERVER 33 54 #ifdef PUBKEY 55 #define CONFIG_CRYPTO 34 56 #define CONFIG_KEYSDIR 35 57 #endif /* PUBKEY */ 58 #define CONFIG_INCLUDEFILE 36 59 60 /* 61 * "peer", "server", "broadcast" modifier keywords 62 */ 63 #define CONF_MOD_VERSION 1 64 #define CONF_MOD_KEY 2 65 #define CONF_MOD_MINPOLL 3 66 #define CONF_MOD_MAXPOLL 4 67 #define CONF_MOD_PREFER 5 68 #define CONF_MOD_BURST 6 69 #define CONF_MOD_IBURST 7 70 #define CONF_MOD_SKEY 8 71 #define CONF_MOD_TTL 9 72 #define CONF_MOD_MODE 10 73 #define CONF_MOD_NOSELECT 11 74 #ifdef PUBKEY 75 #define CONF_MOD_PUBLICKEY 12 76 #endif /* PUBKEY */ 77 78 /* 79 * "restrict" modifier keywords 80 */ 81 #define CONF_RES_MASK 1 82 #define CONF_RES_IGNORE 2 83 #define CONF_RES_NOSERVE 3 84 #define CONF_RES_NOTRUST 4 85 #define CONF_RES_NOQUERY 5 86 #define CONF_RES_NOMODIFY 6 87 #define CONF_RES_NOPEER 7 88 #define CONF_RES_NOTRAP 8 89 #define CONF_RES_LPTRAP 9 90 #define CONF_RES_NTPPORT 10 91 #define CONF_RES_LIMITED 11 92 #define CONF_RES_VERSION 12 93 #define CONF_RES_DEMOBILIZE 13 94 95 /* 96 * "trap" modifier keywords 97 */ 98 #define CONF_TRAP_PORT 1 99 #define CONF_TRAP_INTERFACE 2 100 101 /* 102 * "fudge" modifier keywords 103 */ 104 #define CONF_FDG_TIME1 1 105 #define CONF_FDG_TIME2 2 106 #define CONF_FDG_STRATUM 3 107 #define CONF_FDG_REFID 4 108 #define CONF_FDG_FLAG1 5 109 #define CONF_FDG_FLAG2 6 110 #define CONF_FDG_FLAG3 7 111 #define CONF_FDG_FLAG4 8 112 113 /* 114 * "filegen" modifier keywords 115 */ 116 #define CONF_FGEN_FILE 1 117 #define CONF_FGEN_TYPE 2 118 #define CONF_FGEN_FLAG_LINK 3 119 #define CONF_FGEN_FLAG_NOLINK 4 120 #define CONF_FGEN_FLAG_ENABLE 5 121 #define CONF_FGEN_FLAG_DISABLE 6 122 123 /* 124 * "pps" modifier keywords 125 */ 126 #define CONF_PPS_ASSERT 1 127 #define CONF_PPS_CLEAR 2 128 #define CONF_PPS_HARDPPS 3 129 130 /* 131 * "tinker" modifier keywords 132 */ 133 #define CONF_CLOCK_MAX 1 134 #define CONF_CLOCK_PANIC 2 135 #define CONF_CLOCK_PHI 3 136 #define CONF_CLOCK_MINSTEP 4 137 #define CONF_CLOCK_MINPOLL 5 138 #define CONF_CLOCK_ALLAN 6 139 #define CONF_CLOCK_HUFFPUFF 7 140 141 #ifdef PUBKEY 142 /* 143 * "crypto" modifier keywords 144 */ 145 #define CONF_CRYPTO_DH 1 146 #define CONF_CRYPTO_PRIVATEKEY 2 147 #define CONF_CRYPTO_PUBLICKEY 3 148 #define CONF_CRYPTO_LEAP 4 149 #define CONF_CRYPTO_FLAGS 5 150 #define CONF_CRYPTO_CERT 6 151 #endif /* PUBKEY */ 152