[Git][NTPsec/ntpsec][master] Add lockclock to variables that ntpq can read

Hal Murray gitlab at mg.gitlab.com
Wed Jan 23 21:24:54 UTC 2019


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
0b6fcc73 by Hal Murray at 2019-01-23T21:12:48Z
Add lockclock to variables that ntpq can read

It should probably be part of the kerninfo/CS_KS_xxx
variables, but that requires renumbering things.
See issue #539

- - - - -


1 changed file:

- ntpd/ntp_control.c


Changes:

=====================================
ntpd/ntp_control.c
=====================================
@@ -230,7 +230,9 @@ static const struct ctl_proc control_codes[] = {
 #define CS_AUTHDIGESTFAIL	102
 #define CS_AUTHCMACDECRYPT	103
 #define CS_AUTHCMACFAIL		104
-#define	CS_MAXCODE		CS_AUTHCMACFAIL
+/* Should be above with other CS_K_xxx, but that requires big renumbering */
+#define CS_K_LOCKCLOCK		105
+#define	CS_MAXCODE		CS_K_LOCKCLOCK
 
 /*
  * Peer variables we understand
@@ -414,6 +416,7 @@ static const struct ctl_var sys_var[] = {
 	{ CS_AUTHDIGESTFAIL,	RO, "authdigestfails" },	/* 102 */
 	{ CS_AUTHCMACDECRYPT,	RO, "authcmacdecrypts" },	/* 103 */
 	{ CS_AUTHCMACFAIL,	RO, "authcmacfails" },		/* 104 */
+	{ CS_K_LOCKCLOCK,	RO, "lockclock" },		/* 105 */
 	{ 0,                    EOV, "" }
 };
 
@@ -1983,6 +1986,10 @@ ctl_putsys(
 		);
 		break;
 
+	case CS_K_LOCKCLOCK:
+		ctl_putuint(sys_var[varid].text, lockclock);
+		break;
+
 	case CS_IOSTATS_RESET:
 		ctl_putuint(sys_var[varid].text,
 			    current_time - pkt_count.io_timereset);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/0b6fcc735b68bb8603d8a3d47d6e93c49d908ff4

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/0b6fcc735b68bb8603d8a3d47d6e93c49d908ff4
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190123/e75b147c/attachment-0001.html>


More information about the vc mailing list