about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-07-18 02:01:06 +0000
committerRoland McGrath <roland@gnu.org>2005-07-18 02:01:06 +0000
commitec9f4abf6c1d5d38657761a7236a281a45397244 (patch)
treeaefc7aaa90ebf945152782df35cefc6f8b322188
parent8a3c12adff60b4225cdefbdf6ad81e9c0ba8bf71 (diff)
downloadglibc-ec9f4abf6c1d5d38657761a7236a281a45397244.tar.gz
glibc-ec9f4abf6c1d5d38657761a7236a281a45397244.tar.xz
glibc-ec9f4abf6c1d5d38657761a7236a281a45397244.zip
2005-06-08 Karl Kelley <kekelley@iastate.edu>
	[BZ #1088]
	* hesiod/hesiod_p.h (struct hesiod_p): Add classes array.
	* hesiod/hesiod.c (hesiod_init): Initialize classes.  Fail if no
	valid classes were given or if both are equal.
	(hesiod_resolve): Use ctx->classes instead of hardcoded C_IN
	and C_HS order.
	(parse_config_file): Handle classes keyword.
	* hesiod/README.hesiod: Mention addition of the classes keyword.
-rw-r--r--hesiod/README.hesiod8
-rw-r--r--hesiod/hesiod_p.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/hesiod/README.hesiod b/hesiod/README.hesiod
index 18cd5d45dd..259ce8d447 100644
--- a/hesiod/README.hesiod
+++ b/hesiod/README.hesiod
@@ -71,6 +71,14 @@ will want to create your own.  It should look something like:
 
   rhs=.your.domain
   lhs=.ns
+  classes=in,hs
+
+The optional classes settings specifies which DNS classes Hesiod
+should do lookups in.  Possible values are IN (the preferred class)
+and  HS (the deprecated class, still used by some sites).
+You may specify both classes separated by a comma to try one class
+first and then the other if no entry is available in the first
+class.  The default value of the classes variable is `IN,HS'.
 
 The value of rhs can be overridden by the environment variable
 `HES_DOMAIN'.
diff --git a/hesiod/hesiod_p.h b/hesiod/hesiod_p.h
index 71aca0976d..5010d71bc9 100644
--- a/hesiod/hesiod_p.h
+++ b/hesiod/hesiod_p.h
@@ -41,6 +41,7 @@ struct hesiod_p {
 	void		(*res_set)(struct hesiod_p *, struct __res_state *,
 				   void (*)(void *));
 	struct __res_state * (*res_get)(struct hesiod_p *);
+	int		classes[2];	/* The class search order. */
 };
 
 #define MAX_HESRESP	1024