xref: /csrg-svn/include/resolv.h (revision 21311)
118138Sralph /*
2*21311Sdist  * Copyright (c) 1983 Regents of the University of California.
3*21311Sdist  * All rights reserved.  The Berkeley software License Agreement
4*21311Sdist  * specifies the terms and conditions for redistribution.
5*21311Sdist  *
6*21311Sdist  *	@(#)resolv.h	5.1 (Berkeley) 05/30/85
7*21311Sdist  */
8*21311Sdist 
9*21311Sdist /*
1018138Sralph  * Global defines and variables for resolver stub.
1118138Sralph  */
1218138Sralph 
1318138Sralph /*
1418138Sralph  * Resolver configuration file. Contains the address of the
1518138Sralph  * inital name server to query and the default domain for
1618138Sralph  * non fully qualified domain names.
1718138Sralph  */
1818138Sralph #define CONFFILE "/usr/local/lib/resolv.conf"
1918138Sralph 
2018138Sralph struct state {
2118138Sralph 	int	retrans;		/* retransmition time interval */
2218138Sralph 	int	retry;			/* number of times to retransmit */
2318138Sralph 	int	options;		/* option flags - see below. */
2418138Sralph 	struct	sockaddr_in nsaddr;	/* address of name server */
2518138Sralph 	u_short	id;			/* current packet id */
2618138Sralph 	char	defdname[MAXDNAME];	/* default domain */
2718138Sralph };
2818138Sralph 
2918138Sralph /*
3018138Sralph  * Resolver options
3118138Sralph  */
3218138Sralph #define RES_INIT	0x001		/* address initialized */
3318138Sralph #define RES_DEBUG	0x002		/* print debug messages */
3418138Sralph #define RES_AAONLY	0x004		/* authoritative answers only */
3518138Sralph #define RES_USEVC	0x008		/* use virtual circuit */
3618138Sralph #define RES_PRIMARY	0x010		/* query primary server only */
3718138Sralph #define RES_IGNTC	0x020		/* ignore trucation errors */
3818138Sralph #define RES_RECURSE	0x040		/* recursion desired */
3918138Sralph #define RES_DEFNAMES	0x080		/* use default domain name */
4018138Sralph 
4118138Sralph extern struct state _res;
4218138Sralph extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
43