1 /*
2   chronyd/chronyc - Programs for keeping computer clocks accurate.
3 
4  **********************************************************************
5  * Copyright (C) Richard P. Curnow  1997-2002
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of version 2 of the GNU General Public License as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  *
20  **********************************************************************
21 
22   =======================================================================
23 
24   Module header for nameserver functions
25   */
26 
27 
28 #ifndef GOT_NAMESERV_H
29 #define GOT_NAMESERV_H
30 
31 #include "addressing.h"
32 
33 typedef enum {
34   DNS_Success,
35   DNS_TryAgain,
36   DNS_Failure
37 } DNS_Status;
38 
39 /* Resolve names only to selected address family */
40 extern void DNS_SetAddressFamily(int family);
41 
42 /* Maximum number of addresses returned by DNS_Name2IPAddress */
43 #define DNS_MAX_ADDRESSES 16
44 
45 extern DNS_Status DNS_Name2IPAddress(const char *name, IPAddr *ip_addrs, int max_addrs);
46 
47 extern int DNS_IPAddress2Name(IPAddr *ip_addr, char *name, int len);
48 
49 extern void DNS_Reload(void);
50 
51 #endif /* GOT_NAMESERV_H */
52 
53