From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44746 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POZzT-0002Ac-K6 for qemu-devel@nongnu.org; Fri, 03 Dec 2010 13:04:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POZzR-0003Iz-6z for qemu-devel@nongnu.org; Fri, 03 Dec 2010 13:04:15 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:36488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POZzR-0003Iu-3P for qemu-devel@nongnu.org; Fri, 03 Dec 2010 13:04:13 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oB3I5TW9006478 for ; Fri, 3 Dec 2010 13:05:29 -0500 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id E5ADC4DE803F for ; Fri, 3 Dec 2010 13:02:29 -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 oB3I4Cae396378 for ; Fri, 3 Dec 2010 13:04:12 -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 oB3I4A3h014890 for ; Fri, 3 Dec 2010 13:04:11 -0500 From: Michael Roth Date: Fri, 3 Dec 2010 12:03:18 -0600 Message-Id: <1291399402-20366-18-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1291399402-20366-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1291399402-20366-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v5 17/21] virtagent: add va.hello RPC 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, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, abeekhof@redhat.com This RPC tells us the guest agent is up and ready, and invokes guest agent capability negotiation Signed-off-by: Michael Roth --- virtagent-server.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/virtagent-server.c b/virtagent-server.c index 4a8ce7d..7a1b560 100644 --- a/virtagent-server.c +++ b/virtagent-server.c @@ -196,6 +196,26 @@ static xmlrpc_value *va_ping(xmlrpc_env *env, return result; } +/* va_hello(): handle client startup notification + * rpc return values: none + */ + +static xmlrpc_value *va_hello(xmlrpc_env *env, + xmlrpc_value *param, + void *user_data) +{ + xmlrpc_value *result; + int ret; + TRACE("called"); + SLOG("va_hello()"); + result = xmlrpc_build_value(env, "s", "dummy"); + ret = va_client_init_capabilities(); + if (ret < 0) { + LOG("error setting initializing client capabilities"); + } + return result; +} + typedef struct RPCFunction { xmlrpc_value *(*func)(xmlrpc_env *env, xmlrpc_value *param, void *unused); const char *func_name; @@ -215,6 +235,8 @@ static RPCFunction guest_functions[] = { static RPCFunction host_functions[] = { { .func = va_ping, .func_name = "va.ping" }, + { .func = va_hello, + .func_name = "va.hello" }, { NULL, NULL } }; -- 1.7.0.4