From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35497 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIO09-0006lb-Ol for qemu-devel@nongnu.org; Tue, 16 Nov 2010 11:03:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PINzw-0005Qp-Qt for qemu-devel@nongnu.org; Tue, 16 Nov 2010 11:03:09 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:48824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PINzw-0005Qh-Jt for qemu-devel@nongnu.org; Tue, 16 Nov 2010 11:03:08 -0500 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oAGFkJRR018569 for ; Tue, 16 Nov 2010 10:46:20 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oAGG2ieh2101424 for ; Tue, 16 Nov 2010 11:02:44 -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 oAGG2hev014711 for ; Tue, 16 Nov 2010 11:02:43 -0500 From: Michael Roth Date: Tue, 16 Nov 2010 10:01:57 -0600 Message-Id: <1289923320-5638-16-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1289923320-5638-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1289923320-5638-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v4 15/18] virtagent: add va_hello RPC function List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, agl@linux.vnet.ibm.com, mdroth@linux.vnet.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-daemon.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/virtagent-daemon.c b/virtagent-daemon.c index 137641d..ae306b9 100644 --- a/virtagent-daemon.c +++ b/virtagent-daemon.c @@ -194,6 +194,23 @@ 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) +{ + int ret = va_client_init_capabilities(); + TRACE("called"); + SLOG("va_hello()"); + if (ret < 0) { + LOG("error setting initializing client capabilities"); + } + return NULL; +} + static int va_accept(int listen_fd) { struct sockaddr_in saddr; struct sockaddr *addr; @@ -234,6 +251,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