|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983, 1987, 1989 The Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution and use in source and binary forms are permitted ! 6: * provided that: (1) source distributions retain this entire copyright ! 7: * notice and comment, and (2) distributions including binaries display ! 8: * the following acknowledgement: ``This product includes software ! 9: * developed by the University of California, Berkeley and its contributors'' ! 10: * in the documentation or other materials provided with the distribution ! 11: * and in all advertising materials mentioning features or use of this ! 12: * software. Neither the name of the University nor the names of its ! 13: * contributors may be used to endorse or promote products derived ! 14: * from this software without specific prior written permission. ! 15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 16: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 18: * ! 19: * @(#)resolv.h 5.10 (Berkeley) 6/1/90 ! 20: */ ! 21: ! 22: /* ! 23: * Resolver configuration file. ! 24: * Normally not present, but may contain the address of the ! 25: * inital name server(s) to query and the domain search list. ! 26: */ ! 27: ! 28: #ifndef _PATH_RESCONF ! 29: #define _PATH_RESCONF "/etc/resolv.conf" ! 30: #endif ! 31: ! 32: /* ! 33: * Global defines and variables for resolver stub. ! 34: */ ! 35: #define MAXNS 3 /* max # name servers we'll track */ ! 36: #define MAXDFLSRCH 3 /* # default domain levels to try */ ! 37: #define MAXDNSRCH 6 /* max # domains in search path */ ! 38: #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ ! 39: ! 40: #define RES_TIMEOUT 5 /* min. seconds between retries */ ! 41: ! 42: struct state { ! 43: int retrans; /* retransmition time interval */ ! 44: int retry; /* number of times to retransmit */ ! 45: long options; /* option flags - see below. */ ! 46: int nscount; /* number of name servers */ ! 47: struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ ! 48: #define nsaddr nsaddr_list[0] /* for backward compatibility */ ! 49: u_short id; /* current packet id */ ! 50: char defdname[MAXDNAME]; /* default domain */ ! 51: char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ ! 52: }; ! 53: ! 54: /* ! 55: * Resolver options ! 56: */ ! 57: #define RES_INIT 0x0001 /* address initialized */ ! 58: #define RES_DEBUG 0x0002 /* print debug messages */ ! 59: #define RES_AAONLY 0x0004 /* authoritative answers only */ ! 60: #define RES_USEVC 0x0008 /* use virtual circuit */ ! 61: #define RES_PRIMARY 0x0010 /* query primary server only */ ! 62: #define RES_IGNTC 0x0020 /* ignore trucation errors */ ! 63: #define RES_RECURSE 0x0040 /* recursion desired */ ! 64: #define RES_DEFNAMES 0x0080 /* use default domain name */ ! 65: #define RES_STAYOPEN 0x0100 /* Keep TCP socket open */ ! 66: #define RES_DNSRCH 0x0200 /* search up local domain tree */ ! 67: ! 68: #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH) ! 69: ! 70: extern struct state _res; ! 71: extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.