From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41360 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwglv-0001d8-ES for qemu-devel@nongnu.org; Mon, 07 Mar 2011 15:11:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwglt-0006TF-Sn for qemu-devel@nongnu.org; Mon, 07 Mar 2011 15:11:15 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:37144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwglt-0006T6-Lf for qemu-devel@nongnu.org; Mon, 07 Mar 2011 15:11:13 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p27K1ObZ013221 for ; Mon, 7 Mar 2011 15:01:24 -0500 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 36FFA6E803C for ; Mon, 7 Mar 2011 15:11:13 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p27KBD9n392092 for ; Mon, 7 Mar 2011 15:11:13 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p27KBC4K012660 for ; Mon, 7 Mar 2011 15:11:13 -0500 From: Michael Roth Date: Mon, 7 Mar 2011 14:10:36 -0600 Message-Id: <1299528642-23631-11-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1299528642-23631-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1299528642-23631-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v7 10/16] virtagent: add "ping" RPC to server List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agl@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, Jes.Sorensen@redhat.com, mdroth@linux.vnet.ibm.com, markus_mueller@de.ibm.com, aliguori@linux.vnet.ibm.com, abeekhof@redhat.com Signed-off-by: Michael Roth --- virtagent-server.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/virtagent-server.c b/virtagent-server.c index f84546b..b0fc0c4 100644 --- a/virtagent-server.c +++ b/virtagent-server.c @@ -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}: + * response{errstr}: + */ +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 } }; -- 1.7.0.4