[Git][NTPsec/ntpsec][master] Move definition of OLD_CTL_PST_* symbols since they're now used outside of ntpq

Eric S. Raymond gitlab at mg.gitlab.com
Sun Dec 18 01:09:45 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
541b45ea by Matt Selsky at 2016-12-17T20:07:59-05:00
Move definition of OLD_CTL_PST_* symbols since they're now used outside of ntpq

Usage was moved in "Show unpacked status flags in ntpmon detail display."

- - - - -


2 changed files:

- ntpclients/ntpq
- pylib/util.py


Changes:

=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -136,19 +136,6 @@ NTP_MODE	= 0x8	# peer mode
 NTP_2BIT	= 0x9	# leap bits
 NTP_FLOAT	= 0xa	# Float value
 
-# Old CTL_PST defines for version 2.
-OLD_CTL_PST_CONFIG = 0x80
-OLD_CTL_PST_AUTHENABLE = 0x40
-OLD_CTL_PST_AUTHENTIC = 0x20
-OLD_CTL_PST_REACH = 0x10
-OLD_CTL_PST_SANE = 0x08
-OLD_CTL_PST_DISP = 0x04
-
-OLD_CTL_PST_SEL_REJECT = 0
-OLD_CTL_PST_SEL_SELCAND = 1
-OLD_CTL_PST_SEL_SYNCCAND = 2
-OLD_CTL_PST_SEL_SYSPEER = 3
-
 class Ntpq(cmd.Cmd):
     "ntpq command interpreter"
     def __init__(self, session):


=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -16,6 +16,19 @@ import ntp.version
 import ntp.magic
 import ntp.control
 
+# Old CTL_PST defines for version 2.
+OLD_CTL_PST_CONFIG = 0x80
+OLD_CTL_PST_AUTHENABLE = 0x40
+OLD_CTL_PST_AUTHENTIC = 0x20
+OLD_CTL_PST_REACH = 0x10
+OLD_CTL_PST_SANE = 0x08
+OLD_CTL_PST_DISP = 0x04
+
+OLD_CTL_PST_SEL_REJECT = 0
+OLD_CTL_PST_SEL_SELCAND = 1
+OLD_CTL_PST_SEL_SYNCCAND = 2
+OLD_CTL_PST_SEL_SYSPEER = 3
+
 def stdversion():
     return "%s-%s-%s %s" % (ntp.version.VERSION, ntp.version.VCS_TICK,
                             ntp.version.VCS_BASENAME, ntp.version.VCS_DATE)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/541b45ea507e76e331d8e9a3b416522df60e45bf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161218/f9879039/attachment.html>


More information about the vc mailing list