xref: /dpdk/app/graph/cli.h (revision 5b21ffb2330813c68b77056ea13f0458fb5085f0)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2023 Marvell.
3  */
4 
5 #ifndef APP_GRAPH_CLI_H
6 #define APP_GRAPH_CLI_H
7 
8 /* Macros */
9 #define MSG_OUT_OF_MEMORY   "Not enough memory.\n"
10 #define MSG_CMD_UNKNOWN     "Unknown command \"%s\".\n"
11 #define MSG_CMD_UNIMPLEM    "Command \"%s\" not implemented.\n"
12 #define MSG_ARG_NOT_ENOUGH  "Not enough arguments for command \"%s\".\n"
13 #define MSG_ARG_TOO_MANY    "Too many arguments for command \"%s\".\n"
14 #define MSG_ARG_MISMATCH    "Wrong number of arguments for command \"%s\".\n"
15 #define MSG_ARG_NOT_FOUND   "Argument \"%s\" not found.\n"
16 #define MSG_ARG_INVALID     "Invalid value for argument \"%s\".\n"
17 #define MSG_FILE_ERR        "Error in file \"%s\" at line %u.\n"
18 #define MSG_FILE_NOT_ENOUGH "Not enough rules in file \"%s\".\n"
19 #define MSG_CMD_FAIL        "Command \"%s\" failed.\n"
20 
21 #define APP_CLI_CMD_NAME_SIZE	64
22 
23 void cli_init(void);
24 
25 void cli_exit(void);
26 
27 void cli_process(char *in, char *out, size_t out_size, void *arg);
28 
29 int cli_script_process(const char *file_name, size_t msg_in_len_max, size_t msg_out_len_max,
30 		       void *arg);
31 
32 #endif
33