From 760bec6544643218f1fc77a3ca80d4d3c7d203c5 Mon Sep 17 00:00:00 2001 From: alexander <> Date: Sat, 5 Jun 2004 12:29:15 +0000 Subject: [PATCH] Move prototype definitions. Add multi-include protection to header. ok henning@ --- src/usr.sbin/ntpd/ntp.h | 16 +++++----------- src/usr.sbin/ntpd/ntpd.h | 12 +++++++++++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/usr.sbin/ntpd/ntp.h b/src/usr.sbin/ntpd/ntp.h index 489a8d20..461de9d8 100644 --- a/src/usr.sbin/ntpd/ntp.h +++ b/src/usr.sbin/ntpd/ntp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.h,v 1.3 2004/06/02 10:08:59 henning Exp $ */ +/* $OpenBSD: ntp.h,v 1.4 2004/06/05 12:29:15 alexander Exp $ */ /* * Copyright (c) 2004 Henning Brauer @@ -17,6 +17,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef _NTP_H_ +#define _NTP_H_ + /* Style borrowed from NTP ref/tcpdump and updated for SNTPv4 (RFC2030). */ /* @@ -135,13 +138,4 @@ struct ntp_msg { #define JAN_1970 2208988800UL /* 1970 - 1900 in seconds */ -/* prototypes */ - -/* ntp_msg.c */ -void get_ts(struct l_fixedpt *); -int ntp_getmsg(char *, ssize_t, struct ntp_msg *); -int ntp_sendmsg(int, struct sockaddr *, struct ntp_msg *, ssize_t, int); - -/* server.c */ -int setup_listeners(struct servent *, struct ntpd_conf *); -int ntp_reply(int, struct sockaddr *, struct ntp_msg *, int); +#endif /* _NTP_H_ */ diff --git a/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h index 078facd7..44e75c1f 100644 --- a/src/usr.sbin/ntpd/ntpd.h +++ b/src/usr.sbin/ntpd/ntpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.h,v 1.4 2004/06/02 10:08:59 henning Exp $ */ +/* $OpenBSD: ntpd.h,v 1.5 2004/06/05 12:29:15 alexander Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -24,6 +24,8 @@ #include #include +#include "ntp.h" + #define NTPD_USER "_ntp" #define CONFFILE "/etc/ntpd.conf" @@ -134,3 +136,11 @@ int cmdline_symset(char *); int check_file_secrecy(int, const char *); int host(const char *, struct sockaddr *, u_int8_t *); +/* ntp_msg.c */ +void get_ts(struct l_fixedpt *); +int ntp_getmsg(char *, ssize_t, struct ntp_msg *); +int ntp_sendmsg(int, struct sockaddr *, struct ntp_msg *, ssize_t, int); + +/* server.c */ +int setup_listeners(struct servent *, struct ntpd_conf *); +int ntp_reply(int, struct sockaddr *, struct ntp_msg *, int);