diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-04-15 13:58:20 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-04-15 13:58:20 -0700 |
commit | 74b730a5a95abadba47bd05e816ed8c93abe9ca2 (patch) | |
tree | 4e7b3d790121d2637d807080988cc9cd080f7d2f /src/cnode/cnode-algorithm.hpp | |
parent | 53f4203e924f9f98347f962408fec532e0a1849f (diff) | |
download | vyatta-cfg-74b730a5a95abadba47bd05e816ed8c93abe9ca2.tar.gz vyatta-cfg-74b730a5a95abadba47bd05e816ed8c93abe9ca2.zip |
initial implementation of "config file" shell API
* this API allows shell scripts to "query" the "config" represented by a config file in a way similar to how they query the active/working config.
Diffstat (limited to 'src/cnode/cnode-algorithm.hpp')
-rw-r--r-- | src/cnode/cnode-algorithm.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cnode/cnode-algorithm.hpp b/src/cnode/cnode-algorithm.hpp index 3985b9f..547b55c 100644 --- a/src/cnode/cnode-algorithm.hpp +++ b/src/cnode/cnode-algorithm.hpp @@ -44,6 +44,12 @@ void showConfig(const string& cfg1, const string& cfg2, bool hide_secret = false, bool context_diff = false, bool show_cmds = false, bool ignore_edit = false); +CfgNode *findCfgNode(CfgNode *root, const Cpath& path, bool& is_value); +CfgNode *findCfgNode(CfgNode *root, const Cpath& path); +bool getCfgNodeValue(CfgNode *root, const Cpath& path, string& value); +bool getCfgNodeValues(CfgNode *root, const Cpath& path, + vector<string>& values); + } // namespace cnode #endif /* _CNODE_ALGORITHM_HPP_ */ |