@@ -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 }
};
This RPC tells us the guest agent is up and ready, and invokes guest agent capability negotiation Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> --- virtagent-daemon.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)