date and time created 87/02/15 16:03:39 by lepreau
[unix-history] / usr / src / include / resolv.h
index 18b36df..8d4ac25 100644 (file)
@@ -1,27 +1,27 @@
+
 /*
  * Copyright (c) 1983 Regents of the University of California.
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
 /*
  * Copyright (c) 1983 Regents of the University of California.
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)resolv.h    5.1 (Berkeley) %G%
+ *     @(#)resolv.h    5.4 (Berkeley) %G%
  */
 
 /*
  * Global defines and variables for resolver stub.
  */
 
  */
 
 /*
  * Global defines and variables for resolver stub.
  */
 
-/*
- * Resolver configuration file. Contains the address of the
- * inital name server to query and the default domain for
- * non fully qualified domain names.
- */
-#define CONFFILE "/usr/local/lib/resolv.conf"
+
+#define        MAXNS           3               /* max # name servers we'll track */
+
 
 struct state {
 
 struct state {
-       int     retrans;                /* retransmition time interval */
+       int     retrans;                /* retransmition time interval */
        int     retry;                  /* number of times to retransmit */
        int     retry;                  /* number of times to retransmit */
-       int     options;                /* option flags - see below. */
-       struct  sockaddr_in nsaddr;     /* address of name server */
+       long    options;                /* option flags - see below. */
+       int     nscount;                /* number of name servers */
+       struct  sockaddr_in nsaddr_list[MAXNS]; /* address of name server */
+#define        nsaddr  nsaddr_list[0]          /* for backward compatibility */
        u_short id;                     /* current packet id */
        char    defdname[MAXDNAME];     /* default domain */
 };
        u_short id;                     /* current packet id */
        char    defdname[MAXDNAME];     /* default domain */
 };
@@ -29,14 +29,15 @@ struct state {
 /*
  * Resolver options
  */
 /*
  * Resolver options
  */
-#define RES_INIT       0x001           /* address initialized */
-#define RES_DEBUG      0x002           /* print debug messages */
-#define RES_AAONLY     0x004           /* authoritative answers only */
-#define RES_USEVC      0x008           /* use virtual circuit */
-#define RES_PRIMARY    0x010           /* query primary server only */
-#define RES_IGNTC      0x020           /* ignore trucation errors */
-#define RES_RECURSE    0x040           /* recursion desired */
-#define RES_DEFNAMES   0x080           /* use default domain name */
+#define RES_INIT       0x0001          /* address initialized */
+#define RES_DEBUG      0x0002          /* print debug messages */
+#define RES_AAONLY     0x0004          /* authoritative answers only */
+#define RES_USEVC      0x0008          /* use virtual circuit */
+#define RES_PRIMARY    0x0010          /* query primary server only */
+#define RES_IGNTC      0x0020          /* ignore trucation errors */
+#define RES_RECURSE    0x0040          /* recursion desired */
+#define RES_DEFNAMES   0x0080          /* use default domain name */
+#define RES_STAYOPEN   0x0100          /* Keep TCP socket open */
 
 extern struct state _res;
 extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
 
 extern struct state _res;
 extern char *p_cdname(), *p_rr(), *p_type(), *p_class();