element.</dd>
</dl>
+
+ <h4><a id="elementsRNG">RNG device</a></h4>
+ <p>RNG device capabilities are exposed under the
+ <code>rng</code> element. For instance:</p>
+
+<pre>
+<domainCapabilities>
+ ...
+ <devices>
+ <rng supported='yes'>
+ <enum name='model'>
+ <value>virtio</value>
+ <value>virtio-transitional</value>
+ <value>virtio-non-transitional</value>
+ </enum>
+ <enum name='backendModel'>
+ <value>random</value>
+ <value>egd</value>
+ </enum>
+ </rng>
+ ...
+ </devices>
+</domainCapabilities>
+</pre>
+
+ <dl>
+ <dt><code>model</code></dt>
+ <dd>Options for the <code>model</code> attribute of the
+ <rng> element.</dd>
+ <dt><code>backendModel</code></dt>
+ <dd>Options for the <code>model</code> attribute of the
+ <rng><backend> element.</dd>
+ </dl>
+
+
<h3><a id="elementsFeatures">Features</a></h3>
<p>One more set of XML elements describe the supported features and
<optional>
<ref name='hostdev'/>
</optional>
+ <optional>
+ <ref name='rng'/>
+ </optional>
</element>
</define>
</element>
</define>
+ <define name='rng'>
+ <element name='rng'>
+ <ref name='supported'/>
+ <ref name='enum'/>
+ </element>
+ </define>
+
<define name='features'>
<element name='features'>
<optional>
}
+static void
+virDomainCapsDeviceRNGFormat(virBufferPtr buf,
+ virDomainCapsDeviceRNGPtr const rng)
+{
+ FORMAT_PROLOGUE(rng);
+
+ ENUM_PROCESS(rng, model, virDomainRNGModelTypeToString);
+ ENUM_PROCESS(rng, backendModel, virDomainRNGBackendTypeToString);
+
+ FORMAT_EPILOGUE(rng);
+}
+
+
/**
* virDomainCapsFeatureGICFormat:
* @buf: target buffer
virDomainCapsDeviceGraphicsFormat(&buf, &caps->graphics);
virDomainCapsDeviceVideoFormat(&buf, &caps->video);
virDomainCapsDeviceHostdevFormat(&buf, &caps->hostdev);
+ virDomainCapsDeviceRNGFormat(&buf, &caps->rng);
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</devices>\n");
/* add new fields here */
};
+typedef struct _virDomainCapsDeviceRNG virDomainCapsDeviceRNG;
+typedef virDomainCapsDeviceRNG *virDomainCapsDeviceRNGPtr;
+struct _virDomainCapsDeviceRNG {
+ virTristateBool supported;
+ virDomainCapsEnum model; /* virDomainRNGModel */
+ virDomainCapsEnum backendModel; /* virDomainRNGBackend */
+};
+
typedef struct _virDomainCapsFeatureGIC virDomainCapsFeatureGIC;
typedef virDomainCapsFeatureGIC *virDomainCapsFeatureGICPtr;
struct _virDomainCapsFeatureGIC {
virDomainCapsDeviceGraphics graphics;
virDomainCapsDeviceVideo video;
virDomainCapsDeviceHostdev hostdev;
+ virDomainCapsDeviceRNG rng;
/* add new domain devices here */
virDomainCapsFeatureGIC gic;