home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / stack16 / resolv.h < prev    next >
Text File  |  1999-05-11  |  3KB  |  65 lines

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