summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ntpd/client.c6
-rw-r--r--usr.sbin/ntpd/ntp.h4
-rw-r--r--usr.sbin/ntpd/ntpd.h9
3 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index c1dd2c25fce..ea706f94ffc 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.4 2004/07/04 19:52:24 henning Exp $ */
+/* $OpenBSD: client.c,v 1.5 2004/07/04 22:24:20 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -86,7 +86,7 @@ client_query(struct ntp_peer *p)
NTP_MSGSIZE_NOAUTH, 0);
p->state = STATE_QUERY_SENT;
p->next = 0;
- p->deadline = time(NULL) + MAX_QUERYTIME;
+ p->deadline = time(NULL) + QUERYTIME_MAX;
return (0);
}
@@ -139,7 +139,7 @@ client_dispatch(struct ntp_peer *p)
p->error = (T2 - T1) - (T3 - T4);
p->state = STATE_REPLY_RECEIVED;
- p->next = time(NULL) + QUERY_INTERVAL;
+ p->next = time(NULL) + INTERVAL_QUERY;
p->deadline = 0;
log_debug("reply received: offset %f error %f", p->offset, p->error);
diff --git a/usr.sbin/ntpd/ntp.h b/usr.sbin/ntpd/ntp.h
index 8a3c49ae5d0..61578f84c8b 100644
--- a/usr.sbin/ntpd/ntp.h
+++ b/usr.sbin/ntpd/ntp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.h,v 1.6 2004/07/04 11:01:49 alexander Exp $ */
+/* $OpenBSD: ntp.h,v 1.7 2004/07/04 22:24:20 henning Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -145,7 +145,5 @@ struct ntp_query {
#define JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
#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_ */
diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h
index 85fcb273fbb..77316d5a6c4 100644
--- a/usr.sbin/ntpd/ntpd.h
+++ b/usr.sbin/ntpd/ntpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.h,v 1.8 2004/07/04 11:01:49 alexander Exp $ */
+/* $OpenBSD: ntpd.h,v 1.9 2004/07/04 22:24:20 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -33,8 +33,11 @@
#define IDX2PEER_RESERVE 5
#define PFD_RESERVE 10
-#define NTPD_OPT_VERBOSE 0x0001
-#define NTPD_OPT_VERBOSE2 0x0002
+#define NTPD_OPT_VERBOSE 0x0001
+#define NTPD_OPT_VERBOSE2 0x0002
+
+#define INTERVAL_QUERY 60 /* sync with peers every n seconds */
+#define QUERYTIME_MAX 30 /* single query might take n secs max */
enum client_state {
STATE_NONE,