From 4c0eb2b75685b4fb44e8801eda33bd7d1c07c161 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Wed, 7 Jul 2004 03:15:38 +0000 Subject: swicth all the host_* functions to work on a newly invented struct ntp_addr, which just wraps a sockaddr_storage and a next pointer, so that host_dns can return more than one entry. let host_dns do exactly that, return a list of all IPs for that hostname adjust all callers in the grammar to cope with that --- usr.sbin/ntpd/ntpd.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ntpd/ntpd.h') diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h index 48b6be875d1..bef5936a174 100644 --- a/usr.sbin/ntpd/ntpd.h +++ b/usr.sbin/ntpd/ntpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.h,v 1.14 2004/07/07 01:01:27 henning Exp $ */ +/* $OpenBSD: ntpd.h,v 1.15 2004/07/07 03:15:37 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -61,6 +61,11 @@ struct listen_addr { int fd; }; +struct ntp_addr { + struct ntp_addr *next; + struct sockaddr_storage ss; +}; + struct ntp_offset { u_int8_t good; double offset; @@ -177,8 +182,8 @@ int parse_config(char *, struct ntpd_conf *); int cmdline_symset(char *); /* config.c */ -int check_file_secrecy(int, const char *); -int host(const char *, struct sockaddr *, u_int8_t *); +int check_file_secrecy(int, const char *); +struct ntp_addr *host(const char *, u_int8_t *); /* ntp_msg.c */ void get_ts(struct l_fixedpt *); -- cgit v1.2.3