]> xenbits.xensource.com Git - libvirt.git/commitdiff
Public API for sVirt support (James Morris & Dan Walsh)
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 3 Mar 2009 09:09:00 +0000 (09:09 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 3 Mar 2009 09:09:00 +0000 (09:09 +0000)
AUTHORS
ChangeLog
include/libvirt/libvirt.h
include/libvirt/libvirt.h.in
src/libvirt_public.syms

diff --git a/AUTHORS b/AUTHORS
index 1c8700355639a908ef0715dd359f1f3af071a114..93a47baebfa82822a27d724b3a32dd58b87d7240 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -60,6 +60,8 @@ Patches have also been contributed by:
   Dave Allan           <dallan@redhat.com>
   Markus Armbruster    <armbru@redhat.com>
   Ryota Ozaki          <ozaki.ryota@gmail.com>
+  James Morris         <jmorris@namei.org>
+  Daniel J Walsh       <dwalsh@redhat.com>
 
   [....send patches to get your name here....]
 
index 767dd679c0ff0860d55691cdd3ac6c2598716f99..aca3e9f92e6928edd83d95466949b208e419df9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Mar  3 09:10:13 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
+
+       Public API for sVirt support (James Morris & Dan Walsh)
+       * include/libvirt/libvirt.h.in, src/libvirt_public.syms: added
+       virNodeGetSecurityModel() and virDomainGetSecurityLabel() APIs
+       * include/libvirt/libvirt.h: Regenerated
+
 Tue Mar  3 08:55:13 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
 
        Don't try to detach & reset PCI devices while running test
index cf39488bd940fb0354bcf2f9357420ceb0219e29..453b064be82852471aebd95030cc8259ef66d8f2 100644 (file)
@@ -110,6 +110,68 @@ typedef enum {
      VIR_DOMAIN_NONE = 0
 } virDomainCreateFlags;
 
+/**
+ * VIR_SECURITY_LABEL_BUFLEN:
+ *
+ * Macro providing the maximum length of the virSecurityLabel label string.
+ * Note that this value is based on that used by Labeled NFS.
+ */
+#define VIR_SECURITY_LABEL_BUFLEN (4096 + 1)
+
+/**
+ * virSecurityLabel:
+ *
+ * a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(),
+ * providing the security label and associated attributes for the specified
+ * domain.
+ *
+ */
+typedef struct _virSecurityLabel {
+    char label[VIR_SECURITY_LABEL_BUFLEN];    /* security label string */
+    int enforcing;                            /* 1 if security policy is being enforced for domain */
+} virSecurityLabel;
+
+/**
+ * virSecurityLabelPtr:
+ *
+ * a virSecurityLabelPtr is a pointer to a virSecurityLabel.
+ */
+typedef virSecurityLabel *virSecurityLabelPtr;
+
+/**
+ * VIR_SECURITY_MODEL_BUFLEN:
+ *
+ * Macro providing the maximum length of the virSecurityModel model string.
+ */
+#define VIR_SECURITY_MODEL_BUFLEN (256 + 1)
+
+/**
+ * VIR_SECURITY_DOI_BUFLEN:
+ *
+ * Macro providing the maximum length of the virSecurityModel doi string.
+ */
+#define VIR_SECURITY_DOI_BUFLEN (256 + 1)
+
+/**
+ * virSecurityModel:
+ *
+ * a virSecurityModel is a structure filled by virNodeGetSecurityModel(),
+ * providing the per-hypervisor security model and DOI attributes for the
+ * specified domain.
+ *
+ */
+typedef struct _virSecurityModel {
+    char model[VIR_SECURITY_MODEL_BUFLEN];      /* security model string */
+    char doi[VIR_SECURITY_DOI_BUFLEN];          /* domain of interpetation */
+} virSecurityModel;
+
+/**
+ * virSecurityModelPtr:
+ *
+ * a virSecurityModelPtr is a pointer to a virSecurityModel.
+ */
+typedef virSecurityModel *virSecurityModelPtr;
+
 /**
  * virNodeInfoPtr:
  *
@@ -417,6 +479,9 @@ char *                  virConnectGetCapabilities (virConnectPtr conn);
 
 unsigned long long      virNodeGetFreeMemory    (virConnectPtr conn);
 
+int                     virNodeGetSecurityModel (virConnectPtr conn,
+                                                 virSecurityModelPtr secmodel);
+
 /*
  * Gather list of running domains
  */
@@ -506,6 +571,8 @@ int                     virDomainSetMaxMemory   (virDomainPtr domain,
 int                     virDomainSetMemory      (virDomainPtr domain,
                                                  unsigned long memory);
 int                     virDomainGetMaxVcpus    (virDomainPtr domain);
+int                     virDomainGetSecurityLabel (virDomainPtr domain,
+                                                   virSecurityLabelPtr seclabel);
 
 /*
  * XML domain description
index 06361de0f97c0be96df693d620f300296b4fd8a4..a028b21e88241306df1f98a1f9375afbc4b596b2 100644 (file)
@@ -110,6 +110,68 @@ typedef enum {
      VIR_DOMAIN_NONE = 0
 } virDomainCreateFlags;
 
+/**
+ * VIR_SECURITY_LABEL_BUFLEN:
+ *
+ * Macro providing the maximum length of the virSecurityLabel label string.
+ * Note that this value is based on that used by Labeled NFS.
+ */
+#define VIR_SECURITY_LABEL_BUFLEN (4096 + 1)
+
+/**
+ * virSecurityLabel:
+ *
+ * a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(),
+ * providing the security label and associated attributes for the specified
+ * domain.
+ *
+ */
+typedef struct _virSecurityLabel {
+    char label[VIR_SECURITY_LABEL_BUFLEN];    /* security label string */
+    int enforcing;                            /* 1 if security policy is being enforced for domain */
+} virSecurityLabel;
+
+/**
+ * virSecurityLabelPtr:
+ *
+ * a virSecurityLabelPtr is a pointer to a virSecurityLabel.
+ */
+typedef virSecurityLabel *virSecurityLabelPtr;
+
+/**
+ * VIR_SECURITY_MODEL_BUFLEN:
+ *
+ * Macro providing the maximum length of the virSecurityModel model string.
+ */
+#define VIR_SECURITY_MODEL_BUFLEN (256 + 1)
+
+/**
+ * VIR_SECURITY_DOI_BUFLEN:
+ *
+ * Macro providing the maximum length of the virSecurityModel doi string.
+ */
+#define VIR_SECURITY_DOI_BUFLEN (256 + 1)
+
+/**
+ * virSecurityModel:
+ *
+ * a virSecurityModel is a structure filled by virNodeGetSecurityModel(),
+ * providing the per-hypervisor security model and DOI attributes for the
+ * specified domain.
+ *
+ */
+typedef struct _virSecurityModel {
+    char model[VIR_SECURITY_MODEL_BUFLEN];      /* security model string */
+    char doi[VIR_SECURITY_DOI_BUFLEN];          /* domain of interpetation */
+} virSecurityModel;
+
+/**
+ * virSecurityModelPtr:
+ *
+ * a virSecurityModelPtr is a pointer to a virSecurityModel.
+ */
+typedef virSecurityModel *virSecurityModelPtr;
+
 /**
  * virNodeInfoPtr:
  *
@@ -417,6 +479,9 @@ char *                  virConnectGetCapabilities (virConnectPtr conn);
 
 unsigned long long      virNodeGetFreeMemory    (virConnectPtr conn);
 
+int                     virNodeGetSecurityModel (virConnectPtr conn,
+                                                 virSecurityModelPtr secmodel);
+
 /*
  * Gather list of running domains
  */
@@ -506,6 +571,8 @@ int                     virDomainSetMaxMemory   (virDomainPtr domain,
 int                     virDomainSetMemory      (virDomainPtr domain,
                                                  unsigned long memory);
 int                     virDomainGetMaxVcpus    (virDomainPtr domain);
+int                     virDomainGetSecurityLabel (virDomainPtr domain,
+                                                   virSecurityLabelPtr seclabel);
 
 /*
  * XML domain description
index 8114073d38be93a1da84869e29dea7ccc5e5574c..f7ebbc39ab64283f19f84aa67962c65f5fd88e0b 100644 (file)
@@ -254,6 +254,8 @@ LIBVIRT_0.6.1 {
        virNodeDeviceDettach;
        virNodeDeviceReAttach;
        virNodeDeviceReset;
+       virDomainGetSecurityLabel;
+       virNodeGetSecurityModel;
 } LIBVIRT_0.6.0;
 
 # .... define new API here using predicted next version number ....