from scratch, add Berkeley copyright; change to be included by a.out.h
[unix-history] / usr / src / include / resolv.h
index 1c2cd73..92e8a37 100644 (file)
@@ -1,22 +1,34 @@
-
 /*
 /*
- * Copyright (c) 1983, 1987 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
  *
  *
- *     @(#)resolv.h    5.5 (Berkeley) %G%
+ *     @(#)resolv.h    5.15 (Berkeley) %G%
  */
 
  */
 
+#ifndef _RESOLV_H_
+#define        _RESOLV_H_
+
 /*
 /*
- * Global defines and variables for resolver stub.
+ * Resolver configuration file.
+ * Normally not present, but may contain the address of the
+ * inital name server(s) to query and the domain search list.
  */
 
  */
 
+#ifndef _PATH_RESCONF
+#define _PATH_RESCONF        "/etc/resolv.conf"
+#endif
 
 
-#define        MAXNS           3               /* max # name servers we'll track */
-#define        MAXDNSRCH       3               /* max # default domain levels to try */
-#define        LOCALDOMAINPARTS 2              /* min levels in name that is "local" */
+/*
+ * Global defines and variables for resolver stub.
+ */
+#define        MAXNS                   3       /* max # name servers we'll track */
+#define        MAXDFLSRCH              3       /* # default domain levels to try */
+#define        MAXDNSRCH               6       /* max # domains in search path */
+#define        LOCALDOMAINPARTS        2       /* min levels in name that is "local" */
 
 
-#define        RES_TIMEOUT     4               /* seconds between retries */
+#define        RES_TIMEOUT             5       /* min. seconds between retries */
 
 struct state {
        int     retrans;                /* retransmition time interval */
 
 struct state {
        int     retrans;                /* retransmition time interval */
@@ -47,4 +59,36 @@ struct state {
 #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
 
 extern struct state _res;
 #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
 
 extern struct state _res;
-extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* Private routines shared between libc/net, named, nslookup and others. */
+#define        dn_skipname     __dn_skipname
+#define        fp_query        __fp_query
+#define        hostalias       __hostalias
+#define        putlong         __putlong
+#define        putshort        __putshort
+#define p_class                __p_class
+#define p_time         __p_time
+#define p_type         __p_type
+__BEGIN_DECLS
+int     __dn_skipname __P((const u_char *, const u_char *));
+void    __fp_query __P((char *, FILE *));
+char   *__hostalias __P((const char *));
+void    __putlong __P((u_long, u_char *));
+void    __putshort __P((u_short, u_char *));
+char   *__p_class __P((int));
+char   *__p_time __P((u_long));
+char   *__p_type __P((int));
+
+int     dn_comp __P((const u_char *, u_char *, int, u_char **, u_char **));
+int     dn_expand __P((const u_char *, const u_char *, const u_char *,
+               u_char *, int));
+int     res_init __P((void));
+int     res_mkquery __P((int, const char *, int, int, const char *, int,
+               const struct rrec *, char *, int));
+int     res_send __P((const char *, int, char *, int));
+__END_DECLS
+
+#endif /* !_RESOLV_H_ */