home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 25.ddi / root.2 / usr / ucbinclude / resolv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.1 KB  |  91 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10.  
  11. #ident    "@(#)//usr/ucbinclude/resolv.h.sl 1.1 4.0 12/08/90 22716 AT&T-USL"
  12.  
  13. /*******************************************************************
  14.  
  15.         PROPRIETARY NOTICE (Combined)
  16.  
  17. This source code is unpublished proprietary information
  18. constituting, or derived under license from AT&T's UNIX(r) System V.
  19. In addition, portions of such source code were derived from Berkeley
  20. 4.3 BSD under license from the Regents of the University of
  21. California.
  22.  
  23.  
  24.  
  25.         Copyright Notice 
  26.  
  27. Notice of copyright on this source code product does not indicate 
  28. publication.
  29.  
  30.     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  31.     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  32.               All rights reserved.
  33. ********************************************************************/ 
  34.  
  35. /*
  36.  * Copyright (c) 1983, 1987 Regents of the University of California.
  37.  * All rights reserved.  The Berkeley software License Agreement
  38.  * specifies the terms and conditions for redistribution.
  39.  */
  40.  
  41. /*
  42.  * Global defines and variables for resolver stub.
  43.  */
  44.  
  45. #ifndef _resolv_h
  46. #define _resolv_h
  47.  
  48. #define ADDRSORT    1        /* enable the address-sorting option */
  49. #define MAXADDR        10        /* max # addresses to sort by */
  50.  
  51. #define    MAXNS        3        /* max # name servers we'll track */
  52. #define    MAXDNSRCH    3        /* max # default domain levels to try */
  53. #define    LOCALDOMAINPARTS 2        /* min levels in name that is "local" */
  54.  
  55. #define    RES_TIMEOUT    6        /* seconds between retries */
  56.  
  57. struct state {
  58.     int    retrans;         /* retransmition time interval */
  59.     int    retry;            /* number of times to retransmit */
  60.     long    options;        /* option flags - see below. */
  61.     int    nscount;        /* number of name servers */
  62.     struct    sockaddr_in nsaddr_list[MAXNS];    /* address of name server */
  63. #define    nsaddr    nsaddr_list[0]        /* for backward compatibility */
  64.     u_short    id;            /* current packet id */
  65.     char    defdname[MAXDNAME];    /* default domain */
  66.     char    *dnsrch[MAXDNSRCH+1];    /* components of domain to search */
  67.      int     ascount;        /* number of addresses */
  68.     struct  in_addr sort_list[MAXADDR]; /* address sorting list */
  69. };
  70.  
  71. /*
  72.  * Resolver options
  73.  */
  74. #define RES_INIT    0x0001        /* address initialized */
  75. #define RES_DEBUG    0x0002        /* print debug messages */
  76. #define RES_AAONLY    0x0004        /* authoritative answers only */
  77. #define RES_USEVC    0x0008        /* use virtual circuit */
  78. #define RES_PRIMARY    0x0010        /* query primary server only */
  79. #define RES_IGNTC    0x0020        /* ignore trucation errors */
  80. #define RES_RECURSE    0x0040        /* recursion desired */
  81. #define RES_DEFNAMES    0x0080        /* use default domain name */
  82. #define RES_STAYOPEN    0x0100        /* Keep TCP socket open */
  83. #define RES_DNSRCH    0x0200        /* search up local domain tree */
  84.  
  85. #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  86.  
  87. extern struct state _res;
  88. extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
  89.  
  90. #endif /*!_resolv_h*/
  91.