summaryrefslogtreecommitdiff
path: root/lib/command_match.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-09-07 04:05:07 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-09-07 04:05:07 +0000
commit1eb5e8dcd17d84959a46a2d837ae719fc8eb3516 (patch)
treefb78e60a3278d4727ecf74874698cb21275ee0e9 /lib/command_match.h
parent7a6ded40965d341456cdd5882c61ca4e22913c2b (diff)
lib: Continue matching system refactor
Most things back to working, all CLI units refactored to use improved graph implementation. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.h')
-rw-r--r--lib/command_match.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/command_match.h b/lib/command_match.h
index 765b189496..2bb0790337 100644
--- a/lib/command_match.h
+++ b/lib/command_match.h
@@ -25,10 +25,9 @@
#ifndef _ZEBRA_COMMAND_MATCH_H
#define _ZEBRA_COMMAND_MATCH_H
-#include "command.h"
-#include "command_graph.h"
+#include "graph.h"
#include "linklist.h"
-
+#include "command.h"
/* These definitions exist in command.c in the current engine but should be
* relocated here in the new engine
@@ -68,14 +67,14 @@ enum match_type
/**
* Attempt to find an exact command match for a line of user input.
*
- * @param[in] start start node of command graph to match against
+ * @param[in] cmdgraph command graph to match against
* @param[in] vline vectorized input string
* @param[out] argv pointer to argument list if successful match
* @param[out] element pointer to matched cmd_element if successful match
* @return matcher status
*/
enum matcher_rv
-command_match (struct graph_node *start,
+command_match (struct graph *cmdgraph,
vector vline,
struct list **argv,
struct cmd_element **element);
@@ -85,11 +84,11 @@ command_match (struct graph_node *start,
*
* @param[in] start the start node of the DFA to match against
* @param[in] vline vectorized input string
- * @param[in] completions pointer to list of possible next nodes
- * @return matcher status
+ * @param[in] completions pointer to list of cmd_token representing
+ * acceptable next inputs
*/
enum matcher_rv
-command_complete (struct graph_node *start,
+command_complete (struct graph *cmdgraph,
vector vline,
struct list **completions);
@@ -101,10 +100,10 @@ command_complete (struct graph_node *start,
* @param[in] vline vectorized input string
* @param[in] completions vector to fill with string completions
* @return matcher status
- */
enum matcher_rv
-command_complete_str (struct graph_node *start,
+command_complete_str (struct graph *cmdgraph,
vector vline,
vector completions);
+ */
#endif /* _ZEBRA_COMMAND_MATCH_H */