From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 165DD568A for ; Tue, 15 Jan 2019 13:30:14 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x0FCUDfG002758; Tue, 15 Jan 2019 21:30:13 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 7EB986391B4; Tue, 15 Jan 2019 21:30:13 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 674296391AB; Tue, 15 Jan 2019 21:30:13 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Tue, 15 Jan 2019 21:27:59 +0900 Message-Id: <1547555280-11736-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547555280-11736-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1547555280-11736-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 1/2] spp_nfv: change _get_client_id to return JSON msg X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 12:30:15 -0000 From: Yasufumi Ogawa Spp_nfv returns its client ID as plain text. This update is to change the format to JSON as same as other secondary processes. Signed-off-by: Yasufumi Ogawa --- src/nfv/commands.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nfv/commands.h b/src/nfv/commands.h index 54e0f21..7dbe25b 100644 --- a/src/nfv/commands.h +++ b/src/nfv/commands.h @@ -6,6 +6,7 @@ #ifndef _NFV_COMMANDS_H_ #define _NFV_COMMANDS_H_ +#include "shared/common.h" #include "shared/secondary/add_port.h" #include "shared/secondary/utils.h" @@ -180,7 +181,10 @@ parse_command(char *str) } else if (!strcmp(token_list[0], "_get_client_id")) { memset(str, '\0', MSG_SIZE); - sprintf(str, "%d", client_id); + sprintf(str, "{%s:%s,%s:%d,%s:%s}", + "\"results\"", "[{\"result\":\"success\"}]", + "\"client_id\"", client_id, + "\"process_type\"", "\"nfv\""); } else if (!strcmp(token_list[0], "_set_client_id")) { int id; -- 2.17.1