home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / resolv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-30  |  2.4 KB  |  66 lines

  1.  
  2. /*
  3.  * Copyright (c) 1983, 1987 Regents of the University of California.
  4.  * All rights reserved.  The Berkeley software License Agreement
  5.  * specifies the terms and conditions for redistribution.
  6.  *
  7.  *    @(#)resolv.h    5.5 (Berkeley) 5/12/87
  8.  */
  9.  
  10. /*
  11.  * Global defines and variables for resolver stub.
  12.  */
  13.  
  14.  
  15. #define    MAXNS        3        /* max # name servers we'll track */
  16. #define    MAXDNSRCH    3        /* max # default domain levels to try */
  17. #define    LOCALDOMAINPARTS 2        /* min levels in name that is "local" */
  18.  
  19. #define    RES_TIMEOUT    4        /* seconds between retries */
  20.  
  21. struct state {
  22.     int    retrans;         /* retransmition time interval */
  23.     int    retry;            /* number of times to retransmit */
  24.     long    options;        /* option flags - see below. */
  25.     int    nscount;        /* number of name servers */
  26.     struct    sockaddr_in nsaddr_list[MAXNS];    /* address of name server */
  27. #define    nsaddr    nsaddr_list[0]        /* for backward compatibility */
  28.     u_short    id;            /* current packet id */
  29.     char    defdname[MAXDNAME];    /* default domain */
  30.     char    *dnsrch[MAXDNSRCH+1];    /* components of domain to search */
  31. };
  32.  
  33. /*
  34.  * Resolver options
  35.  */
  36. #define RES_INIT    0x0001        /* address initialized */
  37. #define RES_DEBUG    0x0002        /* print debug messages */
  38. #define RES_AAONLY    0x0004        /* authoritative answers only */
  39. #define RES_USEVC    0x0008        /* use virtual circuit */
  40. #define RES_PRIMARY    0x0010        /* query primary server only */
  41. #define RES_IGNTC    0x0020        /* ignore trucation errors */
  42. #define RES_RECURSE    0x0040        /* recursion desired */
  43. #define RES_DEFNAMES    0x0080        /* use default domain name */
  44. #define RES_STAYOPEN    0x0100        /* Keep TCP socket open */
  45. #define RES_DNSRCH    0x0200        /* search up local domain tree */
  46.  
  47. #ifndef __GNUC__
  48. #define ENETDOWN    50        /* Network is down */
  49. #define ENETUNREACH    51        /* Network is unreachable */
  50. #define ENETRESET    52        /* Network dropped conn. on reset */
  51. #define ECONNABORTED    53        /* Software caused connection abort */
  52. #define ECONNRESET    54        /* Connection reset by peer */
  53. #define ENOBUFS        55        /* No buffer space available */
  54. #define EISCONN        56        /* Socket is already connected */
  55. #define ENOTCONN    57        /* Socket is not connected */
  56. #define ESHUTDOWN    58        /* Can't send after socket shutdown */
  57. #define ETOOMANYREFS    59        /* Too many references: can't splice */
  58. #define ETIMEDOUT    60        /* Connection timed out */
  59. #define ECONNREFUSED    61        /* Connection refused */
  60. #endif
  61.  
  62. #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  63.  
  64. extern struct state _res;
  65. extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
  66.