summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/ntp.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-06-17 19:17:49 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-06-17 19:17:49 +0000
commitb4ad8c9613e23bfa3e8ee4bae1b99b115fd63661 (patch)
treee13c30549b43adad7446b7ccd3677e945b6cce7f /usr.sbin/ntpd/ntp.h
parentf9e4cdc6e99bc859ee7e13773d3407643fe12f04 (diff)
provide most of the client functionality.
hook the descriptors into the main poll and such. we're not doing anything with the reply we recive yet, tho. mostly hacked on the Frankfurt->Montreal flight, as batteries and those horrible air canada seats permitted...
Diffstat (limited to 'usr.sbin/ntpd/ntp.h')
-rw-r--r--usr.sbin/ntpd/ntp.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntp.h b/usr.sbin/ntpd/ntp.h
index 461de9d8ead..8a63c006904 100644
--- a/usr.sbin/ntpd/ntp.h
+++ b/usr.sbin/ntpd/ntp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.h,v 1.4 2004/06/05 12:29:15 alexander Exp $ */
+/* $OpenBSD: ntp.h,v 1.5 2004/06/17 19:17:48 henning Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -109,6 +109,12 @@ struct ntp_msg {
u_int8_t digest[NTP_DIGESTSIZE];
};
+struct ntp_query {
+ int fd;
+ struct ntp_msg msg;
+ struct l_fixedpt xmttime;
+};
+
/*
* Leap Second Codes (high order two bits)
*/
@@ -138,4 +144,8 @@ struct ntp_msg {
#define JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
-#endif /* _NTP_H_ */
+#define NTP_VERSION 4
+#define MAX_QUERYTIME 30 /* max seconds a single query might take */
+#define QUERY_INTERVAL 60 /* sync with peers every n seconds */
+
+#endif /* _NTP_H_ */