summaryrefslogtreecommitdiff
path: root/lib/command_match.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-07-29 15:54:03 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-07-29 15:54:03 +0000
commitde9d7e4f3ccb1b199602c1a1ce884df37e54f834 (patch)
tree7ecb990ffe55f28e5ce77a059c791f558e503130 /lib/command_match.h
parent76699ae7e0358c57a1186b88962d7233a7057d76 (diff)
lib: Cleanup some memory issues in CLI
Various memory leaks have been fixed and the quagga memory macros are in use. Also consolidated the argv and matching code into one graph traversal. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.h')
-rw-r--r--lib/command_match.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/command_match.h b/lib/command_match.h
index 24cd1287e6..a102ba9484 100644
--- a/lib/command_match.h
+++ b/lib/command_match.h
@@ -48,10 +48,13 @@ enum match_type
/**
* Attempt to find an exact command match for a line of user input.
*
+ * @param DFA to match against
+ * @param input string
+ * @param pointer to argv pointer
* @return cmd_element found, or NULL if there is no match.
*/
struct cmd_element *
-match_command (struct graph_node *, const char *, enum filter_type);
+match_command (struct graph_node *, const char *, struct list **);
/**
* Compiles next-hops for a given line of user input.
@@ -77,14 +80,4 @@ match_command (struct graph_node *, const char *, enum filter_type);
struct list *
match_command_complete (struct graph_node *, const char *, enum filter_type);
-/**
- * Builds an argument list given a cmd_element and a matching input line.
- *
- * @param[in] input line
- * @param[in] cmd_element struct
- * @return pointer to argument linked list
- */
-struct list *
-match_build_argv (const char *, struct cmd_element *);
-
#endif