home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircd4652.zip / ircd-df-4.6.5-os2 / include / resolv.h < prev    next >
C/C++ Source or Header  |  1997-12-28  |  3KB  |  79 lines

  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.1 (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. #define MAXSERVICES    2        /* max # of services to search */
  40.  
  41. #define    RES_TIMEOUT    5        /* min. seconds between retries */
  42.  
  43. struct state {
  44.     int    retrans;         /* retransmition time interval */
  45.     int    retry;            /* number of times to retransmit */
  46.     long    options;        /* option flags - see below. */
  47.     int    nscount;        /* number of name servers */
  48.     struct    sockaddr_in nsaddr_list[MAXNS];    /* address of name server */
  49. #define    nsaddr    nsaddr_list[0]        /* for backward compatibility */
  50.     unsigned short    id;            /* current packet id */
  51.     char    defdname[MAXDNAME];    /* default domain */
  52.     char    *dnsrch[MAXDNSRCH+1];    /* components of domain to search */
  53.     unsigned short    order[MAXSERVICES+1];    /* search service order */
  54. };
  55.  
  56. #define RES_SERVICE_NONE    0
  57. #define RES_SERVICE_BIND    1
  58. #define RES_SERVICE_LOCAL    2
  59.  
  60. /*
  61.  * Resolver options
  62.  */
  63. #define RES_INIT    0x0001        /* address initialized */
  64. #define RES_DEBUG    0x0002        /* print debug messages */
  65. #define RES_AAONLY    0x0004        /* authoritative answers only */
  66. #define RES_USEVC    0x0008        /* use virtual circuit */
  67. #define RES_PRIMARY    0x0010        /* query primary server only */
  68. #define RES_IGNTC    0x0020        /* ignore trucation errors */
  69. #define RES_RECURSE    0x0040        /* recursion desired */
  70. #define RES_DEFNAMES    0x0080        /* use default domain name */
  71. #define RES_STAYOPEN    0x0100        /* Keep TCP socket open */
  72. #define RES_DNSRCH    0x0200        /* search up local domain tree */
  73.  
  74. #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  75.  
  76. extern struct state _res;
  77. extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
  78.  
  79.