app/test: isolate lpm performance cases
[dpdk.git] / lib / librte_cmdline / cmdline_parse.h
index dae53ba..4ac05d6 100644 (file)
@@ -113,12 +113,14 @@ typedef struct cmdline_token_hdr cmdline_parse_token_hdr_t;
  * -1 on error and 0 on success.
  */
 struct cmdline_token_ops {
-       /** parse(token ptr, buf, res pts) */
-       int (*parse)(cmdline_parse_token_hdr_t *, const char *, void *);
+       /** parse(token ptr, buf, res pts, buf len) */
+       int (*parse)(cmdline_parse_token_hdr_t *, const char *, void *,
+               unsigned int);
        /** return the num of possible choices for this token */
        int (*complete_get_nb)(cmdline_parse_token_hdr_t *);
        /** return the elt x for this token (token, idx, dstbuf, size) */
-       int (*complete_get_elt)(cmdline_parse_token_hdr_t *, int, char *, unsigned int);
+       int (*complete_get_elt)(cmdline_parse_token_hdr_t *, int, char *,
+               unsigned int);
        /** get help for this token (token, dstbuf, size) */
        int (*get_help)(cmdline_parse_token_hdr_t *, char *, unsigned int);
 };
@@ -182,6 +184,9 @@ int cmdline_complete(struct cmdline *cl, const char *buf, int *state,
  * isendofline(c)) */
 int cmdline_isendoftoken(char c);
 
+/* return true if(!c || iscomment(c) || isendofline(c)) */
+int cmdline_isendofcommand(char c);
+
 #ifdef __cplusplus
 }
 #endif