Renamed KTV to Val.

This commit is contained in:
2022-07-31 17:15:32 +02:00
parent 996446d115
commit a05bbf5fd6
86 changed files with 365 additions and 347 deletions

View File

@ -123,7 +123,7 @@ extern struct cw_Mod * cw_get_mod_ac (const char *name);
extern void test_sets();
#include "cw/file.h"
#include "cw/ktv.h"
#include "cw/val.h"
#include "discovery_cache.h"
@ -154,7 +154,7 @@ void tester1()
static void show_cfg (FILE *out, mavl_t ktv)
{
char value[500];
struct cw_KTV * data;
struct cw_Val * data;
mavliter_t it;
const struct cw_Type * type;
@ -173,21 +173,7 @@ 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[])
{
@ -197,7 +183,32 @@ int main (int argc, char *argv[])
mavl_t types_tree, global_cfg;
const cw_Type_t **ti;
/*
{
cw_Cfg_t * cfg;
cfg=cw_cfg_create();
char *val;
cw_cfg_load("tube.akv",cfg);
// cw_cfg_set(cfg,"cisco/tube","99");
// cw_cfg_set(cfg,"Hello","30");
cw_cfg_dump(cfg);
val = cw_cfg_get(cfg,"birth");
if (val){
printf("Birts: %s\n",val);
}
mavl_destroy(cfg);
}
cw_Val_t x;
CW_TYPE_STR->from_str(&x,"hallo");
x.type->del(&x);
return 0;
*/
/* parse arguments */

View File

@ -130,7 +130,7 @@ wlan0_cmd(struct shelldata * sd, const char *cmd)
void set_cmd(struct shelldata *sd, const char *str)
{
struct conn * conn;
struct cw_KTV_Reader r;
struct cw_Val_Reader r;
char key[CW_KTV_MAX_KEY_LEN];
char type[CW_KTV_MAX_KEY_LEN];
char val[2048];
@ -155,7 +155,7 @@ void del_cmd(struct shelldata *sd, const char *str)
void show_cfg (FILE *out, mavl_t ktv)
{
char value[500];
struct cw_KTV * data;
struct cw_Val * data;
mavliter_t it;
const struct cw_Type * type;
@ -186,7 +186,7 @@ void show_aps (FILE *out)
mavliter_init (&it, cl->by_addr);
fprintf (out, "IP\t\t\twtp-name\n");
mavliter_foreach (&it) {
cw_KTV_t * result;
cw_Val_t * result;
char addr[SOCK_ADDR_BUFSIZE];
char wtp_name[CAPWAP_MAX_WTP_NAME_LEN];
struct conn * conn;
@ -222,7 +222,7 @@ struct conn * find_ap(const char *name)
mavliter_init (&it, cl->by_addr);
mavliter_foreach (&it) {
cw_KTV_t * result;
cw_Val_t * result;
char wtp_name[CAPWAP_MAX_WTP_NAME_LEN];
struct conn * conn;
conn = mavliter_get_ptr (&it);
@ -263,7 +263,7 @@ void con (FILE *out)
mavliter_init (&it, cl->by_addr);
fprintf (out, "IP\t\t\twtp-name\n");
mavliter_foreach (&it) {
cw_KTV_t * result;
cw_Val_t * result;
char addr[SOCK_ADDR_BUFSIZE];
char wtp_name[CAPWAP_MAX_WTP_NAME_LEN];
struct conn * conn;
@ -318,7 +318,7 @@ void execute_cmd (struct shelldata * sd, const char *str)
char cmd[1024];
char args[1024];
int n;
struct cw_KTV_Reader reader;
struct cw_Val_Reader reader;
struct command * searchcmd;
args[0]=0;

View File

@ -41,7 +41,7 @@
#include "socklist.h"
#include "wtpman.h"
#include "wtplist.h"
#include "cw/ktv.h"
#include "cw/val.h"
#include "actube.h"