diff options
Diffstat (limited to 'tools/libxen')
-rw-r--r-- | tools/libxen/include/xen/api/xen_vif.h | 14 | ||||
-rw-r--r-- | tools/libxen/src/xen_vif.c | 39 |
2 files changed, 53 insertions, 0 deletions
diff --git a/tools/libxen/include/xen/api/xen_vif.h b/tools/libxen/include/xen/api/xen_vif.h index 26608f0af9..3fb8d7128e 100644 --- a/tools/libxen/include/xen/api/xen_vif.h +++ b/tools/libxen/include/xen/api/xen_vif.h @@ -362,4 +362,18 @@ extern bool xen_vif_get_all(xen_session *session, struct xen_vif_set **result); +/** + * Set the security label of a VIF. + */ +extern bool +xen_vif_set_security_label(xen_session *session, int64_t *result, xen_vif vif, + char *label, char *oldlabel); + + +/** + * Get the security label of a VIF. + */ +extern bool +xen_vif_get_security_label(xen_session *session, char **result, xen_vif vif); + #endif diff --git a/tools/libxen/src/xen_vif.c b/tools/libxen/src/xen_vif.c index bc9dd0dd2f..ac6147ff4f 100644 --- a/tools/libxen/src/xen_vif.c +++ b/tools/libxen/src/xen_vif.c @@ -575,3 +575,42 @@ xen_vif_get_uuid(xen_session *session, char **result, xen_vif vif) XEN_CALL_("VIF.get_uuid"); return session->ok; } + + +bool +xen_vif_set_security_label(xen_session *session, int64_t *result, xen_vif vif, + char *label, char *oldlabel) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vif }, + { .type = &abstract_type_string, + .u.string_val = label }, + { .type = &abstract_type_string, + .u.string_val = oldlabel }, + }; + + abstract_type result_type = abstract_type_int; + + *result = 0; + XEN_CALL_("VIF.set_security_label"); + return session->ok; +} + + +bool +xen_vif_get_security_label(xen_session *session, char **result, xen_vif vif) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vif }, + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VIF.get_security_label"); + return session->ok; +} |