summaryrefslogtreecommitdiff
path: root/src/admin
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2015-04-15 16:35:42 +0200
committerMartin Kletzander <mkletzan@redhat.com>2015-06-16 13:46:21 +0200
commit5792fabb7b712749147e9d03348c798dc1943651 (patch)
treeb575d69b9ee6dd6653eba6aac59a1a0c2823bbd4 /src/admin
parent6bda9f8aa2cd07a3defda571c7d61401fd66c226 (diff)
downloadlibvirt-5792fabb7b712749147e9d03348c798dc1943651.tar.gz
admin: Add virAdmHello function
Just one of the simplest functions that returns string "Clients: X" where X is the number of connected clients to daemon's first subserver (the original one), so it can be tested using virsh, ipython, etc. The subserver is gathered by incrementing its reference counter (similarly to getting qemu capabilities), so there is no deadlock with admin subserver in this API. Here you can see how functions should be named in the client (virAdm*) and server (adm*). There is also a parameter @flags that must be 0, which helps testing proper error propagation into the client. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Diffstat (limited to 'src/admin')
-rw-r--r--src/admin/admin_protocol.x16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/admin/admin_protocol.x b/src/admin/admin_protocol.x
index 1a2e94ee86..70954ccb87 100644
--- a/src/admin/admin_protocol.x
+++ b/src/admin/admin_protocol.x
@@ -43,6 +43,15 @@ struct admin_connect_open_args {
unsigned int flags;
};
+struct admin_hello_args {
+ unsigned int flags;
+};
+
+struct admin_hello_ret {
+ admin_string greeting;
+};
+
+
/* Define the program number, protocol version and procedure numbers here. */
const ADMIN_PROGRAM = 0x06900690;
const ADMIN_PROTOCOL_VERSION = 1;
@@ -73,5 +82,10 @@ enum admin_procedure {
/**
* @generate: client
*/
- ADMIN_PROC_CONNECT_CLOSE = 2
+ ADMIN_PROC_CONNECT_CLOSE = 2,
+
+ /**
+ * @generate: both
+ */
+ ADMIN_PROC_HELLO = 3
};