Browse Source

Move prototype definitions. Add multi-include protection to header.

ok henning@
OPENBSD_3_6
alexander 20 years ago
parent
commit
760bec6544
2 changed files with 16 additions and 12 deletions
  1. +5
    -11
      src/usr.sbin/ntpd/ntp.h
  2. +11
    -1
      src/usr.sbin/ntpd/ntpd.h

+ 5
- 11
src/usr.sbin/ntpd/ntp.h View File

@ -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 <henning@openbsd.org> * Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@ -17,6 +17,9 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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). */ /* 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 */ #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_ */

+ 11
- 1
src/usr.sbin/ntpd/ntpd.h View File

@ -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 <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -24,6 +24,8 @@
#include <netdb.h> #include <netdb.h>
#include <stdarg.h> #include <stdarg.h>
#include "ntp.h"
#define NTPD_USER "_ntp" #define NTPD_USER "_ntp"
#define CONFFILE "/etc/ntpd.conf" #define CONFFILE "/etc/ntpd.conf"
@ -134,3 +136,11 @@ int cmdline_symset(char *);
int check_file_secrecy(int, const char *); int check_file_secrecy(int, const char *);
int host(const char *, struct sockaddr *, u_int8_t *); 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);

Loading…
Cancel
Save