[spp] [PATCH 2/2] spp_pcap: change name of struct cmd_response

yasufum.o at gmail.com yasufum.o at gmail.com
Mon Jun 24 09:10:51 CEST 2019


From: Yasufumi Ogawa <yasufum.o at gmail.com>

This update is to rename struct `cmd_response` to
`cmd_res_formatter_ops` because it is a set of tag and operation
function for parsing command.

Signed-off-by: Yasufumi Ogawa <yasufum.o at gmail.com>
---
 src/pcap/cmd_runner.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/pcap/cmd_runner.c b/src/pcap/cmd_runner.c
index 55f15bf..4a74af2 100644
--- a/src/pcap/cmd_runner.c
+++ b/src/pcap/cmd_runner.c
@@ -47,7 +47,7 @@ struct cmd_result {
 
 /* command response list control structure */
 /* TODO(yasufum) merge it to the same definition in shared/.../cmd_runner.c */
-struct cmd_response {
+struct cmd_res_formatter_ops {
 	char tag_name[SPPWK_NAME_BUFSZ];  /* JSON Tag name */
 	int (*func)(const char *name, char **output, void *tmp);
 };
@@ -548,7 +548,7 @@ append_core_value(const char *name, char **output,
 /* append string of command response list for JSON format */
 static int
 append_response_list_value(char **output,
-		struct cmd_response *list,
+		struct cmd_res_formatter_ops *list,
 		void *tmp)
 {
 	int ret = SPPWK_RET_NG;
@@ -607,14 +607,14 @@ append_response_list_value(char **output,
 #define COMMAND_RESP_TAG_LIST_EMPTY { "", NULL }
 
 /* command response result string list */
-struct cmd_response response_result_list[] = {
+struct cmd_res_formatter_ops response_result_list[] = {
 	{ "result",        append_result_value },
 	{ "error_details", append_error_details_value },
 	COMMAND_RESP_TAG_LIST_EMPTY
 };
 
 /* command response status information string list */
-struct cmd_response response_info_list[] = {
+struct cmd_res_formatter_ops response_info_list[] = {
 	{ "client-id",        append_client_id_value },
 	{ "status",           append_capture_status_value },
 	{ "master-lcore",     append_master_lcore_value },
-- 
2.17.1



More information about the spp mailing list