Commit | Line | Data |
---|---|---|
bb0cfa24 | 1 | /* |
01b2928e | 2 | * Copyright (c) 1983, 1987, 1989 The Regents of the University of California. |
7ee32d6e KB |
3 | * All rights reserved. |
4 | * | |
863005e5 | 5 | * %sccs.include.redist.c% |
bb0cfa24 | 6 | * |
863005e5 | 7 | * @(#)resolv.h 5.10 (Berkeley) %G% |
bb0cfa24 DF |
8 | */ |
9 | ||
c363c908 MK |
10 | /* |
11 | * Resolver configuration file. | |
12 | * Normally not present, but may contain the address of the | |
13 | * inital name server(s) to query and the domain search list. | |
14 | */ | |
15 | ||
16 | #ifndef _PATH_RESCONF | |
17 | #define _PATH_RESCONF "/etc/resolv.conf" | |
18 | #endif | |
19 | ||
a4b4ca70 RC |
20 | /* |
21 | * Global defines and variables for resolver stub. | |
22 | */ | |
8fa684c1 | 23 | #define MAXNS 3 /* max # name servers we'll track */ |
01b2928e MK |
24 | #define MAXDFLSRCH 3 /* # default domain levels to try */ |
25 | #define MAXDNSRCH 6 /* max # domains in search path */ | |
e0bab101 | 26 | #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ |
8fa684c1 | 27 | |
c363c908 | 28 | #define RES_TIMEOUT 5 /* min. seconds between retries */ |
8fa684c1 | 29 | |
a4b4ca70 | 30 | struct state { |
8fa684c1 | 31 | int retrans; /* retransmition time interval */ |
a4b4ca70 | 32 | int retry; /* number of times to retransmit */ |
1ca41cc2 | 33 | long options; /* option flags - see below. */ |
8fa684c1 KD |
34 | int nscount; /* number of name servers */ |
35 | struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ | |
36 | #define nsaddr nsaddr_list[0] /* for backward compatibility */ | |
a4b4ca70 RC |
37 | u_short id; /* current packet id */ |
38 | char defdname[MAXDNAME]; /* default domain */ | |
e0bab101 | 39 | char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ |
a4b4ca70 RC |
40 | }; |
41 | ||
42 | /* | |
43 | * Resolver options | |
44 | */ | |
1ca41cc2 JB |
45 | #define RES_INIT 0x0001 /* address initialized */ |
46 | #define RES_DEBUG 0x0002 /* print debug messages */ | |
47 | #define RES_AAONLY 0x0004 /* authoritative answers only */ | |
48 | #define RES_USEVC 0x0008 /* use virtual circuit */ | |
49 | #define RES_PRIMARY 0x0010 /* query primary server only */ | |
50 | #define RES_IGNTC 0x0020 /* ignore trucation errors */ | |
51 | #define RES_RECURSE 0x0040 /* recursion desired */ | |
52 | #define RES_DEFNAMES 0x0080 /* use default domain name */ | |
53 | #define RES_STAYOPEN 0x0100 /* Keep TCP socket open */ | |
e0bab101 MK |
54 | #define RES_DNSRCH 0x0200 /* search up local domain tree */ |
55 | ||
56 | #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH) | |
a4b4ca70 RC |
57 | |
58 | extern struct state _res; | |
7947e455 | 59 | extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time(); |