[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH v4 15/18] virtagent: add va_hello RPC function
From: |
Michael Roth |
Subject: |
[Qemu-devel] [RFC][PATCH v4 15/18] virtagent: add va_hello RPC function |
Date: |
Tue, 16 Nov 2010 10:01:57 -0600 |
This RPC tells us the guest agent is up and ready, and invokes guest
agent capability negotiation
Signed-off-by: Michael Roth <address@hidden>
---
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
- [Qemu-devel] [RFC][PATCH v4 16/18] virtagent: add va_send_hello() client function, (continued)
- [Qemu-devel] [RFC][PATCH v4 16/18] virtagent: add va_send_hello() client function, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 13/18] virtagent: add agent_capabilities monitor function, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 18/18] virtagent: Makefile/configure changes to build virtagent bits, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 10/18] virtagent: add agent_shutdown monitor command, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 17/18] virtagent: qemu-vp, va_send_hello() on startup, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 14/18] virtagent: add client capabilities init function, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 15/18] virtagent: add va_hello RPC function,
Michael Roth <=
- Re: [Qemu-devel] [RFC][PATCH v4 00/18] virtagent: host/guest RPC communication agent, Jes Sorensen, 2010/11/18