mbufs are smaller now, so this must be too.
[unix-history] / usr / src / include / resolv.h
CommitLineData
bb0cfa24 1/*
01b2928e 2 * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
7ee32d6e
KB
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
bb0cfa24 16 *
01b2928e 17 * @(#)resolv.h 5.8 (Berkeley) %G%
bb0cfa24
DF
18 */
19
c363c908
MK
20/*
21 * Resolver configuration file.
22 * Normally not present, but may contain the address of the
23 * inital name server(s) to query and the domain search list.
24 */
25
26#ifndef _PATH_RESCONF
27#define _PATH_RESCONF "/etc/resolv.conf"
28#endif
29
a4b4ca70
RC
30/*
31 * Global defines and variables for resolver stub.
32 */
8fa684c1 33#define MAXNS 3 /* max # name servers we'll track */
01b2928e
MK
34#define MAXDFLSRCH 3 /* # default domain levels to try */
35#define MAXDNSRCH 6 /* max # domains in search path */
e0bab101 36#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
8fa684c1 37
c363c908 38#define RES_TIMEOUT 5 /* min. seconds between retries */
8fa684c1 39
a4b4ca70 40struct state {
8fa684c1 41 int retrans; /* retransmition time interval */
a4b4ca70 42 int retry; /* number of times to retransmit */
1ca41cc2 43 long options; /* option flags - see below. */
8fa684c1
KD
44 int nscount; /* number of name servers */
45 struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */
46#define nsaddr nsaddr_list[0] /* for backward compatibility */
a4b4ca70
RC
47 u_short id; /* current packet id */
48 char defdname[MAXDNAME]; /* default domain */
e0bab101 49 char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
a4b4ca70
RC
50};
51
52/*
53 * Resolver options
54 */
1ca41cc2
JB
55#define RES_INIT 0x0001 /* address initialized */
56#define RES_DEBUG 0x0002 /* print debug messages */
57#define RES_AAONLY 0x0004 /* authoritative answers only */
58#define RES_USEVC 0x0008 /* use virtual circuit */
59#define RES_PRIMARY 0x0010 /* query primary server only */
60#define RES_IGNTC 0x0020 /* ignore trucation errors */
61#define RES_RECURSE 0x0040 /* recursion desired */
62#define RES_DEFNAMES 0x0080 /* use default domain name */
63#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */
e0bab101
MK
64#define RES_DNSRCH 0x0200 /* search up local domain tree */
65
66#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
a4b4ca70
RC
67
68extern struct state _res;
69extern char *p_cdname(), *p_rr(), *p_type(), *p_class();