Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isccfg
File: cfg.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef ISCCFG_CFG_H
[11] Fix | Delete
#define ISCCFG_CFG_H 1
[12] Fix | Delete
[13] Fix | Delete
/*****
[14] Fix | Delete
***** Module Info
[15] Fix | Delete
*****/
[16] Fix | Delete
[17] Fix | Delete
/*! \file isccfg/cfg.h
[18] Fix | Delete
* \brief
[19] Fix | Delete
* This is the new, table-driven, YACC-free configuration file parser.
[20] Fix | Delete
*/
[21] Fix | Delete
[22] Fix | Delete
/***
[23] Fix | Delete
*** Imports
[24] Fix | Delete
***/
[25] Fix | Delete
[26] Fix | Delete
#include <inttypes.h>
[27] Fix | Delete
#include <stdbool.h>
[28] Fix | Delete
[29] Fix | Delete
#include <isc/formatcheck.h>
[30] Fix | Delete
#include <isc/lang.h>
[31] Fix | Delete
#include <isc/types.h>
[32] Fix | Delete
#include <isc/list.h>
[33] Fix | Delete
[34] Fix | Delete
/***
[35] Fix | Delete
*** Types
[36] Fix | Delete
***/
[37] Fix | Delete
[38] Fix | Delete
/*%
[39] Fix | Delete
* A configuration parser.
[40] Fix | Delete
*/
[41] Fix | Delete
typedef struct cfg_parser cfg_parser_t;
[42] Fix | Delete
[43] Fix | Delete
/*%
[44] Fix | Delete
* A configuration type definition object. There is a single
[45] Fix | Delete
* static cfg_type_t object for each data type supported by
[46] Fix | Delete
* the configuration parser.
[47] Fix | Delete
*/
[48] Fix | Delete
typedef struct cfg_type cfg_type_t;
[49] Fix | Delete
[50] Fix | Delete
/*%
[51] Fix | Delete
* A configuration object. This is the basic building block of the
[52] Fix | Delete
* configuration parse tree. It contains a value (which may be
[53] Fix | Delete
* of one of several types) and information identifying the file
[54] Fix | Delete
* and line number the value came from, for printing error
[55] Fix | Delete
* messages.
[56] Fix | Delete
*/
[57] Fix | Delete
typedef struct cfg_obj cfg_obj_t;
[58] Fix | Delete
[59] Fix | Delete
/*%
[60] Fix | Delete
* A configuration object list element.
[61] Fix | Delete
*/
[62] Fix | Delete
typedef struct cfg_listelt cfg_listelt_t;
[63] Fix | Delete
[64] Fix | Delete
/*%
[65] Fix | Delete
* A callback function to be called when parsing an option
[66] Fix | Delete
* that needs to be interpreted at parsing time, like
[67] Fix | Delete
* "directory".
[68] Fix | Delete
*/
[69] Fix | Delete
typedef isc_result_t
[70] Fix | Delete
(*cfg_parsecallback_t)(const char *clausename, const cfg_obj_t *obj, void *arg);
[71] Fix | Delete
[72] Fix | Delete
/***
[73] Fix | Delete
*** Functions
[74] Fix | Delete
***/
[75] Fix | Delete
[76] Fix | Delete
ISC_LANG_BEGINDECLS
[77] Fix | Delete
[78] Fix | Delete
void
[79] Fix | Delete
cfg_parser_attach(cfg_parser_t *src, cfg_parser_t **dest);
[80] Fix | Delete
/*%<
[81] Fix | Delete
* Reference a parser object.
[82] Fix | Delete
*/
[83] Fix | Delete
[84] Fix | Delete
isc_result_t
[85] Fix | Delete
cfg_parser_create(isc_mem_t *mctx, isc_log_t *lctx, cfg_parser_t **ret);
[86] Fix | Delete
/*%<
[87] Fix | Delete
* Create a configuration file parser. Any warning and error
[88] Fix | Delete
* messages will be logged to 'lctx'.
[89] Fix | Delete
*
[90] Fix | Delete
* The parser object returned can be used for a single call
[91] Fix | Delete
* to cfg_parse_file() or cfg_parse_buffer(). It must not
[92] Fix | Delete
* be reused for parsing multiple files or buffers.
[93] Fix | Delete
*/
[94] Fix | Delete
[95] Fix | Delete
void
[96] Fix | Delete
cfg_parser_setcallback(cfg_parser_t *pctx,
[97] Fix | Delete
cfg_parsecallback_t callback,
[98] Fix | Delete
void *arg);
[99] Fix | Delete
/*%<
[100] Fix | Delete
* Make the parser call 'callback' whenever it encounters
[101] Fix | Delete
* a configuration clause with the callback attribute,
[102] Fix | Delete
* passing it the clause name, the clause value,
[103] Fix | Delete
* and 'arg' as arguments.
[104] Fix | Delete
*
[105] Fix | Delete
* To restore the default of not invoking callbacks, pass
[106] Fix | Delete
* callback==NULL and arg==NULL.
[107] Fix | Delete
*/
[108] Fix | Delete
[109] Fix | Delete
isc_result_t
[110] Fix | Delete
cfg_parse_file(cfg_parser_t *pctx, const char *file,
[111] Fix | Delete
const cfg_type_t *type, cfg_obj_t **ret);
[112] Fix | Delete
[113] Fix | Delete
isc_result_t
[114] Fix | Delete
cfg_parse_buffer(cfg_parser_t *pctx, isc_buffer_t *buffer,
[115] Fix | Delete
const cfg_type_t *type, cfg_obj_t **ret);
[116] Fix | Delete
isc_result_t
[117] Fix | Delete
cfg_parse_buffer2(cfg_parser_t *pctx, isc_buffer_t *buffer,
[118] Fix | Delete
const char *file, const cfg_type_t *type,
[119] Fix | Delete
cfg_obj_t **ret);
[120] Fix | Delete
isc_result_t
[121] Fix | Delete
cfg_parse_buffer3(cfg_parser_t *pctx, isc_buffer_t *buffer,
[122] Fix | Delete
const char *file, unsigned int line,
[123] Fix | Delete
const cfg_type_t *type, cfg_obj_t **ret);
[124] Fix | Delete
isc_result_t
[125] Fix | Delete
cfg_parse_buffer4(cfg_parser_t *pctx, isc_buffer_t *buffer,
[126] Fix | Delete
const char *file, unsigned int line,
[127] Fix | Delete
const cfg_type_t *type, unsigned int flags,
[128] Fix | Delete
cfg_obj_t **ret);
[129] Fix | Delete
/*%<
[130] Fix | Delete
* Read a configuration containing data of type 'type'
[131] Fix | Delete
* and make '*ret' point to its parse tree.
[132] Fix | Delete
*
[133] Fix | Delete
* The configuration is read from the file 'filename'
[134] Fix | Delete
* (isc_parse_file()) or the buffer 'buffer'
[135] Fix | Delete
* (isc_parse_buffer()).
[136] Fix | Delete
*
[137] Fix | Delete
* If 'file' is not NULL, it is the name of the file, or a name to use
[138] Fix | Delete
* for the buffer in place of the filename, when logging errors.
[139] Fix | Delete
*
[140] Fix | Delete
* If 'line' is not 0, then it is the beginning line number to report
[141] Fix | Delete
* when logging errors. This is useful when passing text that has been
[142] Fix | Delete
* read from the middle of a file.
[143] Fix | Delete
*
[144] Fix | Delete
* Returns an error if the file or buffer does not parse correctly.
[145] Fix | Delete
*
[146] Fix | Delete
* Requires:
[147] Fix | Delete
*\li "filename" is valid.
[148] Fix | Delete
*\li "mem" is valid.
[149] Fix | Delete
*\li "type" is valid.
[150] Fix | Delete
*\li "cfg" is non-NULL and "*cfg" is NULL.
[151] Fix | Delete
*\li "flags" be one or more of CFG_PCTX_NODEPRECATED or zero.
[152] Fix | Delete
*
[153] Fix | Delete
* Returns:
[154] Fix | Delete
* \li #ISC_R_SUCCESS - success
[155] Fix | Delete
*\li #ISC_R_NOMEMORY - no memory available
[156] Fix | Delete
*\li #ISC_R_INVALIDFILE - file doesn't exist or is unreadable
[157] Fix | Delete
*\li others - file contains errors
[158] Fix | Delete
*/
[159] Fix | Delete
[160] Fix | Delete
isc_result_t
[161] Fix | Delete
cfg_parser_mapadd(cfg_parser_t *pctx, cfg_obj_t *mapobj,
[162] Fix | Delete
cfg_obj_t *obj, const char *clause);
[163] Fix | Delete
/*%<
[164] Fix | Delete
* Add the object 'obj' to the specified clause in mapbody 'mapobj'.
[165] Fix | Delete
* Used for adding new zones.
[166] Fix | Delete
*
[167] Fix | Delete
* Require:
[168] Fix | Delete
* \li 'obj' is a valid cfg_obj_t.
[169] Fix | Delete
* \li 'mapobj' is a valid cfg_obj_t of type map.
[170] Fix | Delete
* \li 'pctx' is a valid cfg_parser_t.
[171] Fix | Delete
*/
[172] Fix | Delete
[173] Fix | Delete
void
[174] Fix | Delete
cfg_parser_reset(cfg_parser_t *pctx);
[175] Fix | Delete
/*%<
[176] Fix | Delete
* Reset an existing parser so it can be re-used for a new file or
[177] Fix | Delete
* buffer.
[178] Fix | Delete
*/
[179] Fix | Delete
[180] Fix | Delete
void
[181] Fix | Delete
cfg_parser_destroy(cfg_parser_t **pctxp);
[182] Fix | Delete
/*%<
[183] Fix | Delete
* Remove a reference to a configuration parser; destroy it if there are no
[184] Fix | Delete
* more references.
[185] Fix | Delete
*/
[186] Fix | Delete
[187] Fix | Delete
bool
[188] Fix | Delete
cfg_obj_isvoid(const cfg_obj_t *obj);
[189] Fix | Delete
/*%<
[190] Fix | Delete
* Return true iff 'obj' is of void type (e.g., an optional
[191] Fix | Delete
* value not specified).
[192] Fix | Delete
*/
[193] Fix | Delete
[194] Fix | Delete
bool
[195] Fix | Delete
cfg_obj_ismap(const cfg_obj_t *obj);
[196] Fix | Delete
/*%<
[197] Fix | Delete
* Return true iff 'obj' is of a map type.
[198] Fix | Delete
*/
[199] Fix | Delete
[200] Fix | Delete
bool
[201] Fix | Delete
cfg_obj_isfixedpoint(const cfg_obj_t *obj);
[202] Fix | Delete
/*%<
[203] Fix | Delete
* Return true iff 'obj' is of a fixedpoint type.
[204] Fix | Delete
*/
[205] Fix | Delete
[206] Fix | Delete
bool
[207] Fix | Delete
cfg_obj_ispercentage(const cfg_obj_t *obj);
[208] Fix | Delete
/*%<
[209] Fix | Delete
* Return true iff 'obj' is of a percentage type.
[210] Fix | Delete
*/
[211] Fix | Delete
[212] Fix | Delete
isc_result_t
[213] Fix | Delete
cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj);
[214] Fix | Delete
/*%<
[215] Fix | Delete
* Extract an element from a configuration object, which
[216] Fix | Delete
* must be of a map type.
[217] Fix | Delete
*
[218] Fix | Delete
* Requires:
[219] Fix | Delete
* \li 'mapobj' points to a valid configuration object of a map type.
[220] Fix | Delete
* \li 'name' points to a null-terminated string.
[221] Fix | Delete
* \li 'obj' is non-NULL and '*obj' is NULL.
[222] Fix | Delete
*
[223] Fix | Delete
* Returns:
[224] Fix | Delete
* \li #ISC_R_SUCCESS - success
[225] Fix | Delete
* \li #ISC_R_NOTFOUND - name not found in map
[226] Fix | Delete
*/
[227] Fix | Delete
[228] Fix | Delete
const cfg_obj_t *
[229] Fix | Delete
cfg_map_getname(const cfg_obj_t *mapobj);
[230] Fix | Delete
/*%<
[231] Fix | Delete
* Get the name of a named map object, like a server "key" clause.
[232] Fix | Delete
*
[233] Fix | Delete
* Requires:
[234] Fix | Delete
* \li 'mapobj' points to a valid configuration object of a map type.
[235] Fix | Delete
*
[236] Fix | Delete
* Returns:
[237] Fix | Delete
* \li A pointer to a configuration object naming the map object,
[238] Fix | Delete
* or NULL if the map object does not have a name.
[239] Fix | Delete
*/
[240] Fix | Delete
[241] Fix | Delete
unsigned int
[242] Fix | Delete
cfg_map_count(const cfg_obj_t *mapobj);
[243] Fix | Delete
/*%<
[244] Fix | Delete
* Get the number of elements defined in the symbol table of a map object.
[245] Fix | Delete
*
[246] Fix | Delete
* Requires:
[247] Fix | Delete
* \li 'mapobj' points to a valid configuration object of a map type.
[248] Fix | Delete
*
[249] Fix | Delete
* Returns:
[250] Fix | Delete
* \li The number of elements in the map object.
[251] Fix | Delete
*/
[252] Fix | Delete
[253] Fix | Delete
bool
[254] Fix | Delete
cfg_obj_istuple(const cfg_obj_t *obj);
[255] Fix | Delete
/*%<
[256] Fix | Delete
* Return true iff 'obj' is of a map type.
[257] Fix | Delete
*/
[258] Fix | Delete
[259] Fix | Delete
const cfg_obj_t *
[260] Fix | Delete
cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name);
[261] Fix | Delete
/*%<
[262] Fix | Delete
* Extract an element from a configuration object, which
[263] Fix | Delete
* must be of a tuple type.
[264] Fix | Delete
*
[265] Fix | Delete
* Requires:
[266] Fix | Delete
* \li 'tupleobj' points to a valid configuration object of a tuple type.
[267] Fix | Delete
* \li 'name' points to a null-terminated string naming one of the
[268] Fix | Delete
*\li fields of said tuple type.
[269] Fix | Delete
*/
[270] Fix | Delete
[271] Fix | Delete
bool
[272] Fix | Delete
cfg_obj_isuint32(const cfg_obj_t *obj);
[273] Fix | Delete
/*%<
[274] Fix | Delete
* Return true iff 'obj' is of integer type.
[275] Fix | Delete
*/
[276] Fix | Delete
[277] Fix | Delete
uint32_t
[278] Fix | Delete
cfg_obj_asuint32(const cfg_obj_t *obj);
[279] Fix | Delete
/*%<
[280] Fix | Delete
* Returns the value of a configuration object of 32-bit integer type.
[281] Fix | Delete
*
[282] Fix | Delete
* Requires:
[283] Fix | Delete
* \li 'obj' points to a valid configuration object of 32-bit integer type.
[284] Fix | Delete
*
[285] Fix | Delete
* Returns:
[286] Fix | Delete
* \li A 32-bit unsigned integer.
[287] Fix | Delete
*/
[288] Fix | Delete
[289] Fix | Delete
bool
[290] Fix | Delete
cfg_obj_isuint64(const cfg_obj_t *obj);
[291] Fix | Delete
/*%<
[292] Fix | Delete
* Return true iff 'obj' is of integer type.
[293] Fix | Delete
*/
[294] Fix | Delete
[295] Fix | Delete
uint64_t
[296] Fix | Delete
cfg_obj_asuint64(const cfg_obj_t *obj);
[297] Fix | Delete
/*%<
[298] Fix | Delete
* Returns the value of a configuration object of 64-bit integer type.
[299] Fix | Delete
*
[300] Fix | Delete
* Requires:
[301] Fix | Delete
* \li 'obj' points to a valid configuration object of 64-bit integer type.
[302] Fix | Delete
*
[303] Fix | Delete
* Returns:
[304] Fix | Delete
* \li A 64-bit unsigned integer.
[305] Fix | Delete
*/
[306] Fix | Delete
[307] Fix | Delete
uint32_t
[308] Fix | Delete
cfg_obj_asfixedpoint(const cfg_obj_t *obj);
[309] Fix | Delete
/*%<
[310] Fix | Delete
* Returns the value of a configuration object of fixed point number.
[311] Fix | Delete
*
[312] Fix | Delete
* Requires:
[313] Fix | Delete
* \li 'obj' points to a valid configuration object of fixed point type.
[314] Fix | Delete
*
[315] Fix | Delete
* Returns:
[316] Fix | Delete
* \li A 32-bit unsigned integer.
[317] Fix | Delete
*/
[318] Fix | Delete
[319] Fix | Delete
uint32_t
[320] Fix | Delete
cfg_obj_aspercentage(const cfg_obj_t *obj);
[321] Fix | Delete
/*%<
[322] Fix | Delete
* Returns the value of a configuration object of percentage
[323] Fix | Delete
*
[324] Fix | Delete
* Requires:
[325] Fix | Delete
* \li 'obj' points to a valid configuration object of percentage type.
[326] Fix | Delete
*
[327] Fix | Delete
* Returns:
[328] Fix | Delete
* \li A 32-bit unsigned integer.
[329] Fix | Delete
*/
[330] Fix | Delete
[331] Fix | Delete
bool
[332] Fix | Delete
cfg_obj_isstring(const cfg_obj_t *obj);
[333] Fix | Delete
/*%<
[334] Fix | Delete
* Return true iff 'obj' is of string type.
[335] Fix | Delete
*/
[336] Fix | Delete
[337] Fix | Delete
const char *
[338] Fix | Delete
cfg_obj_asstring(const cfg_obj_t *obj);
[339] Fix | Delete
/*%<
[340] Fix | Delete
* Returns the value of a configuration object of a string type
[341] Fix | Delete
* as a null-terminated string.
[342] Fix | Delete
*
[343] Fix | Delete
* Requires:
[344] Fix | Delete
* \li 'obj' points to a valid configuration object of a string type.
[345] Fix | Delete
*
[346] Fix | Delete
* Returns:
[347] Fix | Delete
* \li A pointer to a null terminated string.
[348] Fix | Delete
*/
[349] Fix | Delete
[350] Fix | Delete
bool
[351] Fix | Delete
cfg_obj_isboolean(const cfg_obj_t *obj);
[352] Fix | Delete
/*%<
[353] Fix | Delete
* Return true iff 'obj' is of a boolean type.
[354] Fix | Delete
*/
[355] Fix | Delete
[356] Fix | Delete
bool
[357] Fix | Delete
cfg_obj_asboolean(const cfg_obj_t *obj);
[358] Fix | Delete
/*%<
[359] Fix | Delete
* Returns the value of a configuration object of a boolean type.
[360] Fix | Delete
*
[361] Fix | Delete
* Requires:
[362] Fix | Delete
* \li 'obj' points to a valid configuration object of a boolean type.
[363] Fix | Delete
*
[364] Fix | Delete
* Returns:
[365] Fix | Delete
* \li A boolean value.
[366] Fix | Delete
*/
[367] Fix | Delete
[368] Fix | Delete
bool
[369] Fix | Delete
cfg_obj_issockaddr(const cfg_obj_t *obj);
[370] Fix | Delete
/*%<
[371] Fix | Delete
* Return true iff 'obj' is a socket address.
[372] Fix | Delete
*/
[373] Fix | Delete
[374] Fix | Delete
const isc_sockaddr_t *
[375] Fix | Delete
cfg_obj_assockaddr(const cfg_obj_t *obj);
[376] Fix | Delete
/*%<
[377] Fix | Delete
* Returns the value of a configuration object representing a socket address.
[378] Fix | Delete
*
[379] Fix | Delete
* Requires:
[380] Fix | Delete
* \li 'obj' points to a valid configuration object of a socket address type.
[381] Fix | Delete
*
[382] Fix | Delete
* Returns:
[383] Fix | Delete
* \li A pointer to a sockaddr. The sockaddr must be copied by the caller
[384] Fix | Delete
* if necessary.
[385] Fix | Delete
*/
[386] Fix | Delete
[387] Fix | Delete
isc_dscp_t
[388] Fix | Delete
cfg_obj_getdscp(const cfg_obj_t *obj);
[389] Fix | Delete
/*%<
[390] Fix | Delete
* Returns the DSCP value of a configuration object representing a
[391] Fix | Delete
* socket address.
[392] Fix | Delete
*
[393] Fix | Delete
* Requires:
[394] Fix | Delete
* \li 'obj' points to a valid configuration object of a
[395] Fix | Delete
* socket address type.
[396] Fix | Delete
*
[397] Fix | Delete
* Returns:
[398] Fix | Delete
* \li DSCP value associated with a sockaddr, or -1.
[399] Fix | Delete
*/
[400] Fix | Delete
[401] Fix | Delete
bool
[402] Fix | Delete
cfg_obj_isnetprefix(const cfg_obj_t *obj);
[403] Fix | Delete
/*%<
[404] Fix | Delete
* Return true iff 'obj' is a network prefix.
[405] Fix | Delete
*/
[406] Fix | Delete
[407] Fix | Delete
void
[408] Fix | Delete
cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
[409] Fix | Delete
unsigned int *prefixlen);
[410] Fix | Delete
/*%<
[411] Fix | Delete
* Gets the value of a configuration object representing a network
[412] Fix | Delete
* prefix. The network address is returned through 'netaddr' and the
[413] Fix | Delete
* prefix length in bits through 'prefixlen'.
[414] Fix | Delete
*
[415] Fix | Delete
* Requires:
[416] Fix | Delete
* \li 'obj' points to a valid configuration object of network prefix type.
[417] Fix | Delete
*\li 'netaddr' and 'prefixlen' are non-NULL.
[418] Fix | Delete
*/
[419] Fix | Delete
[420] Fix | Delete
bool
[421] Fix | Delete
cfg_obj_islist(const cfg_obj_t *obj);
[422] Fix | Delete
/*%<
[423] Fix | Delete
* Return true iff 'obj' is of list type.
[424] Fix | Delete
*/
[425] Fix | Delete
[426] Fix | Delete
const cfg_listelt_t *
[427] Fix | Delete
cfg_list_first(const cfg_obj_t *obj);
[428] Fix | Delete
/*%<
[429] Fix | Delete
* Returns the first list element in a configuration object of a list type.
[430] Fix | Delete
*
[431] Fix | Delete
* Requires:
[432] Fix | Delete
* \li 'obj' points to a valid configuration object of a list type or NULL.
[433] Fix | Delete
*
[434] Fix | Delete
* Returns:
[435] Fix | Delete
* \li A pointer to a cfg_listelt_t representing the first list element,
[436] Fix | Delete
* or NULL if the list is empty or nonexistent.
[437] Fix | Delete
*/
[438] Fix | Delete
[439] Fix | Delete
const cfg_listelt_t *
[440] Fix | Delete
cfg_list_next(const cfg_listelt_t *elt);
[441] Fix | Delete
/*%<
[442] Fix | Delete
* Returns the next element of a list of configuration objects.
[443] Fix | Delete
*
[444] Fix | Delete
* Requires:
[445] Fix | Delete
* \li 'elt' points to cfg_listelt_t obtained from cfg_list_first() or
[446] Fix | Delete
* a previous call to cfg_list_next().
[447] Fix | Delete
*
[448] Fix | Delete
* Returns:
[449] Fix | Delete
* \li A pointer to a cfg_listelt_t representing the next element,
[450] Fix | Delete
* or NULL if there are no more elements.
[451] Fix | Delete
*/
[452] Fix | Delete
[453] Fix | Delete
unsigned int
[454] Fix | Delete
cfg_list_length(const cfg_obj_t *obj, bool recurse);
[455] Fix | Delete
/*%<
[456] Fix | Delete
* Returns the length of a list of configure objects. If obj is
[457] Fix | Delete
* not a list, returns 0. If recurse is true, add in the length of
[458] Fix | Delete
* all contained lists.
[459] Fix | Delete
*/
[460] Fix | Delete
[461] Fix | Delete
cfg_obj_t *
[462] Fix | Delete
cfg_listelt_value(const cfg_listelt_t *elt);
[463] Fix | Delete
/*%<
[464] Fix | Delete
* Returns the configuration object associated with cfg_listelt_t.
[465] Fix | Delete
*
[466] Fix | Delete
* Requires:
[467] Fix | Delete
* \li 'elt' points to cfg_listelt_t obtained from cfg_list_first() or
[468] Fix | Delete
* cfg_list_next().
[469] Fix | Delete
*
[470] Fix | Delete
* Returns:
[471] Fix | Delete
* \li A non-NULL pointer to a configuration object.
[472] Fix | Delete
*/
[473] Fix | Delete
[474] Fix | Delete
void
[475] Fix | Delete
cfg_print(const cfg_obj_t *obj,
[476] Fix | Delete
void (*f)(void *closure, const char *text, int textlen),
[477] Fix | Delete
void *closure);
[478] Fix | Delete
void
[479] Fix | Delete
cfg_printx(const cfg_obj_t *obj, unsigned int flags,
[480] Fix | Delete
void (*f)(void *closure, const char *text, int textlen),
[481] Fix | Delete
void *closure);
[482] Fix | Delete
[483] Fix | Delete
#define CFG_PRINTER_XKEY 0x1 /* '?' out shared keys. */
[484] Fix | Delete
#define CFG_PRINTER_ONELINE 0x2 /* print config as a single line */
[485] Fix | Delete
[486] Fix | Delete
/*%<
[487] Fix | Delete
* Print the configuration object 'obj' by repeatedly calling the
[488] Fix | Delete
* function 'f', passing 'closure' and a region of text starting
[489] Fix | Delete
* at 'text' and comprising 'textlen' characters.
[490] Fix | Delete
*
[491] Fix | Delete
* If CFG_PRINTER_XKEY the contents of shared keys will be obscured
[492] Fix | Delete
* by replacing them with question marks ('?')
[493] Fix | Delete
*/
[494] Fix | Delete
[495] Fix | Delete
void
[496] Fix | Delete
cfg_print_grammar(const cfg_type_t *type,
[497] Fix | Delete
void (*f)(void *closure, const char *text, int textlen),
[498] Fix | Delete
void *closure);
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function