@@ -101,15 +101,31 @@ static QDict *va_capabilities(const QDict *params)
return va_server_format_response(ret, 0, NULL);
}
+/* va_ping(): respond to/pong to client.
+ * params/response qdict format (*=optional):
+ * response{error}: <error code>
+ * response{errstr}: <error description>
+ */
+static QDict *va_ping(const QDict *params)
+{
+ TRACE("called");
+ SLOG("va_ping()");
+ return va_server_format_response(NULL, 0, NULL);
+}
+
static VARPCFunction guest_functions[] = {
{ .func = va_capabilities,
.func_name = "capabilities" },
+ { .func = va_ping,
+ .func_name = "ping" },
{ NULL, NULL }
};
static VARPCFunction host_functions[] = {
{ .func = va_hello,
.func_name = "hello" },
+ { .func = va_ping,
+ .func_name = "ping" },
{ NULL, NULL }
};
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> --- virtagent-server.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)