summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd440b6)
raw | patch | inline | side by side (parent: fd440b6)
author | Holger Weiss <hweiss@users.sourceforge.net> | |
Tue, 3 Apr 2007 17:19:04 +0000 (17:19 +0000) | ||
committer | Holger Weiss <hweiss@users.sourceforge.net> | |
Tue, 3 Apr 2007 17:19:04 +0000 (17:19 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1675 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_ntp.c | patch | blob | history |
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index cf63eea65c8665a1c872eb311ddbf8ab2f5462bf..30e589006c6ea04c31a9d529ad207e40bf880f7e 100644 (file)
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
#define OP_SET(x,y) do{ x |= (y&OP_MASK); }while(0)
#define OP_READSTAT 0x01
#define OP_READVAR 0x02
-/* In peer status bytes, bytes 6,7,8 determine clock selection status */
-#define PEER_SEL(x) (x&0x07)
+/* In peer status bytes, bits 6,7,8 determine clock selection status */
+#define PEER_SEL(x) ((ntohs(x)>>8)&0x07)
#define PEER_INCLUDED 0x04
#define PEER_SYNCSOURCE 0x06