DM: add new monitor module

This monitor module is to initialize socket intance, register
handlers to handle command from socket message, close socket,
free socket instance:
init_cmd_monitor: initialize socket intance and register handlers
to handle command.
deinit_cmd_monitor: close socket and free socket instance.

In this patch DM makefile is updated to build command monitor.

v1--v2:
	Update socket path and update log message format.
	Parse JSON format command message using libcjson lib APIs.
v2-->v3:
	Use socket path length MACRO.
	Update JSON format command message to {"command": "xxx"}.

Tracked-On: #5921

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Xiangyang Wu
2022-01-20 09:51:17 +08:00
committed by acrnsi-robot
parent b448567784
commit 02e94b1537
3 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/*
* Copyright (C) 2022 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _CMD_MONITOR_H_
#define _CMD_MONITOR_H_
int init_cmd_monitor(struct vmctx *ctx);
void deinit_cmd_monitor(void);
#endif