From e9a79a249cec69fc178098d2f75db9389068510a Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 25 Sep 2007 15:55:26 -0700 Subject: initial import (from eureka /cli) plus new build system. --- src/cli_val_engine.h | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/cli_val_engine.h (limited to 'src/cli_val_engine.h') diff --git a/src/cli_val_engine.h b/src/cli_val_engine.h new file mode 100644 index 0000000..0f32276 --- /dev/null +++ b/src/cli_val_engine.h @@ -0,0 +1,86 @@ + +/************************************************************************ + + Module: cli + + **** License **** + Version: VPL 1.0 + + The contents of this file are subject to the Vyatta Public License + Version 1.0 ("License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.vyatta.com/vpl + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + This code was originally developed by Vyatta, Inc. + Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. + All Rights Reserved. + + Author: Oleg Moskalenko + Date: 2007 + Description: "new" cli handler for the reference variables + + **** End License **** + +*************************************************************************/ + +#if !defined(__CLI_VAL_ENGINE__) +#define __CLI_VAL_ENGINE__ + +#include "cli_path_utils.h" +#include "cli_val.h" + +/******************* + * Type definitions + * + *******************/ + +typedef enum { + + CLIND_CMD_UNKNOWN=0, /* ??? */ + CLIND_CMD_PARENT, /* .. */ + CLIND_CMD_SELF_NAME, /* . */ + CLIND_CMD_CHILD, /* */ + CLIND_CMD_NEIGHBOR, /* ../ */ + CLIND_CMD_VALUE, /* @ */ + CLIND_CMD_PARENT_VALUE, /* ../@ */ + CLIND_CMD_MULTI_VALUE /* @@ */ + +} clind_cmd_type; + +typedef struct { + + clind_cmd_type type; + char value[1025]; + +} clind_cmd; + +typedef struct { + + vtw_type_e val_type; + char* value; + +} clind_val; + +/******************************** + * Main command-handling method: + * + ********************************/ + +int clind_config_engine_apply_command_path(clind_path_ref cfg_path, + clind_path_ref tmpl_path, + clind_path_ref cmd_path, + int check_existence, + clind_val *res, + const char* root_cfg_path, + const char* root_tmpl_path, + int return_value_file_name); + + + + +#endif /* __CLI_VAL_ENGINE__*/ -- cgit v1.2.3