aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-04-12 22:49:02 +0100
committerEwan Mellor <ewan@xensource.com>2007-04-12 22:49:02 +0100
commit3bd8ff8dd154311d78165d26e8970c10bc7bbcd7 (patch)
tree1e96239f99b5f819739b5f09422afad968ee4150 /tools/libxen
parent2fc79387151b2445208cd9faf400dbbd17a227c9 (diff)
downloadxen-3bd8ff8dd154311d78165d26e8970c10bc7bbcd7.tar.gz
xen-3bd8ff8dd154311d78165d26e8970c10bc7bbcd7.tar.bz2
xen-3bd8ff8dd154311d78165d26e8970c10bc7bbcd7.zip
Added documentation and C bindings for VBD. and VIF.runtime_properties.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r--tools/libxen/include/xen_vbd.h8
-rw-r--r--tools/libxen/include/xen_vif.h12
-rw-r--r--tools/libxen/src/xen_vbd.c21
-rw-r--r--tools/libxen/src/xen_vif.c21
4 files changed, 60 insertions, 2 deletions
diff --git a/tools/libxen/include/xen_vbd.h b/tools/libxen/include/xen_vbd.h
index 14a6685a95..d40af36796 100644
--- a/tools/libxen/include/xen_vbd.h
+++ b/tools/libxen/include/xen_vbd.h
@@ -78,6 +78,7 @@ typedef struct xen_vbd_record
bool currently_attached;
int64_t status_code;
char *status_detail;
+ xen_string_string_map *runtime_properties;
char *qos_algorithm_type;
xen_string_string_map *qos_algorithm_params;
struct xen_string_set *qos_supported_algorithms;
@@ -262,6 +263,13 @@ xen_vbd_get_status_detail(xen_session *session, char **result, xen_vbd vbd);
/**
+ * Get the runtime_properties field of the given VBD.
+ */
+extern bool
+xen_vbd_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vbd vbd);
+
+
+/**
* Get the qos/algorithm_type field of the given VBD.
*/
extern bool
diff --git a/tools/libxen/include/xen_vif.h b/tools/libxen/include/xen_vif.h
index 8a1cffb7bd..e9ad6b4369 100644
--- a/tools/libxen/include/xen_vif.h
+++ b/tools/libxen/include/xen_vif.h
@@ -75,6 +75,7 @@ typedef struct xen_vif_record
bool currently_attached;
int64_t status_code;
char *status_detail;
+ xen_string_string_map *runtime_properties;
char *qos_algorithm_type;
xen_string_string_map *qos_algorithm_params;
struct xen_string_set *qos_supported_algorithms;
@@ -252,6 +253,13 @@ xen_vif_get_status_detail(xen_session *session, char **result, xen_vif vif);
/**
+ * Get the runtime_properties field of the given VIF.
+ */
+extern bool
+xen_vif_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vif vif);
+
+
+/**
* Get the qos/algorithm_type field of the given VIF.
*/
extern bool
@@ -333,7 +341,7 @@ xen_vif_remove_from_qos_algorithm_params(xen_session *session, xen_vif vif, char
/**
* Hotplug the specified VIF, dynamically attaching it to the running
- * VM
+ * VM.
*/
extern bool
xen_vif_plug(xen_session *session, xen_vif self);
@@ -341,7 +349,7 @@ xen_vif_plug(xen_session *session, xen_vif self);
/**
* Hot-unplug the specified VIF, dynamically unattaching it from the
- * running VM
+ * running VM.
*/
extern bool
xen_vif_unplug(xen_session *session, xen_vif self);
diff --git a/tools/libxen/src/xen_vbd.c b/tools/libxen/src/xen_vbd.c
index cd63a4b52e..facedad94f 100644
--- a/tools/libxen/src/xen_vbd.c
+++ b/tools/libxen/src/xen_vbd.c
@@ -72,6 +72,9 @@ static const struct_member xen_vbd_record_struct_members[] =
{ .key = "status_detail",
.type = &abstract_type_string,
.offset = offsetof(xen_vbd_record, status_detail) },
+ { .key = "runtime_properties",
+ .type = &abstract_type_string_string_map,
+ .offset = offsetof(xen_vbd_record, runtime_properties) },
{ .key = "qos_algorithm_type",
.type = &abstract_type_string,
.offset = offsetof(xen_vbd_record, qos_algorithm_type) },
@@ -109,6 +112,7 @@ xen_vbd_record_free(xen_vbd_record *record)
xen_vdi_record_opt_free(record->vdi);
free(record->device);
free(record->status_detail);
+ xen_string_string_map_free(record->runtime_properties);
free(record->qos_algorithm_type);
xen_string_string_map_free(record->qos_algorithm_params);
xen_string_set_free(record->qos_supported_algorithms);
@@ -335,6 +339,23 @@ xen_vbd_get_status_detail(xen_session *session, char **result, xen_vbd vbd)
bool
+xen_vbd_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vbd vbd)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vbd }
+ };
+
+ abstract_type result_type = abstract_type_string_string_map;
+
+ *result = NULL;
+ XEN_CALL_("VBD.get_runtime_properties");
+ return session->ok;
+}
+
+
+bool
xen_vbd_get_qos_algorithm_type(xen_session *session, char **result, xen_vbd vbd)
{
abstract_value param_values[] =
diff --git a/tools/libxen/src/xen_vif.c b/tools/libxen/src/xen_vif.c
index 9a44129e4f..b0ea376a4b 100644
--- a/tools/libxen/src/xen_vif.c
+++ b/tools/libxen/src/xen_vif.c
@@ -67,6 +67,9 @@ static const struct_member xen_vif_record_struct_members[] =
{ .key = "status_detail",
.type = &abstract_type_string,
.offset = offsetof(xen_vif_record, status_detail) },
+ { .key = "runtime_properties",
+ .type = &abstract_type_string_string_map,
+ .offset = offsetof(xen_vif_record, runtime_properties) },
{ .key = "qos_algorithm_type",
.type = &abstract_type_string,
.offset = offsetof(xen_vif_record, qos_algorithm_type) },
@@ -105,6 +108,7 @@ xen_vif_record_free(xen_vif_record *record)
xen_vm_record_opt_free(record->vm);
free(record->mac);
free(record->status_detail);
+ xen_string_string_map_free(record->runtime_properties);
free(record->qos_algorithm_type);
xen_string_string_map_free(record->qos_algorithm_params);
xen_string_set_free(record->qos_supported_algorithms);
@@ -318,6 +322,23 @@ xen_vif_get_status_detail(xen_session *session, char **result, xen_vif vif)
bool
+xen_vif_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vif vif)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vif }
+ };
+
+ abstract_type result_type = abstract_type_string_string_map;
+
+ *result = NULL;
+ XEN_CALL_("VIF.get_runtime_properties");
+ return session->ok;
+}
+
+
+bool
xen_vif_get_qos_algorithm_type(xen_session *session, char **result, xen_vif vif)
{
abstract_value param_values[] =