parser.c File Reference

#include <config.h>
#include <isc/buffer.h>
#include <isc/dir.h>
#include <isc/formatcheck.h>
#include <isc/lex.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/netscope.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/sockaddr.h>
#include <isc/symtab.h>
#include <isc/util.h>
#include <isccfg/cfg.h>
#include <isccfg/grammar.h>
#include <isccfg/log.h>

Go to the source code of this file.

Data Structures

struct  flagtext

Defines

#define CAT   CFG_LOGCATEGORY_CONFIG
#define MOD   CFG_LOGMODULE_PARSER
#define MAP_SYM   1
#define TOKEN_STRING(pctx)   (pctx->token.value.as_textregion.base)
#define CHECK(op)
#define CLEANUP_OBJ(obj)   do { if ((obj) != NULL) cfg_obj_destroy(pctx, &(obj)); } while (0)
#define MAX_LOG_TOKEN   30

Functions

static void free_tuple (cfg_parser_t *pctx, cfg_obj_t *obj)
static isc_result_t parse_list (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static void print_list (cfg_printer_t *pctx, const cfg_obj_t *obj)
static void free_list (cfg_parser_t *pctx, cfg_obj_t *obj)
static isc_result_t create_listelt (cfg_parser_t *pctx, cfg_listelt_t **eltp)
static isc_result_t create_string (cfg_parser_t *pctx, const char *contents, const cfg_type_t *type, cfg_obj_t **ret)
static void free_string (cfg_parser_t *pctx, cfg_obj_t *obj)
static isc_result_t create_map (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **objp)
static void free_map (cfg_parser_t *pctx, cfg_obj_t *obj)
static isc_result_t parse_symtab_elt (cfg_parser_t *pctx, const char *name, cfg_type_t *elttype, isc_symtab_t *symtab, isc_boolean_t callback)
static void free_noop (cfg_parser_t *pctx, cfg_obj_t *obj)
static isc_result_t cfg_getstringtoken (cfg_parser_t *pctx)
static void parser_complain (cfg_parser_t *pctx, isc_boolean_t is_warning, unsigned int flags, const char *format, va_list args)
void cfg_print_obj (cfg_printer_t *pctx, const cfg_obj_t *obj)
void cfg_print_chars (cfg_printer_t *pctx, const char *text, int len)
 Print 'len' characters at 'text'.
static void print_open (cfg_printer_t *pctx)
static void print_indent (cfg_printer_t *pctx)
static void print_close (cfg_printer_t *pctx)
isc_result_t cfg_parse_obj (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print (const cfg_obj_t *obj, void(*f)(void *closure, const char *text, int textlen), void *closure)
void cfg_printx (const cfg_obj_t *obj, unsigned int flags, void(*f)(void *closure, const char *text, int textlen), void *closure)
isc_result_t cfg_create_tuple (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t cfg_parse_tuple (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print_tuple (cfg_printer_t *pctx, const cfg_obj_t *obj)
void cfg_doc_tuple (cfg_printer_t *pctx, const cfg_type_t *type)
isc_boolean_t cfg_obj_istuple (const cfg_obj_t *obj)
 Return true iff 'obj' is of a map type.
const cfg_obj_tcfg_tuple_get (const cfg_obj_t *tupleobj, const char *name)
 Extract an element from a configuration object, which must be of a tuple type.
isc_result_t cfg_parse_special (cfg_parser_t *pctx, int special)
 Parse a required special character 'special'.
static isc_result_t parse_semicolon (cfg_parser_t *pctx)
static isc_result_t parse_eof (cfg_parser_t *pctx)
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'.
static isc_result_t parser_openfile (cfg_parser_t *pctx, const char *filename)
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, and 'arg' as arguments.
void cfg_parser_reset (cfg_parser_t *pctx)
 Reset an existing parser so it can be re-used for a new file or buffer.
static isc_result_t parse2 (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t cfg_parse_file (cfg_parser_t *pctx, const char *filename, const cfg_type_t *type, cfg_obj_t **ret)
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.
void cfg_parser_attach (cfg_parser_t *src, cfg_parser_t **dest)
 Reference a parser object.
void cfg_parser_destroy (cfg_parser_t **pctxp)
 Remove a reference to a configuration parser; destroy it if there are no more references.
isc_result_t cfg_parse_void (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print_void (cfg_printer_t *pctx, const cfg_obj_t *obj)
void cfg_doc_void (cfg_printer_t *pctx, const cfg_type_t *type)
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_result_t cfg_parse_uint32 (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print_cstr (cfg_printer_t *pctx, const char *s)
 Print the null-terminated string 's'.
void cfg_print_rawuint (cfg_printer_t *pctx, unsigned int u)
void cfg_print_uint32 (cfg_printer_t *pctx, const cfg_obj_t *obj)
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.
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.
void cfg_print_uint64 (cfg_printer_t *pctx, const cfg_obj_t *obj)
isc_result_t cfg_parse_qstring (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static isc_result_t parse_ustring (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t cfg_parse_astring (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t cfg_parse_sstring (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
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'.
static isc_result_t check_enum (cfg_parser_t *pctx, cfg_obj_t *obj, const char *const *enums)
isc_result_t cfg_parse_enum (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_doc_enum (cfg_printer_t *pctx, const cfg_type_t *type)
void cfg_print_ustring (cfg_printer_t *pctx, const cfg_obj_t *obj)
static void print_qstring (cfg_printer_t *pctx, const cfg_obj_t *obj)
static void print_sstring (cfg_printer_t *pctx, const cfg_obj_t *obj)
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.
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.
isc_result_t cfg_parse_boolean (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print_boolean (cfg_printer_t *pctx, const cfg_obj_t *obj)
isc_result_t cfg_create_list (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **obj)
static void free_listelt (cfg_parser_t *pctx, cfg_listelt_t *elt)
isc_result_t cfg_parse_listelt (cfg_parser_t *pctx, const cfg_type_t *elttype, cfg_listelt_t **ret)
isc_result_t cfg_parse_bracketed_list (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print_bracketed_list (cfg_printer_t *pctx, const cfg_obj_t *obj)
void cfg_doc_bracketed_list (cfg_printer_t *pctx, const cfg_type_t *type)
isc_result_t cfg_parse_spacelist (cfg_parser_t *pctx, const cfg_type_t *listtype, cfg_obj_t **ret)
void cfg_print_spacelist (cfg_printer_t *pctx, const cfg_obj_t *obj)
isc_boolean_t cfg_obj_islist (const cfg_obj_t *obj)
 Return true iff 'obj' is of list type.
const cfg_listelt_tcfg_list_first (const cfg_obj_t *obj)
 Returns the first list element in a configuration object of a list type.
const cfg_listelt_tcfg_list_next (const cfg_listelt_t *elt)
 Returns the next element of a list of configuration objects.
unsigned int cfg_list_length (const cfg_obj_t *obj, isc_boolean_t recurse)
 Returns the length of a list of configure objects. If obj is not a list, returns 0. If recurse is true, add in the length of all contained lists.
cfg_obj_tcfg_listelt_value (const cfg_listelt_t *elt)
 Returns the configuration object associated with cfg_listelt_t.
isc_result_t cfg_parse_mapbody (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t cfg_parse_map (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static isc_result_t parse_any_named_map (cfg_parser_t *pctx, cfg_type_t *nametype, const cfg_type_t *type, cfg_obj_t **ret)
isc_result_t 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)
static void print_symval (cfg_printer_t *pctx, const char *name, cfg_obj_t *obj)
void cfg_print_mapbody (cfg_printer_t *pctx, const cfg_obj_t *obj)
void cfg_doc_mapbody (cfg_printer_t *pctx, const cfg_type_t *type)
void cfg_print_map (cfg_printer_t *pctx, const cfg_obj_t *obj)
static void print_clause_flags (cfg_printer_t *pctx, unsigned int flags)
void cfg_doc_map (cfg_printer_t *pctx, const cfg_type_t *type)
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.
const cfg_obj_tcfg_map_getname (const cfg_obj_t *mapobj)
 Get the name of a named map object, like a server "key" clause.
unsigned int cfg_map_count (const cfg_obj_t *mapobj)
 Get the number of elements defined in the symbol table of a map object.
static isc_result_t parse_token (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static isc_result_t parse_unsupported (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static isc_result_t token_addr (cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na)
isc_result_t cfg_parse_rawaddr (cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na)
isc_boolean_t cfg_lookingat_netaddr (cfg_parser_t *pctx, unsigned int flags)
isc_result_t cfg_parse_rawport (cfg_parser_t *pctx, unsigned int flags, in_port_t *port)
void cfg_print_rawaddr (cfg_printer_t *pctx, const isc_netaddr_t *na)
isc_result_t cfg_parse_dscp (cfg_parser_t *pctx, isc_dscp_t *dscp)
static isc_result_t parse_netaddr (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static void cfg_doc_netaddr (cfg_printer_t *pctx, const cfg_type_t *type)
isc_result_t cfg_parse_netprefix (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static void print_netprefix (cfg_printer_t *pctx, const cfg_obj_t *obj)
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'.
static isc_result_t parse_sockaddrsub (cfg_parser_t *pctx, const cfg_type_t *type, int flags, cfg_obj_t **ret)
isc_result_t cfg_parse_sockaddr (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
void cfg_print_sockaddr (cfg_printer_t *pctx, const cfg_obj_t *obj)
void cfg_doc_sockaddr (cfg_printer_t *pctx, const cfg_type_t *type)
isc_boolean_t cfg_obj_issockaddr (const cfg_obj_t *obj)
 Return true iff 'obj' is a socket address.
const isc_sockaddr_tcfg_obj_assockaddr (const cfg_obj_t *obj)
 Returns the value of a configuration object representing a socket address.
isc_dscp_t cfg_obj_getdscp (const cfg_obj_t *obj)
 Returns the DSCP value of a configuration object representing a socket address.
isc_result_t cfg_gettoken (cfg_parser_t *pctx, int options)
void cfg_ungettoken (cfg_parser_t *pctx)
isc_result_t cfg_peektoken (cfg_parser_t *pctx, int options)
void cfg_parser_error (cfg_parser_t *pctx, unsigned int flags, const char *fmt,...)
void cfg_parser_warning (cfg_parser_t *pctx, unsigned int flags, const char *fmt,...)
static isc_boolean_t have_current_file (cfg_parser_t *pctx)
static char * current_file (cfg_parser_t *pctx)
void cfg_obj_log (const cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt,...)
const char * cfg_obj_file (const cfg_obj_t *obj)
 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.
unsigned int cfg_obj_line (const cfg_obj_t *obj)
 Return the line in file where this object was defined.
isc_result_t cfg_create_obj (cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
static void map_symtabitem_destroy (char *key, unsigned int type, isc_symvalue_t symval, void *userarg)
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 **objp)
 Delete a reference to a configuration object; destroy the object if there are no more references.
void cfg_obj_attach (cfg_obj_t *src, cfg_obj_t **dest)
 Reference a configuration object.
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>.
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_result_t cfg_parser_mapadd (cfg_parser_t *pctx, cfg_obj_t *mapobj, cfg_obj_t *obj, const char *clausename)
 Add the object 'obj' to the specified clause in mapbody 'mapobj'. Used for adding new zones.

Variables

cfg_rep_t cfg_rep_uint32 = { "uint32", free_noop }
 Predefined data representation types.
cfg_rep_t cfg_rep_uint64 = { "uint64", free_noop }
cfg_rep_t cfg_rep_string = { "string", free_string }
cfg_rep_t cfg_rep_boolean = { "boolean", free_noop }
cfg_rep_t cfg_rep_map = { "map", free_map }
cfg_rep_t cfg_rep_list = { "list", free_list }
cfg_rep_t cfg_rep_tuple = { "tuple", free_tuple }
cfg_rep_t cfg_rep_sockaddr = { "sockaddr", free_noop }
cfg_rep_t cfg_rep_netprefix = { "netprefix", free_noop }
cfg_rep_t cfg_rep_void = { "void", free_noop }
static cfg_type_t cfg_type_implicitlist
 An implicit list. These are formed by clauses that occur multiple times.
static cfg_type_t cfg_type_filelist
cfg_type_t cfg_type_void
cfg_type_t cfg_type_uint32
cfg_type_t cfg_type_uint64
cfg_type_t cfg_type_qstring
cfg_type_t cfg_type_ustring
cfg_type_t cfg_type_astring
cfg_type_t cfg_type_sstring
cfg_type_t cfg_type_boolean
 Predefined configuration object types.
static struct flagtext flagtexts []
cfg_type_t cfg_type_token
cfg_type_t cfg_type_unsupported
static unsigned int netaddr_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK
static unsigned int netaddr4_flags = CFG_ADDR_V4OK
static unsigned int netaddr4wild_flags = CFG_ADDR_V4OK | CFG_ADDR_WILDOK
static unsigned int netaddr6_flags = CFG_ADDR_V6OK
static unsigned int netaddr6wild_flags = CFG_ADDR_V6OK | CFG_ADDR_WILDOK
cfg_type_t cfg_type_netaddr
cfg_type_t cfg_type_netaddr4
cfg_type_t cfg_type_netaddr4wild
cfg_type_t cfg_type_netaddr6
cfg_type_t cfg_type_netaddr6wild
cfg_type_t cfg_type_netprefix
static unsigned int sockaddr_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK
cfg_type_t cfg_type_sockaddr
static unsigned int sockaddrdscp_flags
cfg_type_t cfg_type_sockaddrdscp


Detailed Description

Definition in file parser.c.


Define Documentation

#define CAT   CFG_LOGCATEGORY_CONFIG

Definition at line 44 of file parser.c.

Referenced by cfg_obj_log(), and parser_complain().

#define MOD   CFG_LOGMODULE_PARSER

Definition at line 45 of file parser.c.

Referenced by cfg_obj_log(), and parser_complain().

#define MAP_SYM   1

Definition at line 47 of file parser.c.

Referenced by cfg_map_get().

#define TOKEN_STRING ( pctx   )     (pctx->token.value.as_textregion.base)

Definition at line 49 of file parser.c.

#define CHECK ( op   ) 

Value:

do { result = (op);                                     \
                if (result != ISC_R_SUCCESS) goto cleanup;      \
        } while (0)

Definition at line 52 of file parser.c.

#define CLEANUP_OBJ ( obj   )     do { if ((obj) != NULL) cfg_obj_destroy(pctx, &(obj)); } while (0)

Definition at line 58 of file parser.c.

#define MAX_LOG_TOKEN   30

Definition at line 2400 of file parser.c.

Referenced by parser_complain().


Function Documentation

static void free_tuple ( cfg_parser_t pctx,
cfg_obj_t obj 
) [static]

Definition at line 296 of file parser.c.

References CLEANUP_OBJ, isc_mem_put, cfg_parser::mctx, cfg_tuplefielddef::name, cfg_type::of, cfg_obj::tuple, cfg_obj::type, and cfg_obj::value.

static isc_result_t parse_list ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 1071 of file parser.c.

References isc_tokenvalue_t::as_char, cfg_create_list(), cfg_parse_listelt(), cfg_peektoken(), CHECK, cleanup(), CLEANUP_OBJ, free_listelt(), ISC_LIST_APPEND, ISC_R_SUCCESS, isc_tokentype_special, cfg_obj::list, cfg_type::of, parse_semicolon(), cfg_parser::token, isc_token::type, cfg_obj::value, and isc_token::value.

Referenced by cfg_parse_bracketed_list().

static void print_list ( cfg_printer_t pctx,
const cfg_obj_t obj 
) [static]

Definition at line 1101 of file parser.c.

References cfg_print_cstr(), cfg_print_obj(), CFG_PRINTER_ONELINE, cfg_printer::flags, ISC_LIST_HEAD, ISC_LIST_NEXT, cfg_obj::list, cfg_listelt::obj, print_indent(), and cfg_obj::value.

Referenced by cfg_print_bracketed_list().

static void free_list ( cfg_parser_t pctx,
cfg_obj_t obj 
) [static]

Definition at line 1031 of file parser.c.

References free_listelt(), ISC_LIST_HEAD, ISC_LIST_NEXT, cfg_obj::list, and cfg_obj::value.

static isc_result_t create_listelt ( cfg_parser_t pctx,
cfg_listelt_t **  eltp 
) [static]

Definition at line 1012 of file parser.c.

References ISC_LINK_INIT, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, cfg_parser::mctx, and cfg_listelt::obj.

Referenced by cfg_parse_listelt(), cfg_parser_mapadd(), and parser_openfile().

static isc_result_t create_string ( cfg_parser_t pctx,
const char *  contents,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 725 of file parser.c.

References isc_textregion::base, cfg_create_obj(), CHECK, cleanup(), isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, isc_textregion::length, cfg_parser::mctx, cfg_obj::string, and cfg_obj::value.

Referenced by cfg_parse_astring(), cfg_parse_qstring(), cfg_parse_sstring(), parse_ustring(), and parser_openfile().

static void free_string ( cfg_parser_t pctx,
cfg_obj_t obj 
) [static]

Definition at line 885 of file parser.c.

References isc_textregion::base, isc_mem_put, isc_textregion::length, cfg_parser::mctx, cfg_obj::string, and cfg_obj::value.

static isc_result_t create_map ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  objp 
) [static]

Definition at line 2558 of file parser.c.

References cfg_create_obj(), CHECK, cleanup(), cfg_map::id, ISC_FALSE, isc_mem_put, ISC_R_SUCCESS, isc_symtab_create(), cfg_obj::map, map_symtabitem_destroy(), cfg_parser::mctx, cfg_map::symtab, symtab, and cfg_obj::value.

Referenced by cfg_parse_mapbody().

static void free_map ( cfg_parser_t pctx,
cfg_obj_t obj 
) [static]

Definition at line 2580 of file parser.c.

References CLEANUP_OBJ, cfg_map::id, isc_symtab_destroy(), cfg_obj::map, cfg_map::symtab, and cfg_obj::value.

static isc_result_t parse_symtab_elt ( cfg_parser_t pctx,
const char *  name,
cfg_type_t elttype,
isc_symtab_t symtab,
isc_boolean_t  callback 
) [static]

Definition at line 1428 of file parser.c.

References isc_symvalue::as_pointer, cfg_parser::callback, cfg_parser::callbackarg, cfg_parse_obj(), CHECK, cleanup(), CLEANUP_OBJ, ISC_R_SUCCESS, isc_symexists_reject, and isc_symtab_define().

Referenced by cfg_parse_mapbody().

static void free_noop ( cfg_parser_t pctx,
cfg_obj_t obj 
) [static]

Definition at line 2621 of file parser.c.

References UNUSED.

static isc_result_t cfg_getstringtoken ( cfg_parser_t pctx  )  [static]

Definition at line 2367 of file parser.c.

References cfg_gettoken(), CFG_LEXOPT_QSTRING, CFG_LOG_NEAR, cfg_parser_error(), ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_qstring, isc_tokentype_string, cfg_parser::token, and isc_token::type.

Referenced by cfg_parse_astring(), and cfg_parse_sstring().

static void parser_complain ( cfg_parser_t pctx,
isc_boolean_t  is_warning,
unsigned int  flags,
const char *  format,
va_list  args 
) [static]

Definition at line 2434 of file parser.c.

References isc_region::base, CAT, cfg_gettoken(), CFG_LOG_BEFORE, CFG_LOG_NEAR, CFG_LOG_NOPREP, current_file(), FATAL_ERROR, have_current_file(), ISC_DIR_PATHMAX, isc_lex_getlasttokentext(), ISC_LOG_ERROR, ISC_LOG_WARNING, isc_log_write(), isc_tokentype_eof, isc_tokentype_unknown, cfg_parser::lctx, isc_region::length, cfg_parser::lexer, cfg_parser::line, MAX_LOG_TOKEN, MOD, r, cfg_parser::token, isc_token::type, and cfg_parser::ungotten.

Referenced by cfg_parser_error(), and cfg_parser_warning().

void cfg_print_obj ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 139 of file parser.c.

References cfg_type::print, and cfg_obj::type.

Referenced by cfg_print_kv_tuple(), cfg_print_map(), cfg_print_spacelist(), cfg_print_tuple(), print_list(), print_logfile(), and print_symval().

void cfg_print_chars ( cfg_printer_t pctx,
const char *  text,
int  len 
)

Print 'len' characters at 'text'.

Definition at line 144 of file parser.c.

References cfg_printer::closure, and cfg_printer::f.

Referenced by cfg_print_cstr(), cfg_print_rawaddr(), cfg_print_ustring(), and doc_enum_or_other().

static void print_open ( cfg_printer_t pctx  )  [static]

Definition at line 149 of file parser.c.

References cfg_print_cstr(), CFG_PRINTER_ONELINE, cfg_printer::flags, and cfg_printer::indent.

Referenced by cfg_doc_map(), cfg_print_bracketed_list(), and cfg_print_map().

static void print_indent ( cfg_printer_t pctx  )  [static]

Definition at line 159 of file parser.c.

References cfg_print_cstr(), CFG_PRINTER_ONELINE, cfg_printer::flags, cfg_printer::indent, and indent().

Referenced by cfg_doc_map(), print_close(), print_list(), and print_symval().

static void print_close ( cfg_printer_t pctx  )  [static]

Definition at line 172 of file parser.c.

References cfg_print_cstr(), CFG_PRINTER_ONELINE, cfg_printer::flags, cfg_printer::indent, and print_indent().

Referenced by cfg_doc_map(), cfg_print_bracketed_list(), and cfg_print_map().

isc_result_t cfg_parse_obj ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 181 of file parser.c.

References INSIST, ISC_R_SUCCESS, and cfg_type::parse.

Referenced by cfg_parse_kv_tuple(), cfg_parse_listelt(), cfg_parse_mapbody(), cfg_parse_rpz_policy(), cfg_parse_tuple(), parse2(), parse_addrmatchelt(), parse_any_named_map(), parse_enum_or_other(), parse_logfile(), parse_logseverity(), parse_optional_class(), parse_optional_facility(), parse_optional_uint32(), parse_server_key_kludge(), parse_sockaddrnameport(), and parse_symtab_elt().

void cfg_print ( const cfg_obj_t obj,
void(*)(void *closure, const char *text, int textlen)  f,
void *  closure 
)

Definition at line 192 of file parser.c.

References cfg_printx().

void cfg_printx ( const cfg_obj_t obj,
unsigned int  flags,
void(*)(void *closure, const char *text, int textlen)  f,
void *  closure 
)

Definition at line 200 of file parser.c.

References cfg_printer::closure, cfg_printer::f, cfg_printer::flags, cfg_printer::indent, cfg_type::print, and cfg_obj::type.

Referenced by cfg_print(), main(), ns_server_showzone(), and nzf_append().

isc_result_t cfg_create_tuple ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 215 of file parser.c.

References cfg_create_obj(), CHECK, cleanup(), isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, cfg_parser::mctx, cfg_tuplefielddef::name, cfg_type::of, return(), cfg_obj::tuple, and cfg_obj::value.

Referenced by cfg_parse_kv_tuple(), cfg_parse_rpz_policy(), cfg_parse_tuple(), parse_logfile(), parse_portrange(), and parse_sockaddrnameport().

isc_result_t cfg_parse_tuple ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 245 of file parser.c.

References cfg_create_tuple(), cfg_parse_obj(), CHECK, cleanup(), CLEANUP_OBJ, ISC_R_SUCCESS, cfg_tuplefielddef::name, cfg_type::of, cfg_obj::tuple, cfg_tuplefielddef::type, and cfg_obj::value.

void cfg_print_tuple ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 266 of file parser.c.

References cfg_print_cstr(), cfg_print_obj(), cfg_print_void(), ISC_FALSE, ISC_TF, cfg_tuplefielddef::name, cfg_type::of, cfg_type::print, cfg_obj::tuple, cfg_obj::type, and cfg_obj::value.

Referenced by print_lookaside(), and print_negated().

void cfg_doc_tuple ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 282 of file parser.c.

References cfg_doc_obj(), cfg_print_cstr(), cfg_print_void(), ISC_FALSE, ISC_TF, cfg_tuplefielddef::name, cfg_type::of, cfg_type::print, and cfg_tuplefielddef::type.

isc_boolean_t cfg_obj_istuple ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of a map type.

Definition at line 314 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by cfg_acl_fromconfig2(), and count_acl_elements().

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:

Definition at line 320 of file parser.c.

References INSIST, cfg_tuplefielddef::name, cfg_type::of, cfg_type::rep, REQUIRE, cfg_obj::tuple, cfg_obj::type, and cfg_obj::value.

Referenced by add_listener(), bind9_check_controls(), bind9_check_controlskeys(), bind9_check_logging(), bind9_check_namedconf(), category_fromconf(), cfg_acl_fromconfig2(), channel_fromconf(), check_dual_stack(), check_options(), check_orderent(), check_trusted_key(), check_update_policy(), check_zoneconf(), checkacl(), configure_alternates(), configure_forward(), configure_order(), configure_rpz(), configure_rpz_zone(), configure_view(), configure_view_acl(), configure_view_dnsseckeys(), configure_view_nametable(), configure_view_sortlist(), configure_zone(), configure_zone_acl(), configure_zone_ssutable(), count_acl_elements(), create_empty_zone(), delete_zoneconf(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), do_modzone(), dstkey_fromconfig(), find_name_in_list_from_map(), get_acl_def(), get_checknames(), get_key_info(), get_masters_def(), get_viewinfo(), load_configuration(), load_zones_fromconfig(), mustbesecure(), newzone_parse(), ns_checknames_get(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_controls_configure(), ns_listenelt_fromconfig(), ns_log_configure(), ns_lwdmanager_create(), ns_server_changezone(), ns_server_delzone(), ns_server_showzone(), ns_statschannels_configure(), ns_tkeyctx_fromconfig(), ns_tsigkeyring_fromconfig(), ns_zone_configure(), ns_zone_reusable(), parse_config(), portset_fromconf(), setup_newzones(), update_listener(), and validate_masters().

isc_result_t cfg_parse_special ( cfg_parser_t pctx,
int  special 
)

Parse a required special character 'special'.

Definition at line 337 of file parser.c.

References isc_tokenvalue_t::as_char, cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), CHECK, cleanup(), ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_special, cfg_parser::token, isc_token::type, and isc_token::value.

Referenced by cfg_parse_bracketed_list(), cfg_parse_map(), and parse_server_key_kludge().

static isc_result_t parse_semicolon ( cfg_parser_t pctx  )  [static]

Definition at line 358 of file parser.c.

References isc_tokenvalue_t::as_char, cfg_gettoken(), CFG_LOG_BEFORE, cfg_parser_error(), cfg_ungettoken(), CHECK, cleanup(), ISC_R_SUCCESS, isc_tokentype_special, cfg_parser::token, isc_token::type, and isc_token::value.

Referenced by cfg_parse_mapbody(), and parse_list().

static isc_result_t parse_eof ( cfg_parser_t pctx  )  [static]

Definition at line 375 of file parser.c.

References cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), CHECK, cleanup(), ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_eof, cfg_parser::token, and isc_token::type.

Referenced by parse2().

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'.

The parser object returned can be used for a single call to cfg_parse_file() or cfg_parse_buffer(). It must not be reused for parsing multiple files or buffers.

Definition at line 396 of file parser.c.

References cfg_parser::callback, cfg_parser::callbackarg, cfg_create_list(), CHECK, cleanup(), CLEANUP_OBJ, cfg_parser::closed_files, cfg_parser::errors, cfg_parser::flags, ISC_FALSE, isc_lex_create(), isc_lex_destroy(), isc_lex_setcomments(), isc_lex_setspecials(), ISC_LEXCOMMENT_C, ISC_LEXCOMMENT_CPLUSPLUS, ISC_LEXCOMMENT_SHELL, isc_mem_attach(), isc_mem_get, isc_mem_putanddetach, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_refcount_init(), isc_tokentype_unknown, cfg_parser::lctx, cfg_parser::lexer, cfg_parser::line, cfg_parser::mctx, cfg_parser::open_files, cfg_parser::references, REQUIRE, cfg_parser::seen_eof, cfg_parser::token, isc_token::type, cfg_parser::ungotten, and cfg_parser::warnings.

Referenced by get_rndckey(), load_configuration(), main(), parse_config(), read_confkey(), read_sessionkey(), and run_server().

static isc_result_t parser_openfile ( cfg_parser_t pctx,
const char *  filename 
) [static]

Definition at line 462 of file parser.c.

References cfg_parser_error(), cfg_type_qstring, CHECK, cleanup(), CLEANUP_OBJ, create_listelt(), create_string(), isc_lex_openfile(), ISC_LIST_APPEND, ISC_R_SUCCESS, isc_result_totext(), cfg_parser::lexer, cfg_obj::list, cfg_listelt::obj, cfg_parser::open_files, and cfg_obj::value.

Referenced by cfg_parse_file(), and cfg_parse_mapbody().

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, and 'arg' as arguments.

To restore the default of not invoking callbacks, pass callback==NULL and arg==NULL.

Definition at line 486 of file parser.c.

References cfg_parser::callback, and cfg_parser::callbackarg.

Referenced by load_configuration(), and main().

void cfg_parser_reset ( cfg_parser_t pctx  ) 

Reset an existing parser so it can be re-used for a new file or buffer.

Definition at line 495 of file parser.c.

References cfg_parser::errors, ISC_FALSE, isc_lex_close(), cfg_parser::lexer, cfg_parser::line, REQUIRE, cfg_parser::seen_eof, cfg_parser::ungotten, and cfg_parser::warnings.

Referenced by newzone_parse(), and setup_newzones().

static isc_result_t parse2 ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 513 of file parser.c.

References cfg_parse_obj(), cfg_parser_error(), CHECK, cleanup(), CLEANUP_OBJ, cfg_parser::errors, ISC_R_FAILURE, ISC_R_SUCCESS, and parse_eof().

Referenced by cfg_parse_buffer(), and cfg_parse_file().

isc_result_t cfg_parse_file ( cfg_parser_t pctx,
const char *  filename,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 543 of file parser.c.

References CHECK, cleanup(), parse2(), parser_openfile(), and REQUIRE.

Referenced by get_rndckey(), load_configuration(), main(), parse_config(), read_confkey(), read_sessionkey(), and setup_newzones().

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.

The configuration is read from the file 'filename' (isc_parse_file()) or the buffer 'buffer' (isc_parse_buffer()).

Returns an error if the file does not parse correctly.

Requires:

Returns:

Definition at line 558 of file parser.c.

References CHECK, cleanup(), isc_lex_openbuffer(), cfg_parser::lexer, parse2(), and REQUIRE.

Referenced by newzone_parse(), ns_config_parsedefaults(), and ns_lwresd_parseeresolvconf().

void cfg_parser_attach ( cfg_parser_t src,
cfg_parser_t **  dest 
)

Reference a parser object.

Definition at line 573 of file parser.c.

References isc_refcount_increment, cfg_parser::references, and REQUIRE.

Referenced by setup_newzones().

void cfg_parser_destroy ( cfg_parser_t **  pctxp  ) 

Remove a reference to a configuration parser; destroy it if there are no more references.

Definition at line 581 of file parser.c.

References CLEANUP_OBJ, cfg_parser::closed_files, isc_lex_destroy(), isc_mem_putanddetach, isc_refcount_decrement, cfg_parser::lexer, cfg_parser::mctx, cfg_parser::open_files, and cfg_parser::references.

Referenced by get_rndckey(), load_configuration(), main(), newzone_cfgctx_destroy(), read_confkey(), read_sessionkey(), and shutdown_server().

isc_result_t cfg_parse_void ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 604 of file parser.c.

References cfg_create_obj(), cfg_type_void, and UNUSED.

Referenced by cfg_parse_kv_tuple(), cfg_parse_rpz_policy(), parse_logfile(), parse_matchname(), and parse_maybe_optional_keyvalue().

void cfg_print_void ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 610 of file parser.c.

References UNUSED.

Referenced by cfg_doc_map(), cfg_doc_tuple(), cfg_print_kv_tuple(), cfg_print_tuple(), and print_logfile().

void cfg_doc_void ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 616 of file parser.c.

References UNUSED.

Referenced by cfg_doc_kv_tuple().

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).

Definition at line 622 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by bind9_check_controlskeys(), cfg_acl_fromconfig2(), check_lockfile(), check_options(), configure_rpz(), configure_rpz_zone(), configure_session_key(), configure_view(), configure_view_nametable(), count_acl_elements(), get_key_info(), load_configuration(), ns_zone_configure(), setoptstring(), and validate_masters().

isc_result_t cfg_parse_uint32 ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 636 of file parser.c.

References isc_tokenvalue_t::as_ulong, cfg_create_obj(), cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), cfg_type_uint32, CHECK, cleanup(), ISC_LEXOPT_CNUMBER, ISC_LEXOPT_NUMBER, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_number, cfg_parser::token, isc_token::type, cfg_obj::uint32, UNUSED, isc_token::value, and cfg_obj::value.

Referenced by parse_logseverity(), and parse_port().

void cfg_print_cstr ( cfg_printer_t pctx,
const char *  s 
)

Print the null-terminated string 's'.

Definition at line 656 of file parser.c.

References cfg_print_chars().

Referenced by cfg_doc_bracketed_list(), cfg_doc_enum(), cfg_doc_kv_tuple(), cfg_doc_map(), cfg_doc_mapbody(), cfg_doc_netaddr(), cfg_doc_sockaddr(), cfg_doc_terminal(), cfg_doc_tuple(), cfg_print_boolean(), cfg_print_kv_tuple(), cfg_print_map(), cfg_print_rawuint(), cfg_print_sockaddr(), cfg_print_spacelist(), cfg_print_tuple(), cfg_print_uint64(), doc_boolorauto(), doc_keyvalue(), doc_logfile(), doc_lookaside(), doc_masterselement(), doc_matchname(), doc_optional_bracketed_list(), doc_optional_keyvalue(), doc_optional_uint32(), doc_qstringornone(), doc_rpz_cname(), doc_rpz_policy(), doc_serverid(), doc_sockaddrnameport(), doc_updatepolicy(), print_auto(), print_boolorauto(), print_clause_flags(), print_close(), print_hostname(), print_indent(), print_keyvalue(), print_list(), print_logfile(), print_lookaside(), print_negated(), print_netprefix(), print_none(), print_open(), print_qstring(), print_querysource(), print_sstring(), and print_symval().

void cfg_print_rawuint ( cfg_printer_t pctx,
unsigned int  u 
)

Definition at line 661 of file parser.c.

References cfg_print_cstr().

Referenced by cfg_print_sockaddr(), cfg_print_uint32(), print_netprefix(), and print_querysource().

void cfg_print_uint32 ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 668 of file parser.c.

References cfg_print_rawuint(), cfg_obj::uint32, and cfg_obj::value.

isc_boolean_t cfg_obj_isuint32 ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of integer type.

Definition at line 673 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by channel_fromconf(), check_dual_stack(), configure_alternates(), configure_forward(), configure_rpz(), configure_rpz_zone(), configure_view(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_listenelt_fromconfig(), parse_config(), and portset_fromconf().

isc_uint32_t cfg_obj_asuint32 ( const cfg_obj_t obj  ) 

Returns the value of a configuration object of 32-bit integer type.

Requires:

Returns:

Definition at line 679 of file parser.c.

References cfg_type::rep, REQUIRE, cfg_obj::type, cfg_obj::uint32, and cfg_obj::value.

Referenced by add_listener(), bind9_check_controls(), channel_fromconf(), check_dscp(), check_dual_stack(), check_nonzero(), check_options(), check_trusted_key(), check_zoneconf(), configure_alternates(), configure_forward(), configure_peer(), configure_rpz(), configure_rpz_zone(), configure_rrl(), configure_server_quota(), configure_view(), configure_zone(), dstkey_fromconfig(), load_configuration(), ns_config_getdscp(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_config_getport(), ns_listenelt_fromconfig(), ns_lwdmanager_create(), ns_tkeyctx_fromconfig(), ns_zone_configure(), parse_config(), portset_fromconf(), and update_listener().

isc_boolean_t cfg_obj_isuint64 ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of integer type.

Definition at line 694 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by channel_fromconf().

isc_uint64_t cfg_obj_asuint64 ( const cfg_obj_t obj  ) 

Returns the value of a configuration object of 64-bit integer type.

Requires:

Returns:

Definition at line 700 of file parser.c.

References cfg_type::rep, REQUIRE, cfg_obj::type, cfg_obj::uint64, and cfg_obj::value.

Referenced by channel_fromconf(), configure_view(), ns_zone_configure(), and set_limit().

void cfg_print_uint64 ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 706 of file parser.c.

References cfg_print_cstr(), ISC_PRINT_QUADFORMAT, cfg_obj::uint64, and cfg_obj::value.

isc_result_t cfg_parse_qstring ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 749 of file parser.c.

References cfg_gettoken(), CFG_LEXOPT_QSTRING, CFG_LOG_NEAR, cfg_parser_error(), cfg_type_qstring, CHECK, cleanup(), create_string(), ISC_R_UNEXPECTEDTOKEN, isc_tokentype_qstring, cfg_parser::token, TOKEN_STRING, isc_token::type, and UNUSED.

Referenced by parse_qstringornone(), and parse_serverid().

static isc_result_t parse_ustring ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 767 of file parser.c.

References cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), cfg_type_ustring, CHECK, cleanup(), create_string(), ISC_R_UNEXPECTEDTOKEN, isc_tokentype_string, cfg_parser::token, TOKEN_STRING, isc_token::type, and UNUSED.

Referenced by cfg_parse_enum().

isc_result_t cfg_parse_astring ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 785 of file parser.c.

References cfg_getstringtoken(), cfg_type_qstring, CHECK, cleanup(), create_string(), TOKEN_STRING, and UNUSED.

Referenced by parse_addrmatchelt(), parse_masterselement(), and parse_matchname().

isc_result_t cfg_parse_sstring ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 801 of file parser.c.

References cfg_getstringtoken(), cfg_type_sstring, CHECK, cleanup(), create_string(), TOKEN_STRING, and UNUSED.

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'.

Definition at line 817 of file parser.c.

References ISC_FALSE, and ISC_TRUE.

Referenced by check_enum(), and parse_enum_or_other().

static isc_result_t check_enum ( cfg_parser_t pctx,
cfg_obj_t obj,
const char *const *  enums 
) [static]

Definition at line 827 of file parser.c.

References isc_textregion::base, cfg_is_enum(), cfg_parser_error(), ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, s, cfg_obj::string, and cfg_obj::value.

Referenced by cfg_parse_enum().

isc_result_t cfg_parse_enum ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 836 of file parser.c.

References CHECK, check_enum(), cleanup(), CLEANUP_OBJ, ISC_R_SUCCESS, cfg_type::of, and parse_ustring().

Referenced by parse_enum_or_other(), and parse_matchtype().

void cfg_doc_enum ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 849 of file parser.c.

References cfg_print_cstr(), and cfg_type::of.

void cfg_print_ustring ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 861 of file parser.c.

References isc_textregion::base, cfg_print_chars(), isc_textregion::length, cfg_obj::string, and cfg_obj::value.

Referenced by print_qstring(), print_sstring(), and print_updatepolicy().

static void print_qstring ( cfg_printer_t pctx,
const cfg_obj_t obj 
) [static]

Definition at line 866 of file parser.c.

References cfg_print_cstr(), and cfg_print_ustring().

static void print_sstring ( cfg_printer_t pctx,
const cfg_obj_t obj 
) [static]

Definition at line 873 of file parser.c.

References cfg_print_cstr(), cfg_print_ustring(), CFG_PRINTER_XKEY, cfg_printer::flags, isc_textregion::length, cfg_obj::string, and cfg_obj::value.

isc_boolean_t cfg_obj_isstring ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of string type.

Definition at line 891 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by bind9_check_namedconf(), cfg_acl_fromconfig2(), channel_fromconf(), check_lockfile(), check_options(), check_orderent(), check_update_policy(), check_zoneconf(), configure_order(), configure_view(), configure_zone(), configure_zone_ssutable(), count_acl_elements(), load_configuration(), load_zones_fromconfig(), newzone_parse(), ns_config_getclass(), ns_config_getipandkeylist(), ns_config_gettype(), ns_zone_configure(), print_updatepolicy(), and set_limit().

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:

Returns:

Definition at line 897 of file parser.c.

References isc_textregion::base, cfg_type::rep, REQUIRE, cfg_obj::string, cfg_obj::type, and cfg_obj::value.

Referenced by add_initial_keys(), bind9_check_controls(), bind9_check_controlskeys(), bind9_check_key(), bind9_check_logging(), bind9_check_namedconf(), category_fromconf(), cfg_acl_fromconfig2(), cfg_parse_rpz_policy(), cfgkeylist_find(), channel_fromconf(), check_dual_stack(), check_keylist(), check_lockfile(), check_options(), check_orderent(), check_servers(), check_trusted_key(), check_update_policy(), check_zoneconf(), configure_alternates(), configure_forward(), configure_order(), configure_peer(), configure_rpz_zone(), configure_session_key(), configure_staticstub_servernames(), configure_view(), configure_view_dnsseckeys(), configure_view_nametable(), configure_zone(), configure_zone_ssutable(), controlkeylist_fromcfg(), convert_keyname(), convert_named_acl(), count_acl_elements(), create_empty_zone(), delete_zoneconf(), directory_callback(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), dstkey_fromconfig(), fileexist(), find_name_in_list_from_map(), get_acl_def(), get_checknames(), get_masters_def(), get_rndckey(), get_viewinfo(), load_configuration(), load_zones_fromconfig(), mustbesecure(), newzone_parse(), ns_checknames_get(), ns_config_getclass(), ns_config_getipandkeylist(), ns_config_gettype(), ns_config_getzonetype(), ns_controls_configure(), ns_log_configure(), ns_lwdmanager_create(), ns_server_changezone(), ns_tkeyctx_fromconfig(), ns_zone_configure(), ns_zone_reusable(), on_disable_list(), parse_config(), read_confkey(), read_sessionkey(), register_keys(), rndckey_exists(), set_limit(), setoptstring(), and validate_masters().

isc_boolean_t cfg_obj_isboolean ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of a boolean type.

Definition at line 934 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by check_filteraaaa(), check_viewconf(), check_zoneconf(), configure_view(), load_configuration(), and ns_zone_configure().

isc_boolean_t cfg_obj_asboolean ( const cfg_obj_t obj  ) 

Returns the value of a configuration object of a boolean type.

Requires:

Returns:

Definition at line 940 of file parser.c.

References cfg_obj::boolean, cfg_type::rep, REQUIRE, cfg_obj::type, and cfg_obj::value.

Referenced by channel_fromconf(), check_filteraaaa(), check_recursionacls(), check_viewconf(), check_zoneconf(), configure_peer(), configure_rpz(), configure_rpz_zone(), configure_rrl(), configure_view(), configure_zone(), load_configuration(), mustbesecure(), ns_zone_configure(), ns_zone_reusable(), and setup_newzones().

isc_result_t cfg_parse_boolean ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 946 of file parser.c.

References cfg_obj::boolean, cfg_create_obj(), cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), cfg_type_boolean, CHECK, cleanup(), ISC_FALSE, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_string, ISC_TRUE, cfg_parser::token, TOKEN_STRING, isc_token::type, UNUSED, and cfg_obj::value.

Referenced by parse_boolorauto().

void cfg_print_boolean ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 986 of file parser.c.

References cfg_obj::boolean, cfg_print_cstr(), and cfg_obj::value.

isc_result_t cfg_create_list ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  obj 
)

Definition at line 1003 of file parser.c.

References cfg_create_obj(), CHECK, cleanup(), and ISC_LIST_INIT.

Referenced by cfg_parse_mapbody(), cfg_parse_spacelist(), cfg_parser_create(), cfg_parser_mapadd(), parse_list(), and parse_unsupported().

static void free_listelt ( cfg_parser_t pctx,
cfg_listelt_t elt 
) [static]

Definition at line 1024 of file parser.c.

References cfg_obj_destroy(), isc_mem_put, cfg_parser::mctx, and cfg_listelt::obj.

Referenced by cfg_parser_mapadd(), free_list(), and parse_list().

isc_result_t cfg_parse_listelt ( cfg_parser_t pctx,
const cfg_type_t elttype,
cfg_listelt_t **  ret 
)

Definition at line 1043 of file parser.c.

References cfg_parse_obj(), CHECK, cleanup(), create_listelt(), isc_mem_put, ISC_R_SUCCESS, cfg_parser::mctx, and cfg_listelt::obj.

Referenced by cfg_parse_mapbody(), cfg_parse_spacelist(), parse_list(), and parse_unsupported().

isc_result_t cfg_parse_bracketed_list ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 1121 of file parser.c.

References cfg_parse_special(), CHECK, cleanup(), and parse_list().

Referenced by parse_updatepolicy().

void cfg_print_bracketed_list ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 1133 of file parser.c.

References print_close(), print_list(), and print_open().

Referenced by print_updatepolicy().

void cfg_doc_bracketed_list ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 1140 of file parser.c.

References cfg_doc_obj(), cfg_print_cstr(), and cfg_type::of.

isc_result_t cfg_parse_spacelist ( cfg_parser_t pctx,
const cfg_type_t listtype,
cfg_obj_t **  ret 
)

Definition at line 1152 of file parser.c.

References isc_tokenvalue_t::as_char, cfg_create_list(), cfg_parse_listelt(), cfg_peektoken(), CHECK, cleanup(), CLEANUP_OBJ, ISC_LIST_APPEND, ISC_R_SUCCESS, isc_tokentype_special, cfg_obj::list, cfg_type::of, cfg_parser::token, isc_token::type, cfg_obj::value, and isc_token::value.

void cfg_print_spacelist ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 1180 of file parser.c.

References cfg_print_cstr(), cfg_print_obj(), ISC_LIST_HEAD, ISC_LIST_NEXT, cfg_obj::list, cfg_listelt::obj, and cfg_obj::value.

isc_boolean_t cfg_obj_islist ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of list type.

Definition at line 1194 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by add_listener(), cfg_acl_fromconfig2(), cfg_list_length(), count_acl_elements(), delete_zoneconf(), get_checknames(), newzone_parse(), ns_checknames_get(), and update_listener().

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:

Returns:

Definition at line 1200 of file parser.c.

References ISC_LIST_HEAD, cfg_obj::list, cfg_type::rep, REQUIRE, cfg_obj::type, and cfg_obj::value.

Referenced by add_initial_keys(), bind9_check_controls(), bind9_check_controlskeys(), bind9_check_logging(), bind9_check_namedconf(), category_fromconf(), cfg_acl_fromconfig2(), cfg_list_length(), cfgkeylist_find(), check_dns64(), check_dual_stack(), check_keylist(), check_options(), check_order(), check_servers(), check_update_policy(), check_viewconf(), check_zoneconf(), configure_alternates(), configure_forward(), configure_rpz(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), configure_view(), configure_view_nametable(), configure_zone_ssutable(), controlkeylist_fromcfg(), count_acl_elements(), count_zones(), create_empty_zone(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), find_name_in_list_from_map(), get_acl_def(), get_checknames(), get_key_info(), get_masters_def(), load_configuration(), load_view_keys(), load_zones_fromconfig(), mustbesecure(), newzone_parse(), ns_checknames_get(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_config_listcount(), ns_controls_configure(), ns_listenlist_fromconfig(), ns_log_configure(), ns_lwdmanager_create(), ns_lwresd_configure(), ns_statschannels_configure(), on_disable_list(), parse_config(), portset_fromconf(), rndckey_exists(), and validate_masters().

const cfg_listelt_t* cfg_list_next ( const cfg_listelt_t elt  ) 

Returns the next element of a list of configuration objects.

Requires:

Returns:

Definition at line 1208 of file parser.c.

References ISC_LIST_NEXT, and REQUIRE.

Referenced by add_initial_keys(), bind9_check_controls(), bind9_check_controlskeys(), bind9_check_logging(), bind9_check_namedconf(), category_fromconf(), cfg_acl_fromconfig2(), cfg_list_length(), cfgkeylist_find(), check_dns64(), check_dual_stack(), check_keylist(), check_options(), check_order(), check_servers(), check_update_policy(), check_viewconf(), check_zoneconf(), configure_alternates(), configure_forward(), configure_rpz(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), configure_view(), configure_view_nametable(), configure_zone_ssutable(), controlkeylist_fromcfg(), count_acl_elements(), count_zones(), create_empty_zone(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), find_name_in_list_from_map(), get_acl_def(), get_checknames(), get_masters_def(), load_configuration(), load_view_keys(), load_zones_fromconfig(), mustbesecure(), ns_checknames_get(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_config_listcount(), ns_controls_configure(), ns_listenlist_fromconfig(), ns_log_configure(), ns_lwdmanager_create(), ns_lwresd_configure(), ns_statschannels_configure(), on_disable_list(), parse_config(), portset_fromconf(), rndckey_exists(), and validate_masters().

unsigned int cfg_list_length ( const cfg_obj_t obj,
isc_boolean_t  recurse 
)

Returns the length of a list of configure objects. If obj is not a list, returns 0. If recurse is true, add in the length of all contained lists.

Definition at line 1218 of file parser.c.

References cfg_list_first(), cfg_list_length(), cfg_list_next(), cfg_obj_islist(), and cfg_listelt::obj.

Referenced by cfg_acl_fromconfig2(), and cfg_list_length().

cfg_obj_t* cfg_listelt_value ( const cfg_listelt_t elt  ) 

Returns the configuration object associated with cfg_listelt_t.

Requires:

Returns:

Definition at line 1237 of file parser.c.

References cfg_listelt::obj, and REQUIRE.

Referenced by add_initial_keys(), bind9_check_controls(), bind9_check_controlskeys(), bind9_check_logging(), bind9_check_namedconf(), category_fromconf(), cfg_acl_fromconfig2(), cfgkeylist_find(), check_dns64(), check_dual_stack(), check_keylist(), check_options(), check_order(), check_servers(), check_update_policy(), check_viewconf(), check_zoneconf(), configure_alternates(), configure_forward(), configure_rpz_zone(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), configure_view(), configure_view_nametable(), configure_zone_ssutable(), controlkeylist_fromcfg(), count_acl_elements(), create_empty_zone(), delete_zoneconf(), disable_algorithms(), disable_ds_digests(), disabled_algorithms(), disabled_ds_digests(), find_name_in_list_from_map(), get_acl_def(), get_checknames(), get_masters_def(), load_configuration(), load_view_keys(), load_zones_fromconfig(), mustbesecure(), newzone_parse(), ns_checknames_get(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_controls_configure(), ns_listenlist_fromconfig(), ns_log_configure(), ns_lwdmanager_create(), ns_lwresd_configure(), ns_statschannels_configure(), on_disable_list(), parse_config(), portset_fromconf(), rndckey_exists(), and validate_masters().

isc_result_t cfg_parse_mapbody ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 1257 of file parser.c.

References isc_symvalue::as_pointer, isc_textregion::base, CFG_CLAUSEFLAG_CALLBACK, CFG_CLAUSEFLAG_MULTI, CFG_CLAUSEFLAG_NOTCONFIGURED, CFG_CLAUSEFLAG_NOTIMP, CFG_CLAUSEFLAG_NYI, CFG_CLAUSEFLAG_OBSOLETE, cfg_create_list(), cfg_gettoken(), CFG_LOG_NEAR, CFG_LOG_NOPREP, cfg_obj_destroy(), cfg_parse_listelt(), cfg_parse_obj(), cfg_parser_error(), cfg_parser_warning(), cfg_type_unsupported, cfg_ungettoken(), CHECK, cfg_map::clausesets, cleanup(), CLEANUP_OBJ, create_map(), cfg_clausedef::flags, INSIST, ISC_LIST_APPEND, isc_mem_put, ISC_R_EXISTS, ISC_R_FAILURE, ISC_R_NOTFOUND, ISC_R_SUCCESS, isc_symexists_reject, isc_symtab_define(), isc_symtab_lookup(), ISC_TF, isc_tokentype_string, cfg_obj::list, map, cfg_obj::map, cfg_parser::mctx, cfg_clausedef::name, cfg_type::of, parse_semicolon(), parse_symtab_elt(), parser_openfile(), cfg_obj::string, cfg_map::symtab, cfg_parser::token, TOKEN_STRING, cfg_clausedef::type, isc_token::type, and cfg_obj::value.

Referenced by cfg_parse_map().

isc_result_t cfg_parse_map ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 1456 of file parser.c.

References cfg_parse_mapbody(), cfg_parse_special(), CHECK, and cleanup().

Referenced by parse_any_named_map().

static isc_result_t parse_any_named_map ( cfg_parser_t pctx,
cfg_type_t nametype,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 1469 of file parser.c.

References cfg_parse_map(), cfg_parse_obj(), CHECK, cleanup(), CLEANUP_OBJ, cfg_map::id, cfg_obj::map, and cfg_obj::value.

Referenced by cfg_parse_addressed_map(), cfg_parse_named_map(), and cfg_parse_netprefix_map().

isc_result_t cfg_parse_named_map ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 1492 of file parser.c.

References parse_any_named_map().

Referenced by cfg_doc_map().

isc_result_t cfg_parse_addressed_map ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 1501 of file parser.c.

References cfg_type_netaddr, and parse_any_named_map().

Referenced by cfg_doc_map().

isc_result_t cfg_parse_netprefix_map ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 1510 of file parser.c.

References cfg_type_netprefix, and parse_any_named_map().

Referenced by cfg_doc_map().

static void print_symval ( cfg_printer_t pctx,
const char *  name,
cfg_obj_t obj 
) [static]

Definition at line 1515 of file parser.c.

References cfg_print_cstr(), cfg_print_obj(), CFG_PRINTER_ONELINE, cfg_printer::flags, and print_indent().

Referenced by cfg_print_mapbody().

void cfg_print_mapbody ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 1530 of file parser.c.

References isc_symvalue::as_pointer, cfg_map::clausesets, INSIST, ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_R_NOTFOUND, ISC_R_SUCCESS, isc_symtab_lookup(), cfg_obj::list, cfg_obj::map, cfg_clausedef::name, cfg_listelt::obj, print_symval(), cfg_map::symtab, cfg_obj::type, and cfg_obj::value.

Referenced by cfg_print_map().

void cfg_doc_mapbody ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 1574 of file parser.c.

References cfg_doc_obj(), cfg_print_cstr(), cfg_clausedef::name, cfg_type::of, and cfg_clausedef::type.

void cfg_print_map ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 1605 of file parser.c.

References cfg_print_cstr(), cfg_print_mapbody(), cfg_print_obj(), cfg_map::id, cfg_obj::map, print_close(), print_open(), and cfg_obj::value.

static void print_clause_flags ( cfg_printer_t pctx,
unsigned int  flags 
) [static]

Definition at line 1616 of file parser.c.

References cfg_print_cstr(), flagtext::flag, flagtexts, ISC_FALSE, ISC_TRUE, and flagtext::text.

Referenced by cfg_doc_map().

void cfg_doc_map ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 1632 of file parser.c.

References cfg_doc_obj(), cfg_parse_addressed_map(), cfg_parse_named_map(), cfg_parse_netprefix_map(), cfg_print_cstr(), cfg_print_void(), cfg_type_netaddr, cfg_type_netprefix, cfg_clausedef::flags, cfg_clausedef::name, cfg_type::of, cfg_type::parse, cfg_type::print, print_clause_flags(), print_close(), print_indent(), print_open(), and cfg_clausedef::type.

isc_boolean_t cfg_obj_ismap ( const cfg_obj_t obj  ) 

Return true iff 'obj' is of a map type.

Definition at line 1667 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::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:

Returns:

Definition at line 1673 of file parser.c.

References isc_symvalue::as_pointer, ISC_R_SUCCESS, isc_symtab_lookup(), cfg_obj::map, map, MAP_SYM, cfg_type::rep, REQUIRE, cfg_map::symtab, cfg_obj::type, and cfg_obj::value.

Referenced by add_initial_keys(), bind9_check_controls(), bind9_check_key(), bind9_check_logging(), bind9_check_namedconf(), channel_fromconf(), check_dns64(), check_dscp(), check_dual_stack(), check_filteraaaa(), check_forward(), check_lockfile(), check_nonzero(), check_options(), check_order(), check_recursionacls(), check_servers(), check_viewconf(), check_zoneconf(), checkacl(), configure_peer(), configure_rrl(), configure_staticstub(), configure_view(), configure_view_acl(), configure_view_dnsseckeys(), configure_view_nametable(), configure_view_sortlist(), configure_zone(), configure_zone_acl(), configure_zone_ssutable(), count_zones(), create_empty_zone(), delete_zoneconf(), find_name_in_list_from_map(), get_acl_def(), get_checknames(), get_key_info(), get_maps(), get_masters_def(), get_rndckey(), load_configuration(), load_zones_fromconfig(), newzone_parse(), ns_checknames_get(), ns_config_get(), ns_config_getdscp(), ns_config_getport(), ns_controls_configure(), ns_log_configure(), ns_lwdmanager_create(), ns_lwresd_configure(), ns_statschannels_configure(), ns_tkeyctx_fromconfig(), ns_tsigkeyring_fromconfig(), ns_zone_configure(), ns_zone_reusable(), parse_config(), read_confkey(), read_sessionkey(), register_keys(), setup_newzones(), and zonetype_fromconfig().

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:

Returns:

Definition at line 1692 of file parser.c.

References cfg_map::id, cfg_obj::map, cfg_type::rep, REQUIRE, cfg_obj::type, and cfg_obj::value.

Referenced by add_initial_keys(), bind9_check_key(), bind9_check_logging(), cfgkeylist_find(), channel_fromconf(), check_dns64(), check_keylist(), check_servers(), configure_peer(), configure_view(), get_rndckey(), parse_config(), read_confkey(), read_sessionkey(), and rndckey_exists().

unsigned int cfg_map_count ( const cfg_obj_t mapobj  ) 

Get the number of elements defined in the symbol table of a map object.

Requires:

Returns:

Definition at line 1698 of file parser.c.

References isc_symtab_count(), cfg_obj::map, map, cfg_type::rep, REQUIRE, cfg_map::symtab, cfg_obj::type, and cfg_obj::value.

Referenced by check_zoneconf().

static isc_result_t parse_token ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 1707 of file parser.c.

References isc_region::base, isc_textregion::base, cfg_create_obj(), cfg_gettoken(), CFG_LEXOPT_QSTRING, cfg_type_token, cfg_ungettoken(), CHECK, cleanup(), isc_lex_getlasttokentext(), isc_mem_get, isc_mem_put, ISC_R_EOF, ISC_R_NOMEMORY, isc_tokentype_eof, isc_textregion::length, isc_region::length, cfg_parser::lexer, cfg_parser::mctx, r, cfg_obj::string, cfg_parser::token, isc_token::type, UNUSED, and cfg_obj::value.

static isc_result_t parse_unsupported ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 1752 of file parser.c.

References isc_tokenvalue_t::as_char, cfg_create_list(), CFG_LOG_NEAR, cfg_parse_listelt(), cfg_parser_error(), cfg_peektoken(), CHECK, cleanup(), CLEANUP_OBJ, INSIST, ISC_LIST_APPEND, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_eof, isc_tokentype_special, cfg_obj::list, cfg_parser::token, isc_token::type, cfg_obj::value, and isc_token::value.

static isc_result_t token_addr ( cfg_parser_t pctx,
unsigned int  flags,
isc_netaddr_t na 
) [static]

Definition at line 1805 of file parser.c.

References AF_INET6, CFG_ADDR_V4OK, CFG_ADDR_V4PREFIXOK, CFG_ADDR_V6OK, CFG_ADDR_WILDOK, INSIST, isc_netaddr_any(), isc_netaddr_any6(), isc_netaddr_fromin(), isc_netaddr_fromin6(), isc_netaddr_setzone(), isc_netscope_pton(), ISC_R_BADADDRESSFORM, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_string, s, cfg_parser::token, TOKEN_STRING, isc_token::type, and zone.

Referenced by cfg_lookingat_netaddr(), and cfg_parse_rawaddr().

isc_result_t cfg_parse_rawaddr ( cfg_parser_t pctx,
unsigned int  flags,
isc_netaddr_t na 
)

Definition at line 1882 of file parser.c.

References CFG_ADDR_MASK, CFG_ADDR_V4OK, CFG_ADDR_V4PREFIXOK, CFG_ADDR_V6OK, CFG_ADDR_WILDOK, cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), CHECK, cleanup(), ISC_R_UNEXPECTEDTOKEN, token_addr(), and wild.

Referenced by cfg_parse_netprefix(), parse_netaddr(), parse_querysource(), and parse_sockaddrsub().

isc_boolean_t cfg_lookingat_netaddr ( cfg_parser_t pctx,
unsigned int  flags 
)

Definition at line 1912 of file parser.c.

References ISC_R_SUCCESS, ISC_TF, and token_addr().

Referenced by parse_addrmatchelt(), parse_masterselement(), and parse_sockaddrnameport().

isc_result_t cfg_parse_rawport ( cfg_parser_t pctx,
unsigned int  flags,
in_port_t *  port 
)

Definition at line 1920 of file parser.c.

References isc_tokenvalue_t::as_ulong, CFG_ADDR_WILDOK, cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), CHECK, cleanup(), ISC_LEXOPT_NUMBER, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_number, isc_tokentype_string, cfg_parser::token, TOKEN_STRING, isc_token::type, and isc_token::value.

Referenced by parse_querysource(), and parse_sockaddrsub().

void cfg_print_rawaddr ( cfg_printer_t pctx,
const isc_netaddr_t na 
)

Definition at line 1948 of file parser.c.

References cfg_print_chars(), isc_buffer_base, isc_buffer_init, isc_buffer_usedlength, isc_netaddr_totext(), ISC_R_SUCCESS, RUNTIME_CHECK, and text.

Referenced by print_netprefix(), and print_querysource().

isc_result_t cfg_parse_dscp ( cfg_parser_t pctx,
isc_dscp_t dscp 
)

Definition at line 1961 of file parser.c.

References isc_tokenvalue_t::as_ulong, cfg_gettoken(), CFG_LOG_NEAR, cfg_parser_error(), CHECK, cleanup(), ISC_LEXOPT_CNUMBER, ISC_LEXOPT_NUMBER, ISC_R_RANGE, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_number, cfg_parser::token, isc_token::type, and isc_token::value.

Referenced by parse_querysource(), and parse_sockaddrsub().

static isc_result_t parse_netaddr ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
) [static]

Definition at line 1991 of file parser.c.

References cfg_create_obj(), cfg_parse_rawaddr(), CHECK, cleanup(), CLEANUP_OBJ, ISC_R_SUCCESS, isc_sockaddr_fromnetaddr(), cfg_type::of, cfg_obj::sockaddr, and cfg_obj::value.

static void cfg_doc_netaddr ( cfg_printer_t pctx,
const cfg_type_t type 
) [static]

Definition at line 2008 of file parser.c.

References CFG_ADDR_V4OK, CFG_ADDR_V6OK, CFG_ADDR_WILDOK, cfg_print_cstr(), cfg_type::of, and POST.

isc_result_t cfg_parse_netprefix ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 2062 of file parser.c.

References cfg_netprefix::address, AF_INET6, isc_tokenvalue_t::as_char, isc_tokenvalue_t::as_ulong, CFG_ADDR_V4OK, CFG_ADDR_V4PREFIXOK, CFG_ADDR_V6OK, cfg_create_obj(), cfg_gettoken(), CFG_LOG_NEAR, CFG_LOG_NOPREP, cfg_parse_rawaddr(), cfg_parser_error(), cfg_peektoken(), cfg_type_netprefix, CHECK, cleanup(), isc_netaddr::family, INSIST, ISC_LEXOPT_NUMBER, ISC_R_RANGE, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_tokentype_number, isc_tokentype_special, cfg_obj::netprefix, cfg_netprefix::prefixlen, cfg_parser::token, isc_token::type, UNUSED, cfg_obj::value, and isc_token::value.

Referenced by parse_addrmatchelt().

static void print_netprefix ( cfg_printer_t pctx,
const cfg_obj_t obj 
) [static]

Definition at line 2114 of file parser.c.

References cfg_netprefix::address, cfg_print_cstr(), cfg_print_rawaddr(), cfg_print_rawuint(), cfg_obj::netprefix, cfg_netprefix::prefixlen, and cfg_obj::value.

isc_boolean_t cfg_obj_isnetprefix ( const cfg_obj_t obj  ) 

Return true iff 'obj' is a network prefix.

Definition at line 2123 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by cfg_acl_fromconfig2().

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:

Definition at line 2129 of file parser.c.

References cfg_netprefix::address, cfg_obj::netprefix, cfg_netprefix::prefixlen, cfg_type::rep, REQUIRE, cfg_obj::type, and cfg_obj::value.

Referenced by cfg_acl_fromconfig2(), check_dns64(), check_servers(), configure_peer(), and configure_view().

static isc_result_t parse_sockaddrsub ( cfg_parser_t pctx,
const cfg_type_t type,
int  flags,
cfg_obj_t **  ret 
) [static]

Definition at line 2146 of file parser.c.

References CFG_ADDR_DSCPOK, cfg_create_obj(), cfg_gettoken(), cfg_parse_dscp(), cfg_parse_rawaddr(), cfg_parse_rawport(), cfg_parser_error(), cfg_peektoken(), CHECK, cleanup(), CLEANUP_OBJ, ISC_R_SUCCESS, ISC_R_UNEXPECTEDTOKEN, isc_sockaddr_fromnetaddr(), isc_tokentype_string, port, cfg_obj::sockaddr, cfg_obj::sockaddrdscp, cfg_parser::token, TOKEN_STRING, isc_token::type, and cfg_obj::value.

Referenced by cfg_parse_sockaddr().

isc_result_t cfg_parse_sockaddr ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 2211 of file parser.c.

References cfg_type::of, and parse_sockaddrsub().

Referenced by parse_masterselement(), parse_querysource(), and parse_sockaddrnameport().

void cfg_print_sockaddr ( cfg_printer_t pctx,
const cfg_obj_t obj 
)

Definition at line 2217 of file parser.c.

References cfg_print_cstr(), cfg_print_rawuint(), isc_netaddr_format(), ISC_NETADDR_FORMATSIZE, isc_netaddr_fromsockaddr(), isc_sockaddr_getport(), port, cfg_obj::sockaddr, cfg_obj::sockaddrdscp, and cfg_obj::value.

void cfg_doc_sockaddr ( cfg_printer_t pctx,
const cfg_type_t type 
)

Definition at line 2237 of file parser.c.

References CFG_ADDR_DSCPOK, CFG_ADDR_V4OK, CFG_ADDR_V6OK, CFG_ADDR_WILDOK, cfg_print_cstr(), cfg_type::of, and POST.

isc_boolean_t cfg_obj_issockaddr ( const cfg_obj_t obj  ) 

Return true iff 'obj' is a socket address.

Definition at line 2270 of file parser.c.

References ISC_TF, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by check_dual_stack(), configure_alternates(), ns_config_getipandkeylist(), parse_config(), and validate_masters().

const isc_sockaddr_t* cfg_obj_assockaddr ( const cfg_obj_t obj  ) 

Returns the value of a configuration object representing a socket address.

Requires:

Returns:

Definition at line 2276 of file parser.c.

References cfg_type::rep, REQUIRE, cfg_obj::sockaddr, cfg_obj::type, and cfg_obj::value.

Referenced by check_dns64(), check_zoneconf(), configure_alternates(), configure_forward(), configure_peer(), configure_staticstub_serveraddrs(), configure_view(), get_view_querysource_dispatch(), ns_config_getipandkeylist(), ns_config_getiplist(), ns_controls_configure(), ns_statschannels_configure(), ns_zone_configure(), and parse_config().

isc_dscp_t cfg_obj_getdscp ( const cfg_obj_t obj  ) 

Returns the DSCP value of a configuration object representing a socket address.

Requires:

Returns:

Definition at line 2282 of file parser.c.

References cfg_type::rep, REQUIRE, cfg_obj::sockaddrdscp, cfg_obj::type, and cfg_obj::value.

Referenced by configure_forward(), configure_peer(), get_view_querysource_dispatch(), ns_config_getipandkeylist(), ns_config_getiplist(), and ns_zone_configure().

isc_result_t cfg_gettoken ( cfg_parser_t pctx,
int  options 
)

Definition at line 2288 of file parser.c.

References CFG_LOG_NEAR, cfg_parser_error(), cfg_parser::closed_files, INSIST, ISC_FALSE, isc_lex_close(), isc_lex_getsourceline(), isc_lex_getsourcename(), isc_lex_gettoken(), ISC_LEXOPT_EOF, ISC_LEXOPT_NOMORE, ISC_LIST_APPEND, ISC_LIST_TAIL, ISC_LIST_UNLINK, ISC_R_IOERROR, ISC_R_NOMORE, ISC_R_NOSPACE, ISC_R_SUCCESS, isc_result_totext(), isc_tokentype_eof, isc_tokentype_unknown, ISC_TRUE, cfg_parser::lexer, cfg_parser::line, cfg_obj::list, cfg_parser::open_files, cfg_parser::seen_eof, cfg_parser::token, isc_token::type, and cfg_parser::ungotten.

Referenced by cfg_getstringtoken(), cfg_parse_boolean(), cfg_parse_dscp(), cfg_parse_kv_tuple(), cfg_parse_mapbody(), cfg_parse_netprefix(), cfg_parse_qstring(), cfg_parse_rawaddr(), cfg_parse_rawport(), cfg_parse_special(), cfg_parse_uint32(), cfg_peektoken(), parse_addrmatchelt(), parse_boolorauto(), parse_eof(), parse_logfile(), parse_logseverity(), parse_maybe_optional_keyvalue(), parse_portrange(), parse_qstringornone(), parse_querysource(), parse_semicolon(), parse_server_key_kludge(), parse_serverid(), parse_sizeval(), parse_sockaddrsub(), parse_token(), parse_ttlval(), parse_updatepolicy(), parse_ustring(), and parser_complain().

void cfg_ungettoken ( cfg_parser_t pctx  ) 

Definition at line 2346 of file parser.c.

References isc_lex_ungettoken(), ISC_TRUE, cfg_parser::lexer, cfg_parser::seen_eof, cfg_parser::token, and cfg_parser::ungotten.

Referenced by cfg_parse_mapbody(), cfg_peektoken(), parse_boolorauto(), parse_qstringornone(), parse_semicolon(), parse_serverid(), parse_token(), and parse_updatepolicy().

isc_result_t cfg_peektoken ( cfg_parser_t pctx,
int  options 
)

Definition at line 2354 of file parser.c.

References cfg_gettoken(), cfg_ungettoken(), CHECK, and cleanup().

Referenced by cfg_parse_kv_tuple(), cfg_parse_netprefix(), cfg_parse_spacelist(), parse_addrmatchelt(), parse_enum_or_other(), parse_list(), parse_logfile(), parse_logseverity(), parse_masterselement(), parse_matchtype(), parse_maybe_optional_keyvalue(), parse_optional_class(), parse_optional_facility(), parse_optional_uint32(), parse_portrange(), parse_querysource(), parse_server_key_kludge(), parse_sockaddrnameport(), parse_sockaddrsub(), and parse_unsupported().

void cfg_parser_error ( cfg_parser_t pctx,
unsigned int  flags,
const char *  fmt,
  ... 
)

Definition at line 2383 of file parser.c.

References cfg_parser::errors, ISC_FALSE, and parser_complain().

void cfg_parser_warning ( cfg_parser_t pctx,
unsigned int  flags,
const char *  fmt,
  ... 
)

Definition at line 2392 of file parser.c.

References ISC_TRUE, parser_complain(), and cfg_parser::warnings.

static isc_boolean_t have_current_file ( cfg_parser_t pctx  )  [static]

Definition at line 2403 of file parser.c.

References ISC_FALSE, ISC_LIST_TAIL, ISC_TRUE, cfg_obj::list, cfg_parser::open_files, and cfg_obj::value.

Referenced by current_file(), and parser_complain().

static char* current_file ( cfg_parser_t pctx  )  [static]

Definition at line 2416 of file parser.c.

References isc_textregion::base, have_current_file(), INSIST, ISC_LIST_TAIL, cfg_obj::list, cfg_listelt::obj, cfg_parser::open_files, cfg_obj::string, cfg_obj::type, and cfg_obj::value.

Referenced by cfg_create_obj(), and parser_complain().

void cfg_obj_log ( const cfg_obj_t obj,
isc_log_t lctx,
int  level,
const char *  fmt,
  ... 
)

Definition at line 2495 of file parser.c.

References CAT, cfg_obj::file, isc_log_wouldlog(), isc_log_write(), cfg_obj::line, and MOD.

const char* cfg_obj_file ( const cfg_obj_t obj  ) 

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.

Return the file that defined this object.

Definition at line 2514 of file parser.c.

References cfg_obj::file.

Referenced by bind9_check_namedconf(), check_forward(), check_keylist(), check_servers(), fileexist(), and nameexist().

unsigned int cfg_obj_line ( const cfg_obj_t obj  ) 

Return the line in file where this object was defined.

Definition at line 2519 of file parser.c.

References cfg_obj::line.

Referenced by bind9_check_namedconf(), check_forward(), check_keylist(), check_servers(), fileexist(), and nameexist().

isc_result_t cfg_create_obj ( cfg_parser_t pctx,
const cfg_type_t type,
cfg_obj_t **  ret 
)

Definition at line 2524 of file parser.c.

References current_file(), cfg_obj::file, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_refcount_init(), cfg_parser::line, cfg_obj::line, cfg_parser::mctx, cfg_obj::references, and cfg_obj::type.

Referenced by cfg_create_list(), cfg_create_tuple(), cfg_parse_boolean(), cfg_parse_netprefix(), cfg_parse_uint32(), cfg_parse_void(), create_map(), create_string(), parse_boolorauto(), parse_logseverity(), parse_netaddr(), parse_qstringornone(), parse_querysource(), parse_serverid(), parse_sizeval(), parse_sockaddrsub(), parse_token(), parse_ttlval(), and parse_updatepolicy().

static void map_symtabitem_destroy ( char *  key,
unsigned int  type,
isc_symvalue_t  symval,
void *  userarg 
) [static]

Definition at line 2545 of file parser.c.

References isc_symvalue::as_pointer, cfg_obj_destroy(), and UNUSED.

Referenced by create_map().

isc_boolean_t cfg_obj_istype ( const cfg_obj_t obj,
const cfg_type_t type 
)

Return true iff 'obj' is of type 'type'.

Definition at line 2586 of file parser.c.

References ISC_TF, and cfg_obj::type.

Referenced by cfg_acl_fromconfig2(), and count_acl_elements().

void cfg_obj_destroy ( cfg_parser_t pctx,
cfg_obj_t **  obj 
)

Delete a reference to a configuration object; destroy the object if there are no more references.

Require:

Definition at line 2594 of file parser.c.

References cfg_rep::free, isc_mem_put, isc_refcount_decrement, isc_refcount_destroy, cfg_parser::mctx, cfg_obj::references, cfg_type::rep, REQUIRE, and cfg_obj::type.

Referenced by cfg_parse_mapbody(), delete_zoneconf(), free_listelt(), get_rndckey(), load_configuration(), main(), map_symtabitem_destroy(), newzone_cfgctx_destroy(), newzone_parse(), ns_server_changezone(), parse_port(), parse_portrange(), read_confkey(), read_sessionkey(), and shutdown_server().

void cfg_obj_attach ( cfg_obj_t src,
cfg_obj_t **  dest 
)

Reference a configuration object.

Definition at line 2613 of file parser.c.

References isc_refcount_increment, cfg_obj::references, and REQUIRE.

Referenced by cfg_parser_mapadd(), do_addzone(), and setup_newzones().

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'.

Definition at line 2627 of file parser.c.

References cfg_type::doc.

Referenced by cfg_doc_bracketed_list(), cfg_doc_kv_tuple(), cfg_doc_map(), cfg_doc_mapbody(), cfg_doc_tuple(), cfg_print_grammar(), doc_keyvalue(), doc_matchname(), doc_optional_bracketed_list(), doc_optional_keyvalue(), and doc_updatepolicy().

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>.

Definition at line 2632 of file parser.c.

References cfg_print_cstr(), and cfg_type::name.

Referenced by doc_enum_or_other(), and doc_rpz_cname().

void cfg_print_grammar ( const cfg_type_t type,
void(*)(void *closure, const char *text, int textlen)  f,
void *  closure 
)

Print a summary of the grammar of the configuration type 'type'.

Definition at line 2639 of file parser.c.

References cfg_doc_obj(), cfg_printer::closure, cfg_printer::f, cfg_printer::flags, and cfg_printer::indent.

isc_result_t cfg_parser_mapadd ( cfg_parser_t pctx,
cfg_obj_t mapobj,
cfg_obj_t obj,
const char *  clause 
)

Add the object 'obj' to the specified clause in mapbody 'mapobj'. Used for adding new zones.

Require:

Definition at line 2652 of file parser.c.

References isc_symvalue::as_pointer, CFG_CLAUSEFLAG_MULTI, cfg_create_list(), cfg_obj_attach(), CHECK, cfg_map::clausesets, cleanup(), CLEANUP_OBJ, create_listelt(), cfg_clausedef::flags, free_listelt(), INSIST, ISC_LIST_APPEND, ISC_R_EXISTS, ISC_R_FAILURE, ISC_R_NOTFOUND, ISC_R_SUCCESS, isc_symexists_reject, isc_symtab_define(), isc_symtab_lookup(), cfg_obj::list, cfg_obj::map, map, cfg_clausedef::name, cfg_listelt::obj, cfg_type::rep, REQUIRE, cfg_map::symtab, cfg_obj::type, and cfg_obj::value.

Referenced by do_addzone(), and do_modzone().


Variable Documentation

cfg_rep_t cfg_rep_uint32 = { "uint32", free_noop }

Predefined data representation types.

Definition at line 115 of file parser.c.

cfg_rep_t cfg_rep_uint64 = { "uint64", free_noop }

Definition at line 116 of file parser.c.

cfg_rep_t cfg_rep_string = { "string", free_string }

Definition at line 117 of file parser.c.

cfg_rep_t cfg_rep_boolean = { "boolean", free_noop }

Definition at line 118 of file parser.c.

cfg_rep_t cfg_rep_map = { "map", free_map }

Definition at line 119 of file parser.c.

cfg_rep_t cfg_rep_list = { "list", free_list }

Definition at line 120 of file parser.c.

cfg_rep_t cfg_rep_tuple = { "tuple", free_tuple }

Definition at line 121 of file parser.c.

cfg_rep_t cfg_rep_sockaddr = { "sockaddr", free_noop }

Definition at line 122 of file parser.c.

cfg_rep_t cfg_rep_netprefix = { "netprefix", free_noop }

Definition at line 123 of file parser.c.

cfg_rep_t cfg_rep_void = { "void", free_noop }

Definition at line 124 of file parser.c.

Referenced by print_boolorauto().

cfg_type_t cfg_type_implicitlist [static]

Initial value:

 {
        "implicitlist", NULL, print_list, NULL, &cfg_rep_list, NULL }
An implicit list. These are formed by clauses that occur multiple times.

Definition at line 133 of file parser.c.

cfg_type_t cfg_type_filelist [static]

Initial value:

 {
        "filelist", NULL, print_list, NULL, &cfg_rep_list,
        &cfg_type_qstring
}

Definition at line 390 of file parser.c.

cfg_type_t cfg_type_void

Initial value:

Definition at line 627 of file parser.c.

Referenced by cfg_parse_void(), parse_optional_class(), parse_optional_facility(), and parse_optional_uint32().

cfg_type_t cfg_type_uint32

Initial value:

Definition at line 684 of file parser.c.

Referenced by cfg_parse_uint32(), parse_logseverity(), parse_logversions(), parse_optional_uint32(), and parse_ttlval().

cfg_type_t cfg_type_uint64

Initial value:

 {
        "64_bit_integer", NULL, cfg_print_uint64, cfg_doc_terminal,
        &cfg_rep_uint64, NULL
}

Definition at line 713 of file parser.c.

Referenced by parse_sizeval().

cfg_type_t cfg_type_qstring

Initial value:

Definition at line 903 of file parser.c.

Referenced by cfg_parse_astring(), cfg_parse_qstring(), and parser_openfile().

cfg_type_t cfg_type_ustring

Initial value:

Definition at line 909 of file parser.c.

Referenced by parse_optional_class(), parse_updatepolicy(), and parse_ustring().

cfg_type_t cfg_type_astring

Initial value:

Definition at line 915 of file parser.c.

Referenced by parse_masterselement(), parse_optional_facility(), and parse_server_key_kludge().

cfg_type_t cfg_type_sstring

Initial value:

Definition at line 924 of file parser.c.

Referenced by cfg_parse_sstring().

cfg_type_t cfg_type_boolean

Initial value:

Predefined configuration object types.

Definition at line 993 of file parser.c.

Referenced by cfg_parse_boolean(), parse_dialup_type(), parse_filter_aaaa(), parse_ixfrdiff_type(), parse_notify_type(), and parse_zonestat().

struct flagtext flagtexts[] [static]

Referenced by print_clause_flags().

cfg_type_t cfg_type_token

Initial value:

Definition at line 1741 of file parser.c.

Referenced by parse_token().

cfg_type_t cfg_type_unsupported

Initial value:

Definition at line 1790 of file parser.c.

Referenced by cfg_parse_mapbody().

unsigned int netaddr_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK [static]

Definition at line 1984 of file parser.c.

unsigned int netaddr4_flags = CFG_ADDR_V4OK [static]

Definition at line 1985 of file parser.c.

unsigned int netaddr4wild_flags = CFG_ADDR_V4OK | CFG_ADDR_WILDOK [static]

Definition at line 1986 of file parser.c.

unsigned int netaddr6_flags = CFG_ADDR_V6OK [static]

Definition at line 1987 of file parser.c.

unsigned int netaddr6wild_flags = CFG_ADDR_V6OK | CFG_ADDR_WILDOK [static]

Definition at line 1988 of file parser.c.

cfg_type_t cfg_type_netaddr

Initial value:

Definition at line 2034 of file parser.c.

Referenced by cfg_doc_map(), and cfg_parse_addressed_map().

cfg_type_t cfg_type_netaddr4

Initial value:

Definition at line 2039 of file parser.c.

cfg_type_t cfg_type_netaddr4wild

Initial value:

Definition at line 2044 of file parser.c.

cfg_type_t cfg_type_netaddr6

Initial value:

Definition at line 2049 of file parser.c.

cfg_type_t cfg_type_netaddr6wild

Initial value:

Definition at line 2054 of file parser.c.

cfg_type_t cfg_type_netprefix

Initial value:

Definition at line 2140 of file parser.c.

Referenced by cfg_doc_map(), cfg_parse_netprefix(), and cfg_parse_netprefix_map().

unsigned int sockaddr_flags = CFG_ADDR_V4OK | CFG_ADDR_V6OK [static]

Definition at line 2197 of file parser.c.

cfg_type_t cfg_type_sockaddr

Initial value:

Definition at line 2198 of file parser.c.

Referenced by parse_masterselement(), and parse_sockaddrnameport().

unsigned int sockaddrdscp_flags [static]

Initial value:

Definition at line 2203 of file parser.c.

cfg_type_t cfg_type_sockaddrdscp

Initial value:

Definition at line 2205 of file parser.c.


Generated on Tue Apr 28 17:41:19 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha