1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!--
This file is autogenerated from html/libvirt-libvirt-nwfilter.html.in
Do not edit this file. Changes will be lost.
--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Module libvirt-nwfilter from libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="body"><div id="content"><h1>Module libvirt-nwfilter from libvirt</h1><p>Provides APIs for the management of nwfilters</p><h2>Table of Contents</h2><h3><a href="#types">Types</a></h3><pre class="api"><span class="keyword">typedef</span> <span class="type">struct _virNWFilter</span> <a href="#virNWFilter">virNWFilter</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilter">virNWFilter</a> *</span> <a name="virNWFilterPtr" id="virNWFilterPtr">virNWFilterPtr</a>
</pre><h3><a href="#functions">Functions</a></h3><pre class="api"><span class="type">int</span> <a href="#virConnectListAllNWFilters">virConnectListAllNWFilters</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br /> <span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a> **</span> filters, <br /> <span class="type">unsigned int</span> flags)
<span class="type">int</span> <a href="#virConnectListNWFilters">virConnectListNWFilters</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br /> <span class="type">char ** const</span> names, <br /> <span class="type">int</span> maxnames)
<span class="type">int</span> <a href="#virConnectNumOfNWFilters">virConnectNumOfNWFilters</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> <a href="#virNWFilterDefineXML">virNWFilterDefineXML</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br /> <span class="type">const char *</span> xmlDesc)
<span class="type">int</span> <a href="#virNWFilterFree">virNWFilterFree</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)
<span class="type">const char *</span> <a href="#virNWFilterGetName">virNWFilterGetName</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)
<span class="type">int</span> <a href="#virNWFilterGetUUID">virNWFilterGetUUID</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter, <br /> <span class="type">unsigned char *</span> uuid)
<span class="type">int</span> <a href="#virNWFilterGetUUIDString">virNWFilterGetUUIDString</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter, <br /> <span class="type">char *</span> buf)
<span class="type">char *</span> <a href="#virNWFilterGetXMLDesc">virNWFilterGetXMLDesc</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter, <br /> <span class="type">unsigned int</span> flags)
<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> <a href="#virNWFilterLookupByName">virNWFilterLookupByName</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br /> <span class="type">const char *</span> name)
<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> <a href="#virNWFilterLookupByUUID">virNWFilterLookupByUUID</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br /> <span class="type">const unsigned char *</span> uuid)
<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> <a href="#virNWFilterLookupByUUIDString">virNWFilterLookupByUUIDString</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br /> <span class="type">const char *</span> uuidstr)
<span class="type">int</span> <a href="#virNWFilterRef">virNWFilterRef</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)
<span class="type">int</span> <a href="#virNWFilterUndefine">virNWFilterUndefine</a> (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)
</pre><h2>Description</h2><h3><a name="types" id="types">Types</a><a class="headerlink" href="#types" title="Permalink to this headline">¶</a></h3><h3><a name="virNWFilter" id="virNWFilter"><code>virNWFilter</code></a><a class="headerlink" href="#virNWFilter" title="Permalink to this headline">¶</a></h3><div class="api"><pre><span class="keyword">struct </span>virNWFilter {
</pre><div class="undisclosed">The content of this structure is not made public by the API</div><pre>
}
</pre></div><h3><a name="functions" id="functions">Functions</a><a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h3><h3><a name="virConnectListAllNWFilters" id="virConnectListAllNWFilters"><code>virConnectListAllNWFilters</code></a><a class="headerlink" href="#virConnectListAllNWFilters" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virConnectListAllNWFilters (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a> **</span> filters,
<span class="type">unsigned int</span> flags)</pre><div class="description"><p>Collect the list of network filters, and allocate an array to store those objects.</p></div><dl class="variablelist"><dt>conn</dt><dd>Pointer to the hypervisor connection.</dd><dt>filters</dt><dd>Pointer to a variable to store the array containing the network filter objects or NULL if the list is not required (just returns number of network filters).</dd><dt>flags</dt><dd>extra flags; not used yet, so callers should always pass 0</dd><dt>Returns</dt><dd>the number of network filters found or -1 and sets @filters to NULL in case of error. On success, the array stored into @filters is guaranteed to have an extra allocated element set to NULL but not included in the return count, to make iteration easier. The caller is responsible for calling <a href="libvirt-libvirt-nwfilter.html#virNWFilterFree">virNWFilterFree</a>() on each array element, then calling free() on @filters.</dd></dl><div class="acl"></div><h3><a name="virConnectListNWFilters" id="virConnectListNWFilters"><code>virConnectListNWFilters</code></a><a class="headerlink" href="#virConnectListNWFilters" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virConnectListNWFilters (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">char ** const</span> names,
<span class="type">int</span> maxnames)</pre><div class="description"><p>Collect the list of network filters, and store their names in @names</p></div><dl class="variablelist"><dt>conn</dt><dd>pointer to the hypervisor connection</dd><dt>names</dt><dd>array to collect the list of names of network filters</dd><dt>maxnames</dt><dd>size of @names</dd><dt>Returns</dt><dd>the number of network filters found or -1 in case of error</dd></dl><div class="acl"></div><h3><a name="virConnectNumOfNWFilters" id="virConnectNumOfNWFilters"><code>virConnectNumOfNWFilters</code></a><a class="headerlink" href="#virConnectNumOfNWFilters" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virConnectNumOfNWFilters (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre><div class="description"><p>Provides the number of nwfilters.</p></div><dl class="variablelist"><dt>conn</dt><dd>pointer to the hypervisor connection</dd><dt>Returns</dt><dd>the number of nwfilters found or -1 in case of error</dd></dl><div class="acl"></div><h3><a name="virNWFilterDefineXML" id="virNWFilterDefineXML"><code>virNWFilterDefineXML</code></a><a class="headerlink" href="#virNWFilterDefineXML" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> virNWFilterDefineXML (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> xmlDesc)</pre><div class="description"><p>Define a new network filter, based on an XML description similar to the one returned by <a href="libvirt-libvirt-nwfilter.html#virNWFilterGetXMLDesc">virNWFilterGetXMLDesc</a>()</p><p><a href="libvirt-libvirt-nwfilter.html#virNWFilterFree">virNWFilterFree</a> should be used to free the resources after the nwfilter object is no longer needed.</p></div><dl class="variablelist"><dt>conn</dt><dd>pointer to the hypervisor connection</dd><dt>xmlDesc</dt><dd>an XML description of the nwfilter</dd><dt>Returns</dt><dd>a new nwfilter object or NULL in case of failure</dd></dl><div class="acl"></div><h3><a name="virNWFilterFree" id="virNWFilterFree"><code>virNWFilterFree</code></a><a class="headerlink" href="#virNWFilterFree" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virNWFilterFree (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)</pre><div class="description"><p>Free the nwfilter object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>a nwfilter object</dd><dt>Returns</dt><dd>0 in case of success and -1 in case of failure.</dd></dl><div class="acl"></div><h3><a name="virNWFilterGetName" id="virNWFilterGetName"><code>virNWFilterGetName</code></a><a class="headerlink" href="#virNWFilterGetName" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">const char *</span> virNWFilterGetName (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)</pre><div class="description"><p>Get the public name for the network filter</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>a nwfilter object</dd><dt>Returns</dt><dd>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the nwfilter object.</dd></dl><div class="acl"></div><h3><a name="virNWFilterGetUUID" id="virNWFilterGetUUID"><code>virNWFilterGetUUID</code></a><a class="headerlink" href="#virNWFilterGetUUID" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virNWFilterGetUUID (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter,
<span class="type">unsigned char *</span> uuid)</pre><div class="description"><p>Get the UUID for a network filter</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>a nwfilter object</dd><dt>uuid</dt><dd>pointer to a <a href="libvirt-libvirt-host.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes array</dd><dt>Returns</dt><dd>-1 in case of error, 0 in case of success</dd></dl><div class="acl"></div><h3><a name="virNWFilterGetUUIDString" id="virNWFilterGetUUIDString"><code>virNWFilterGetUUIDString</code></a><a class="headerlink" href="#virNWFilterGetUUIDString" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virNWFilterGetUUIDString (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter,
<span class="type">char *</span> buf)</pre><div class="description"><p>Get the UUID for a network filter as string. For more information about UUID see RFC4122.</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>a nwfilter object</dd><dt>buf</dt><dd>pointer to a <a href="libvirt-libvirt-host.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes array</dd><dt>Returns</dt><dd>-1 in case of error, 0 in case of success</dd></dl><div class="acl"></div><h3><a name="virNWFilterGetXMLDesc" id="virNWFilterGetXMLDesc"><code>virNWFilterGetXMLDesc</code></a><a class="headerlink" href="#virNWFilterGetXMLDesc" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">char *</span> virNWFilterGetXMLDesc (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter,
<span class="type">unsigned int</span> flags)</pre><div class="description"><p>Provide an XML description of the network filter. The description may be reused later to redefine the network filter with virNWFilterCreateXML().</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>a nwfilter object</dd><dt>flags</dt><dd>extra flags; not used yet, so callers should always pass 0</dd><dt>Returns</dt><dd>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</dd></dl><div class="acl"></div><h3><a name="virNWFilterLookupByName" id="virNWFilterLookupByName"><code>virNWFilterLookupByName</code></a><a class="headerlink" href="#virNWFilterLookupByName" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> virNWFilterLookupByName (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> name)</pre><div class="description"><p>Try to lookup a network filter on the given hypervisor based on its name.</p><p><a href="libvirt-libvirt-nwfilter.html#virNWFilterFree">virNWFilterFree</a> should be used to free the resources after the nwfilter object is no longer needed.</p></div><dl class="variablelist"><dt>conn</dt><dd>pointer to the hypervisor connection</dd><dt>name</dt><dd>name for the network filter</dd><dt>Returns</dt><dd>a new nwfilter object or NULL in case of failure. If the network filter cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NWFILTER">VIR_ERR_NO_NWFILTER</a> error is raised.</dd></dl><div class="acl"></div><h3><a name="virNWFilterLookupByUUID" id="virNWFilterLookupByUUID"><code>virNWFilterLookupByUUID</code></a><a class="headerlink" href="#virNWFilterLookupByUUID" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> virNWFilterLookupByUUID (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const unsigned char *</span> uuid)</pre><div class="description"><p>Try to lookup a network filter on the given hypervisor based on its UUID.</p><p><a href="libvirt-libvirt-nwfilter.html#virNWFilterFree">virNWFilterFree</a> should be used to free the resources after the nwfilter object is no longer needed.</p></div><dl class="variablelist"><dt>conn</dt><dd>pointer to the hypervisor connection</dd><dt>uuid</dt><dd>the raw UUID for the network filter</dd><dt>Returns</dt><dd>a new nwfilter object or NULL in case of failure. If the nwfdilter cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NWFILTER">VIR_ERR_NO_NWFILTER</a> error is raised.</dd></dl><div class="acl"></div><h3><a name="virNWFilterLookupByUUIDString" id="virNWFilterLookupByUUIDString"><code>virNWFilterLookupByUUIDString</code></a><a class="headerlink" href="#virNWFilterLookupByUUIDString" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> virNWFilterLookupByUUIDString (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> uuidstr)</pre><div class="description"><p>Try to lookup an nwfilter on the given hypervisor based on its UUID.</p><p><a href="libvirt-libvirt-nwfilter.html#virNWFilterFree">virNWFilterFree</a> should be used to free the resources after the nwfilter object is no longer needed.</p></div><dl class="variablelist"><dt>conn</dt><dd>pointer to the hypervisor connection</dd><dt>uuidstr</dt><dd>the string UUID for the nwfilter</dd><dt>Returns</dt><dd>a new nwfilter object or NULL in case of failure. If the nwfilter cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NWFILTER">VIR_ERR_NO_NWFILTER</a> error is raised.</dd></dl><div class="acl"></div><h3><a name="virNWFilterRef" id="virNWFilterRef"><code>virNWFilterRef</code></a><a class="headerlink" href="#virNWFilterRef" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virNWFilterRef (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)</pre><div class="description"><p>Increment the reference count on the nwfilter. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt-nwfilter.html#virNWFilterFree">virNWFilterFree</a> to release the reference count, once the caller no longer needs the reference to this object.</p><p>This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using an nwfilter would increment the reference count.</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>the nwfilter to hold a reference on</dd><dt>Returns</dt><dd>0 in case of success, -1 in case of failure.</dd></dl><div class="acl"></div><h3><a name="virNWFilterUndefine" id="virNWFilterUndefine"><code>virNWFilterUndefine</code></a><a class="headerlink" href="#virNWFilterUndefine" title="Permalink to this headline">¶</a></h3><pre class="api"><span class="type">int</span> virNWFilterUndefine (<span class="type"><a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a></span> nwfilter)</pre><div class="description"><p>Undefine the nwfilter object. This call will not succeed if a running VM is referencing the filter. This does not free the associated <a href="libvirt-libvirt-nwfilter.html#virNWFilterPtr">virNWFilterPtr</a> object.</p></div><dl class="variablelist"><dt>nwfilter</dt><dd>a nwfilter object</dd><dt>Returns</dt><dd>0 in case of success and -1 in case of failure.</dd></dl><div class="acl"></div></div></div><div id="nav"><div id="home"><a href="../index.html">Home</a></div><div id="jumplinks"><ul><li><a href="../downloads.html">Download</a></li><li><a href="../contribute.html">Contribute</a></li><li><a href="../docs.html">Learn</a></li></ul></div><div id="search"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input name="query" type="text" size="12" value="" /><input name="submit" type="submit" value="Go" /></div></form></div></div><div id="footer"><div id="contact"><h3>Contact</h3><ul><li><a href="../contact.html#email">email</a></li><li><a href="../contact.html#irc">irc</a></li></ul></div><div id="community"><h3>Community</h3><ul><li><a href="https://twitter.com/hashtag/libvirt">twitter</a></li><li><a href="https://plus.google.com/communities/109522598353007505282">google+</a></li><li><a href="http://stackoverflow.com/questions/tagged/libvirt">stackoverflow</a></li><li><a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a></li></ul></div><div id="conduct">
Participants in the libvirt project agree to abide by <a href="../governance.html#codeofconduct">the project code of conduct</a></div><br class="clear" /></div></body></html>
|