Commit | Line | Data |
---|---|---|
8fa684c1 | 1 | |
bb0cfa24 DF |
2 | /* |
3 | * Copyright (c) 1983 Regents of the University of California. | |
4 | * All rights reserved. The Berkeley software License Agreement | |
5 | * specifies the terms and conditions for redistribution. | |
6 | * | |
1ca41cc2 | 7 | * @(#)resolv.h 5.4 (Berkeley) %G% |
bb0cfa24 DF |
8 | */ |
9 | ||
a4b4ca70 RC |
10 | /* |
11 | * Global defines and variables for resolver stub. | |
12 | */ | |
13 | ||
a4b4ca70 | 14 | |
8fa684c1 KD |
15 | #define MAXNS 3 /* max # name servers we'll track */ |
16 | ||
17 | ||
a4b4ca70 | 18 | struct state { |
8fa684c1 | 19 | int retrans; /* retransmition time interval */ |
a4b4ca70 | 20 | int retry; /* number of times to retransmit */ |
1ca41cc2 | 21 | long options; /* option flags - see below. */ |
8fa684c1 KD |
22 | int nscount; /* number of name servers */ |
23 | struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ | |
24 | #define nsaddr nsaddr_list[0] /* for backward compatibility */ | |
a4b4ca70 RC |
25 | u_short id; /* current packet id */ |
26 | char defdname[MAXDNAME]; /* default domain */ | |
27 | }; | |
28 | ||
29 | /* | |
30 | * Resolver options | |
31 | */ | |
1ca41cc2 JB |
32 | #define RES_INIT 0x0001 /* address initialized */ |
33 | #define RES_DEBUG 0x0002 /* print debug messages */ | |
34 | #define RES_AAONLY 0x0004 /* authoritative answers only */ | |
35 | #define RES_USEVC 0x0008 /* use virtual circuit */ | |
36 | #define RES_PRIMARY 0x0010 /* query primary server only */ | |
37 | #define RES_IGNTC 0x0020 /* ignore trucation errors */ | |
38 | #define RES_RECURSE 0x0040 /* recursion desired */ | |
39 | #define RES_DEFNAMES 0x0080 /* use default domain name */ | |
40 | #define RES_STAYOPEN 0x0100 /* Keep TCP socket open */ | |
a4b4ca70 RC |
41 | |
42 | extern struct state _res; | |
43 | extern char *p_cdname(), *p_rr(), *p_type(), *p_class(); |