summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/isccfg/include
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/isccfg/include')
-rw-r--r--contrib/bind9/lib/isccfg/include/Makefile.in2
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/Makefile.in6
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/aclconf.h73
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/cfg.h157
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/grammar.h111
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/log.h14
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/namedconf.h15
-rw-r--r--contrib/bind9/lib/isccfg/include/isccfg/version.h6
8 files changed, 238 insertions, 146 deletions
diff --git a/contrib/bind9/lib/isccfg/include/Makefile.in b/contrib/bind9/lib/isccfg/include/Makefile.in
index 77d3219..4eddd92 100644
--- a/contrib/bind9/lib/isccfg/include/Makefile.in
+++ b/contrib/bind9/lib/isccfg/include/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.4.206.1 2004/03/06 08:15:27 marka Exp $
+# $Id: Makefile.in,v 1.5 2004/03/05 05:12:24 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in b/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in
index dc8b1b1..d71d2c2 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in
+++ b/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001, 2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.4.12.3 2004/03/08 09:05:07 marka Exp $
+# $Id: Makefile.in,v 1.8.18.2 2005/01/12 01:54:57 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -26,7 +26,7 @@ top_srcdir = @top_srcdir@
# machine generated. The latter are handled specially in the
# install target below.
#
-HEADERS = cfg.h grammar.h log.h namedconf.h version.h
+HEADERS = aclconf.h cfg.h grammar.h log.h namedconf.h version.h
SUBDIRS =
TARGETS =
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h b/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h
new file mode 100644
index 0000000..a13740c
--- /dev/null
+++ b/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: aclconf.h,v 1.2.2.5 2006/03/02 00:37:22 marka Exp $ */
+
+#ifndef ISCCFG_ACLCONF_H
+#define ISCCFG_ACLCONF_H 1
+
+#include <isc/lang.h>
+
+#include <isccfg/cfg.h>
+
+#include <dns/types.h>
+
+typedef struct cfg_aclconfctx {
+ ISC_LIST(dns_acl_t) named_acl_cache;
+} cfg_aclconfctx_t;
+
+/***
+ *** Functions
+ ***/
+
+ISC_LANG_BEGINDECLS
+
+void
+cfg_aclconfctx_init(cfg_aclconfctx_t *ctx);
+/*
+ * Initialize an ACL configuration context.
+ */
+
+void
+cfg_aclconfctx_destroy(cfg_aclconfctx_t *ctx);
+/*
+ * Destroy an ACL configuration context.
+ */
+
+isc_result_t
+cfg_acl_fromconfig(const cfg_obj_t *caml,
+ const cfg_obj_t *cctx,
+ isc_log_t *lctx,
+ cfg_aclconfctx_t *ctx,
+ isc_mem_t *mctx,
+ dns_acl_t **target);
+/*
+ * Construct a new dns_acl_t from configuration data in 'caml' and
+ * 'cctx'. Memory is allocated through 'mctx'.
+ *
+ * Any named ACLs referred to within 'caml' will be be converted
+ * into nested dns_acl_t objects. Multiple references to the same
+ * named ACLs will be converted into shared references to a single
+ * nested dns_acl_t object when the referring objects were created
+ * passing the same ACL configuration context 'ctx'.
+ *
+ * On success, attach '*target' to the new dns_acl_t object.
+ */
+
+ISC_LANG_ENDDECLS
+
+#endif /* ISCCFG_ACLCONF_H */
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/cfg.h b/contrib/bind9/lib/isccfg/include/isccfg/cfg.h
index c486719..6a30a1c 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/cfg.h
+++ b/contrib/bind9/lib/isccfg/include/isccfg/cfg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cfg.h,v 1.30.12.6 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: cfg.h,v 1.34.18.5 2006/03/02 00:37:22 marka Exp $ */
#ifndef ISCCFG_CFG_H
#define ISCCFG_CFG_H 1
@@ -24,7 +24,8 @@
***** Module Info
*****/
-/*
+/*! \file
+ * \brief
* This is the new, table-driven, YACC-free configuration file parser.
*/
@@ -42,19 +43,19 @@
*** Types
***/
-typedef struct cfg_parser cfg_parser_t;
-/*
+/*%
* A configuration parser.
*/
+typedef struct cfg_parser cfg_parser_t;
-/*
+/*%
* A configuration type definition object. There is a single
* static cfg_type_t object for each data type supported by
* the configuration parser.
*/
typedef struct cfg_type cfg_type_t;
-/*
+/*%
* A configuration object. This is the basic building block of the
* configuration parse tree. It contains a value (which may be
* of one of several types) and information identifying the file
@@ -63,12 +64,12 @@ typedef struct cfg_type cfg_type_t;
*/
typedef struct cfg_obj cfg_obj_t;
-/*
+/*%
* A configuration object list element.
*/
typedef struct cfg_listelt cfg_listelt_t;
-/*
+/*%
* A callback function to be called when parsing an option
* that needs to be interpreted at parsing time, like
* "directory".
@@ -84,7 +85,7 @@ ISC_LANG_BEGINDECLS
isc_result_t
cfg_parser_create(isc_mem_t *mctx, isc_log_t *lctx, cfg_parser_t **ret);
-/*
+/*%<
* Create a configuration file parser. Any warning and error
* messages will be logged to 'lctx'.
*
@@ -97,7 +98,7 @@ void
cfg_parser_setcallback(cfg_parser_t *pctx,
cfg_parsecallback_t callback,
void *arg);
-/*
+/*%<
* Make the parser call 'callback' whenever it encounters
* a configuration clause with the callback attribute,
* passing it the clause name, the clause value,
@@ -113,7 +114,7 @@ cfg_parse_file(cfg_parser_t *pctx, const char *filename,
isc_result_t
cfg_parse_buffer(cfg_parser_t *pctx, isc_buffer_t *buffer,
const cfg_type_t *type, cfg_obj_t **ret);
-/*
+/*%<
* Read a configuration containing data of type 'type'
* and make '*ret' point to its parse tree.
*
@@ -124,246 +125,246 @@ cfg_parse_buffer(cfg_parser_t *pctx, isc_buffer_t *buffer,
* Returns an error if the file does not parse correctly.
*
* Requires:
- * "filename" is valid.
- * "mem" is valid.
- * "type" is valid.
- * "cfg" is non-NULL and "*cfg" is NULL.
+ *\li "filename" is valid.
+ *\li "mem" is valid.
+ *\li "type" is valid.
+ *\li "cfg" is non-NULL and "*cfg" is NULL.
*
* Returns:
- * ISC_R_SUCCESS - success
- * ISC_R_NOMEMORY - no memory available
- * ISC_R_INVALIDFILE - file doesn't exist or is unreadable
- * others - file contains errors
+ * \li #ISC_R_SUCCESS - success
+ *\li #ISC_R_NOMEMORY - no memory available
+ *\li #ISC_R_INVALIDFILE - file doesn't exist or is unreadable
+ *\li others - file contains errors
*/
void
cfg_parser_destroy(cfg_parser_t **pctxp);
-/*
+/*%<
* Destroy a configuration parser.
*/
isc_boolean_t
cfg_obj_isvoid(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of void type (e.g., an optional
* value not specified).
*/
isc_boolean_t
cfg_obj_ismap(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of a map type.
*/
isc_result_t
cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj);
-/*
+/*%<
* Extract an element from a configuration object, which
* must be of a map type.
*
* Requires:
- * 'mapobj' points to a valid configuration object of a map type.
- * 'name' points to a null-terminated string.
- * 'obj' is non-NULL and '*obj' is NULL.
+ * \li 'mapobj' points to a valid configuration object of a map type.
+ * \li 'name' points to a null-terminated string.
+ * \li 'obj' is non-NULL and '*obj' is NULL.
*
* Returns:
- * ISC_R_SUCCESS - success
- * ISC_R_NOTFOUND - name not found in map
+ * \li #ISC_R_SUCCESS - success
+ * \li #ISC_R_NOTFOUND - name not found in map
*/
const cfg_obj_t *
cfg_map_getname(const cfg_obj_t *mapobj);
-/*
+/*%<
* Get the name of a named map object, like a server "key" clause.
*
* Requires:
- * 'mapobj' points to a valid configuration object of a map type.
+ * \li 'mapobj' points to a valid configuration object of a map type.
*
* Returns:
- * A pointer to a configuration object naming the map object,
+ * \li A pointer to a configuration object naming the map object,
* or NULL if the map object does not have a name.
*/
isc_boolean_t
cfg_obj_istuple(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of a map type.
*/
const cfg_obj_t *
cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name);
-/*
+/*%<
* Extract an element from a configuration object, which
* must be of a tuple type.
*
* Requires:
- * 'tupleobj' points to a valid configuration object of a tuple type.
- * 'name' points to a null-terminated string naming one of the
- * fields of said tuple type.
+ * \li 'tupleobj' points to a valid configuration object of a tuple type.
+ * \li 'name' points to a null-terminated string naming one of the
+ *\li fields of said tuple type.
*/
isc_boolean_t
cfg_obj_isuint32(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of integer type.
*/
isc_uint32_t
cfg_obj_asuint32(const cfg_obj_t *obj);
-/*
+/*%<
* Returns the value of a configuration object of 32-bit integer type.
*
* Requires:
- * 'obj' points to a valid configuration object of 32-bit integer type.
+ * \li 'obj' points to a valid configuration object of 32-bit integer type.
*
* Returns:
- * A 32-bit unsigned integer.
+ * \li A 32-bit unsigned integer.
*/
isc_boolean_t
cfg_obj_isuint64(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of integer type.
*/
isc_uint64_t
cfg_obj_asuint64(const cfg_obj_t *obj);
-/*
+/*%<
* Returns the value of a configuration object of 64-bit integer type.
*
* Requires:
- * 'obj' points to a valid configuration object of 64-bit integer type.
+ * \li 'obj' points to a valid configuration object of 64-bit integer type.
*
* Returns:
- * A 64-bit unsigned integer.
+ * \li A 64-bit unsigned integer.
*/
isc_boolean_t
cfg_obj_isstring(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of string type.
*/
const char *
cfg_obj_asstring(const cfg_obj_t *obj);
-/*
+/*%<
* Returns the value of a configuration object of a string type
* as a null-terminated string.
*
* Requires:
- * 'obj' points to a valid configuration object of a string type.
+ * \li 'obj' points to a valid configuration object of a string type.
*
* Returns:
- * A pointer to a null terminated string.
+ * \li A pointer to a null terminated string.
*/
isc_boolean_t
cfg_obj_isboolean(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of a boolean type.
*/
isc_boolean_t
cfg_obj_asboolean(const cfg_obj_t *obj);
-/*
+/*%<
* Returns the value of a configuration object of a boolean type.
*
* Requires:
- * 'obj' points to a valid configuration object of a boolean type.
+ * \li 'obj' points to a valid configuration object of a boolean type.
*
* Returns:
- * A boolean value.
+ * \li A boolean value.
*/
isc_boolean_t
cfg_obj_issockaddr(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is a socket address.
*/
const isc_sockaddr_t *
cfg_obj_assockaddr(const cfg_obj_t *obj);
-/*
+/*%<
* Returns the value of a configuration object representing a socket address.
*
* Requires:
- * 'obj' points to a valid configuration object of a socket address type.
+ * \li 'obj' points to a valid configuration object of a socket address type.
*
* Returns:
- * A pointer to a sockaddr. The sockaddr must be copied by the caller
+ * \li A pointer to a sockaddr. The sockaddr must be copied by the caller
* if necessary.
*/
isc_boolean_t
cfg_obj_isnetprefix(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is a network prefix.
*/
void
cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
unsigned int *prefixlen);
-/*
+/*%<
* Gets the value of a configuration object representing a network
* prefix. The network address is returned through 'netaddr' and the
* prefix length in bits through 'prefixlen'.
*
* Requires:
- * 'obj' points to a valid configuration object of network prefix type.
- * 'netaddr' and 'prefixlen' are non-NULL.
+ * \li 'obj' points to a valid configuration object of network prefix type.
+ *\li 'netaddr' and 'prefixlen' are non-NULL.
*/
isc_boolean_t
cfg_obj_islist(const cfg_obj_t *obj);
-/*
+/*%<
* Return true iff 'obj' is of list type.
*/
const cfg_listelt_t *
cfg_list_first(const cfg_obj_t *obj);
-/*
+/*%<
* Returns the first list element in a configuration object of a list type.
*
* Requires:
- * 'obj' points to a valid configuration object of a list type or NULL.
+ * \li 'obj' points to a valid configuration object of a list type or NULL.
*
* Returns:
- * A pointer to a cfg_listelt_t representing the first list element,
+ * \li A pointer to a cfg_listelt_t representing the first list element,
* or NULL if the list is empty or nonexistent.
*/
const cfg_listelt_t *
cfg_list_next(const cfg_listelt_t *elt);
-/*
+/*%<
* Returns the next element of a list of configuration objects.
*
* Requires:
- * 'elt' points to cfg_listelt_t obtained from cfg_list_first() or
+ * \li 'elt' points to cfg_listelt_t obtained from cfg_list_first() or
* a previous call to cfg_list_next().
*
* Returns:
- * A pointer to a cfg_listelt_t representing the next element,
+ * \li A pointer to a cfg_listelt_t representing the next element,
* or NULL if there are no more elements.
*/
const cfg_obj_t *
cfg_listelt_value(const cfg_listelt_t *elt);
-/*
+/*%<
* Returns the configuration object associated with cfg_listelt_t.
*
* Requires:
- * 'elt' points to cfg_listelt_t obtained from cfg_list_first() or
+ * \li 'elt' points to cfg_listelt_t obtained from cfg_list_first() or
* cfg_list_next().
*
* Returns:
- * A non-NULL pointer to a configuration object.
+ * \li A non-NULL pointer to a configuration object.
*/
void
cfg_print(const cfg_obj_t *obj,
void (*f)(void *closure, const char *text, int textlen),
void *closure);
-/*
+/*%<
* Print the configuration object 'obj' by repeatedly calling the
* function 'f', passing 'closure' and a region of text starting
* at 'text' and comprising 'textlen' characters.
@@ -373,18 +374,18 @@ void
cfg_print_grammar(const cfg_type_t *type,
void (*f)(void *closure, const char *text, int textlen),
void *closure);
-/*
+/*%<
* Print a summary of the grammar of the configuration type 'type'.
*/
isc_boolean_t
cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type);
-/*
+/*%<
* Return true iff 'obj' is of type 'type'.
*/
void cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
-/*
+/*%<
* Destroy a configuration object.
*/
@@ -392,7 +393,7 @@ void
cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
const char *fmt, ...)
ISC_FORMAT_PRINTF(4, 5);
-/*
+/*%<
* Log a message concerning configuration object 'obj' to the logging
* channel of 'pctx', at log level 'level'. The message will be prefixed
* with the file name(s) and line number where 'obj' was defined.
@@ -400,13 +401,13 @@ cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
const char *
cfg_obj_file(const cfg_obj_t *obj);
-/*
+/*%<
* Return the file that defined this object.
*/
unsigned int
cfg_obj_line(const cfg_obj_t *obj);
-/*
+/*%<
* Return the line in file where this object was defined.
*/
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/grammar.h b/contrib/bind9/lib/isccfg/include/isccfg/grammar.h
index 4aaeb4f..fa66146 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/grammar.h
+++ b/contrib/bind9/lib/isccfg/include/isccfg/grammar.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: grammar.h,v 1.3.50.6 2006/03/02 00:37:20 marka Exp $ */
+/* $Id: grammar.h,v 1.4.18.8 2006/02/28 03:10:49 marka Exp $ */
#ifndef ISCCFG_GRAMMAR_H
#define ISCCFG_GRAMMAR_H 1
+/*! \file */
+
#include <isc/lex.h>
#include <isc/netaddr.h>
#include <isc/sockaddr.h>
@@ -33,17 +35,17 @@
* and the grammars; not visible to users of the parser.
*/
-/* Clause may occur multiple times (e.g., "zone") */
+/*% Clause may occur multiple times (e.g., "zone") */
#define CFG_CLAUSEFLAG_MULTI 0x00000001
-/* Clause is obsolete */
+/*% Clause is obsolete */
#define CFG_CLAUSEFLAG_OBSOLETE 0x00000002
-/* Clause is not implemented, and may never be */
+/*% Clause is not implemented, and may never be */
#define CFG_CLAUSEFLAG_NOTIMP 0x00000004
-/* Clause is not implemented yet */
+/*% Clause is not implemented yet */
#define CFG_CLAUSEFLAG_NYI 0x00000008
-/* Default value has changed since earlier release */
+/*% Default value has changed since earlier release */
#define CFG_CLAUSEFLAG_NEWDEFAULT 0x00000010
-/*
+/*%
* Clause needs to be interpreted during parsing
* by calling a callback function, like the
* "directory" option.
@@ -71,7 +73,7 @@ typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
* Structure definitions
*/
-/*
+/*%
* A configuration printer object. This is an abstract
* interface to a destination to which text can be printed
* by calling the function 'f'.
@@ -82,42 +84,39 @@ struct cfg_printer {
int indent;
};
-/* A clause definition. */
-
+/*% A clause definition. */
struct cfg_clausedef {
const char *name;
cfg_type_t *type;
unsigned int flags;
};
-/* A tuple field definition. */
-
+/*% A tuple field definition. */
struct cfg_tuplefielddef {
const char *name;
cfg_type_t *type;
unsigned int flags;
};
-/* A configuration object type definition. */
+/*% A configuration object type definition. */
struct cfg_type {
- const char *name; /* For debugging purposes only */
+ const char *name; /*%< For debugging purposes only */
cfg_parsefunc_t parse;
cfg_printfunc_t print;
- cfg_docfunc_t doc; /* Print grammar description */
- cfg_rep_t * rep; /* Data representation */
- const void * of; /* Additional data for meta-types */
+ cfg_docfunc_t doc; /*%< Print grammar description */
+ cfg_rep_t * rep; /*%< Data representation */
+ const void * of; /*%< Additional data for meta-types */
};
-/* A keyword-type definition, for things like "port <integer>". */
-
+/*% A keyword-type definition, for things like "port <integer>". */
typedef struct {
const char *name;
const cfg_type_t *type;
} keyword_type_t;
struct cfg_map {
- cfg_obj_t *id; /* Used for 'named maps' like keys, zones, &c */
- const cfg_clausedef_t * const *clausesets; /* The clauses that
+ cfg_obj_t *id; /*%< Used for 'named maps' like keys, zones, &c */
+ const cfg_clausedef_t * const *clausesets; /*%< The clauses that
can occur in this map;
used for printing */
isc_symtab_t *symtab;
@@ -130,15 +129,15 @@ struct cfg_netprefix {
unsigned int prefixlen;
};
-/*
+/*%
* A configuration data representation.
*/
struct cfg_rep {
- const char * name; /* For debugging only */
- cfg_freefunc_t free; /* How to free this kind of data. */
+ const char * name; /*%< For debugging only */
+ cfg_freefunc_t free; /*%< How to free this kind of data. */
};
-/*
+/*%
* A configuration object. This is the main building block
* of the configuration parse tree.
*/
@@ -148,7 +147,7 @@ struct cfg_obj {
union {
isc_uint32_t uint32;
isc_uint64_t uint64;
- isc_textregion_t string; /* null terminated, too */
+ isc_textregion_t string; /*%< null terminated, too */
isc_boolean_t boolean;
cfg_map_t map;
cfg_list_t list;
@@ -161,14 +160,13 @@ struct cfg_obj {
};
-/* A list element. */
-
+/*% A list element. */
struct cfg_listelt {
cfg_obj_t *obj;
ISC_LINK(cfg_listelt_t) link;
};
-/* The parser object. */
+/*% The parser object. */
struct cfg_parser {
isc_mem_t * mctx;
isc_log_t * lctx;
@@ -177,13 +175,13 @@ struct cfg_parser {
unsigned int warnings;
isc_token_t token;
- /* We are at the end of all input. */
+ /*% We are at the end of all input. */
isc_boolean_t seen_eof;
- /* The current token has been pushed back. */
+ /*% The current token has been pushed back. */
isc_boolean_t ungotten;
- /*
+ /*%
* The stack of currently active files, represented
* as a configuration list of configuration strings.
* The head is the top-level file, subsequent elements
@@ -192,7 +190,7 @@ struct cfg_parser {
*/
cfg_obj_t * open_files;
- /*
+ /*%
* Names of files that we have parsed and closed
* and were previously on the open_file list.
* We keep these objects around after closing
@@ -203,7 +201,7 @@ struct cfg_parser {
*/
cfg_obj_t * closed_files;
- /*
+ /*%
* Current line number. We maintain our own
* copy of this so that it is available even
* when a file has just been closed.
@@ -215,15 +213,19 @@ struct cfg_parser {
};
-/*
+/*@{*/
+/*%
* Flags defining whether to accept certain types of network addresses.
*/
#define CFG_ADDR_V4OK 0x00000001
#define CFG_ADDR_V4PREFIXOK 0x00000002
#define CFG_ADDR_V6OK 0x00000004
#define CFG_ADDR_WILDOK 0x00000008
+#define CFG_ADDR_MASK (CFG_ADDR_V6OK|CFG_ADDR_V4OK)
+/*@}*/
-/*
+/*@{*/
+/*%
* Predefined data representation types.
*/
LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_uint32;
@@ -236,8 +238,10 @@ LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_tuple;
LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_sockaddr;
LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_netprefix;
LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_void;
+/*@}*/
-/*
+/*@{*/
+/*%
* Predefined configuration object types.
*/
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_boolean;
@@ -248,10 +252,15 @@ LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_astring;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_ustring;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_sockaddr;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr;
+LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr4;
+LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr4wild;
+LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr6;
+LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr6wild;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netprefix;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_void;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_token;
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_unsupported;
+/*@}*/
isc_result_t
cfg_gettoken(cfg_parser_t *pctx, int options);
@@ -314,7 +323,7 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t
cfg_parse_special(cfg_parser_t *pctx, int special);
-/* Parse a required special character 'special'. */
+/*%< Parse a required special character 'special'. */
isc_result_t
cfg_create_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **objp);
@@ -358,11 +367,11 @@ cfg_doc_enum(cfg_printer_t *pctx, const cfg_type_t *type);
void
cfg_print_chars(cfg_printer_t *pctx, const char *text, int len);
-/* Print 'len' characters at 'text' */
+/*%< Print 'len' characters at 'text' */
void
cfg_print_cstr(cfg_printer_t *pctx, const char *s);
-/* Print the null-terminated string 's' */
+/*%< Print the null-terminated string 's' */
isc_result_t
cfg_parse_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -373,6 +382,10 @@ cfg_parse_named_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t
cfg_parse_addressed_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
+isc_result_t
+cfg_parse_netprefix_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **
+ret);
+
void
cfg_print_map(cfg_printer_t *pctx, const cfg_obj_t *obj);
@@ -405,28 +418,28 @@ cfg_print_obj(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_obj(cfg_printer_t *pctx, const cfg_type_t *type);
-/*
+/*%<
* Print a description of the grammar of an arbitrary configuration
* type 'type'
*/
void
cfg_doc_terminal(cfg_printer_t *pctx, const cfg_type_t *type);
-/*
+/*%<
* Document the type 'type' as a terminal by printing its
- * name in angle brackets, e.g., <uint32>.
+ * name in angle brackets, e.g., &lt;uint32>.
*/
void
cfg_parser_error(cfg_parser_t *pctx, unsigned int flags,
const char *fmt, ...) ISC_FORMAT_PRINTF(3, 4);
-/*
+/*!
* Pass one of these flags to cfg_parser_error() to include the
* token text in log message.
*/
-#define CFG_LOG_NEAR 0x00000001 /* Say "near <token>" */
-#define CFG_LOG_BEFORE 0x00000002 /* Say "before <token>" */
-#define CFG_LOG_NOPREP 0x00000004 /* Say just "<token>" */
+#define CFG_LOG_NEAR 0x00000001 /*%< Say "near <token>" */
+#define CFG_LOG_BEFORE 0x00000002 /*%< Say "before <token>" */
+#define CFG_LOG_NOPREP 0x00000004 /*%< Say just "<token>" */
void
cfg_parser_warning(cfg_parser_t *pctx, unsigned int flags,
@@ -434,6 +447,6 @@ cfg_parser_warning(cfg_parser_t *pctx, unsigned int flags,
isc_boolean_t
cfg_is_enum(const char *s, const char *const *enums);
-/* Return true iff the string 's' is one of the strings in 'enums' */
+/*%< Return true iff the string 's' is one of the strings in 'enums' */
#endif /* ISCCFG_GRAMMAR_H */
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/log.h b/contrib/bind9/lib/isccfg/include/isccfg/log.h
index b3d2da7d..f66c37f 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/log.h
+++ b/contrib/bind9/lib/isccfg/include/isccfg/log.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.h,v 1.3.2.1.10.3 2004/03/08 09:05:07 marka Exp $ */
+/* $Id: log.h,v 1.6.18.2 2005/04/29 00:17:16 marka Exp $ */
#ifndef ISCCFG_LOG_H
#define ISCCFG_LOG_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/log.h>
@@ -34,17 +36,17 @@ ISC_LANG_BEGINDECLS
void
cfg_log_init(isc_log_t *lctx);
-/*
+/*%<
* Make the libisccfg categories and modules available for use with the
* ISC logging library.
*
* Requires:
- * lctx is a valid logging context.
+ *\li lctx is a valid logging context.
*
- * cfg_log_init() is called only once.
+ *\li cfg_log_init() is called only once.
*
* Ensures:
- * The catgories and modules defined above are available for
+ * \li The catgories and modules defined above are available for
* use by isc_log_usechannnel() and isc_log_write().
*/
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h b/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h
index 4d5bd0b..6125b26 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h
+++ b/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,12 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: namedconf.h,v 1.2.202.3 2004/03/08 09:05:07 marka Exp $ */
+/* $Id: namedconf.h,v 1.3.18.2 2005/04/29 00:17:16 marka Exp $ */
#ifndef ISCCFG_NAMEDCONF_H
#define ISCCFG_NAMEDCONF_H 1
-/*
+/*! \file
+ * \brief
* This module defines the named.conf, rndc.conf, and rndc.key grammars.
*/
@@ -30,15 +31,15 @@
* Configuration object types.
*/
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_namedconf;
-/* A complete named.conf file. */
+/*%< A complete named.conf file. */
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_rndcconf;
-/* A complete rndc.conf file. */
+/*%< A complete rndc.conf file. */
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_rndckey;
-/* A complete rndc.key file. */
+/*%< A complete rndc.key file. */
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_keyref;
-/* A key reference, used as an ACL element */
+/*%< A key reference, used as an ACL element */
#endif /* ISCCFG_CFG_H */
diff --git a/contrib/bind9/lib/isccfg/include/isccfg/version.h b/contrib/bind9/lib/isccfg/include/isccfg/version.h
index d02a814..38bb14b 100644
--- a/contrib/bind9/lib/isccfg/include/isccfg/version.h
+++ b/contrib/bind9/lib/isccfg/include/isccfg/version.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: version.h,v 1.2.222.3 2004/03/08 09:05:08 marka Exp $ */
+/* $Id: version.h,v 1.3.18.2 2005/04/29 00:17:16 marka Exp $ */
+
+/*! \file */
#include <isc/platform.h>
OpenPOWER on IntegriCloud