new cfg (kv) reader implemented

This commit is contained in:
2022-07-31 09:49:14 +02:00
parent 35813e2cae
commit a2e8e77468
5 changed files with 323 additions and 13 deletions

View File

@ -197,7 +197,7 @@ ssl_cert="../../ssl/certs/ac-xcisco.pem"
# dbg
# Set debug level
#
dbg = info # Show all kind of infos
# dbg = info # Show all kind of infos
# dbg += all
# dbg += msg_in # Incomming CAPWAP messages
# dbg += msg_out # Outgoing CAPWAP messages
@ -219,7 +219,7 @@ ssl_cert="../../ssl/certs/ac-xcisco.pem"
# dbg += dtls_bio # DTLS BIO operations
# dbg += dtls_bio_dmp # HeXy dump data in BIO operations
# dbg += warn # misc warnings
# dbg += mod # Debugs specific to mod
# dbg = mod # Debugs specific to mod
# dbg += cfg_dmp
# dbg += state
#
@ -239,7 +239,7 @@ ssl_cert="../../ssl/certs/ac-xcisco.pem"
#
#mods = { cisco, capwap }
mods = { cisco, capwap, capwap80211 }
mods = { cisco,capwap, capwap80211 }
#, capwap80211 }
mods_dir = ../../lib/Linux/x86_64/

View File

@ -46,6 +46,7 @@
#include "dataman.h"
#include "cw/cfg.h"
int ac_run();
@ -172,7 +173,21 @@ static void show_cfg (FILE *out, mavl_t ktv)
}
/*
{
cw_Cfg_t * cfg;
cfg=cw_cfg_create();
cw_cfg_load("tube.akv",cfg);
// cw_cfg_set(cfg,"cisco/tube","99");
// cw_cfg_set(cfg,"Hello","30");
cw_cfg_dump(cfg);
mavl_destroy(cfg);
}
*/
int main (int argc, char *argv[])
{
@ -181,7 +196,9 @@ int main (int argc, char *argv[])
FILE * file;
mavl_t types_tree, global_cfg;
const cw_Type_t **ti;
/* parse arguments */
parse_args (argc, argv, &bootcfg);
@ -194,6 +211,7 @@ int main (int argc, char *argv[])
exit(EXIT_FAILURE);
}
/* create types tree with default types */
types_tree = cw_ktv_create_types_tree();
for (ti=CW_KTV_STD_TYPES;*ti;ti++){
@ -229,7 +247,7 @@ int main (int argc, char *argv[])
cw_log (LOG_INFO, "Debug Options: %08X", cw_dbg_opt_level);
/* XXX Hard coded debug settigns, set it by config in the future */
cw_dbg_opt_display = DBG_DISP_ASC_DMP | DBG_DISP_COLORS;
// cw_dbg_opt_display = DBG_DISP_ASC_DMP | DBG_DISP_COLORS;
/* Warn, if the "secret" debugging feature for
developers is turned on ;) */