Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 0a67499d76b7ed32632abafb78e24a2f > files > 141

libvirt-docs-5.5.0-1.3.mga7.armv7hl.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <!--
        This file is autogenerated from html/libvirt-libvirt-nodedev.html.in
        Do not edit this file. Changes will be lost.
      -->
  <!--
        This page was generated at Sun Jun 30 20:35:18 UTC 2019.
      -->
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" type="text/css" href="../main.css"/>
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
    <link rel="manifest" href="/manifest.json"/>
    <meta name="theme-color" content="#ffffff"/>
    <title>libvirt: Module libvirt-nodedev from libvirt</title>
    <meta name="description" content="libvirt, virtualization, virtualization API"/>
    <script type="text/javascript" src="../js/main.js">
      <!--// forces non-empty element-->
    </script>
  </head>
  <body onload="pageload()">
    <div id="body">
      <div id="content">
        <h1>Module libvirt-nodedev from libvirt</h1>
        <p>Provides APIs for the management of nodedevs Copyright (C) 2006-2014 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
        <h2>Table of Contents</h2>
        <h3>
          <a href="#macros">Macros</a>
        </h3>
        <pre class="api"><span class="directive">#define</span> <a href="#VIR_NODE_DEVICE_EVENT_CALLBACK">VIR_NODE_DEVICE_EVENT_CALLBACK</a>
</pre>
        <h3>
          <a href="#types">Types</a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectListAllNodeDeviceFlags">virConnectListAllNodeDeviceFlags</a>
<span class="keyword">typedef</span> <span class="type">struct _virNodeDevice</span> <a href="#virNodeDevice">virNodeDevice</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNodeDeviceEventID">virNodeDeviceEventID</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNodeDeviceEventLifecycleType">virNodeDeviceEventLifecycleType</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevice">virNodeDevice</a> *</span> <a name="virNodeDevicePtr">virNodeDevicePtr</a>
</pre>
        <h3>
          <a href="#functions">Functions</a>
        </h3>
        <pre class="api"><span class="type">int</span>	<a href="#virConnectListAllNodeDevices">virConnectListAllNodeDevices</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a> **</span> devices, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virConnectNodeDeviceEventDeregisterAny">virConnectNodeDeviceEventDeregisterAny</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type">int</span> callbackID)
<span class="keyword">typedef</span> <a href="#virConnectNodeDeviceEventGenericCallback">virConnectNodeDeviceEventGenericCallback</a>
<span class="type">void</span>	<a href="#virConnectNodeDeviceEventGenericCallback">virConnectNodeDeviceEventGenericCallback</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>							 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev, <br/>							 <span class="type">void *</span> opaque)

<span class="keyword">typedef</span> <a href="#virConnectNodeDeviceEventLifecycleCallback">virConnectNodeDeviceEventLifecycleCallback</a>
<span class="type">void</span>	<a href="#virConnectNodeDeviceEventLifecycleCallback">virConnectNodeDeviceEventLifecycleCallback</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>							 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev, <br/>							 <span class="type">int</span> event, <br/>							 <span class="type">int</span> detail, <br/>							 <span class="type">void *</span> opaque)

<span class="type">int</span>	<a href="#virConnectNodeDeviceEventRegisterAny">virConnectNodeDeviceEventRegisterAny</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev, <br/>						 <span class="type">int</span> eventID, <br/>						 <span class="type"><a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventGenericCallback">virConnectNodeDeviceEventGenericCallback</a></span> cb, <br/>						 <span class="type">void *</span> opaque, <br/>						 <span class="type"><a href="libvirt-libvirt-common.html#virFreeCallback">virFreeCallback</a></span> freecb)
<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span>	<a href="#virNodeDeviceCreateXML">virNodeDeviceCreateXML</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type">const char *</span> xmlDesc, <br/>						 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeDeviceDestroy">virNodeDeviceDestroy</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">int</span>	<a href="#virNodeDeviceDetachFlags">virNodeDeviceDetachFlags</a>	(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev, <br/>					 <span class="type">const char *</span> driverName, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeDeviceDettach">virNodeDeviceDettach</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">int</span>	<a href="#virNodeDeviceFree">virNodeDeviceFree</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">const char *</span>	<a href="#virNodeDeviceGetName">virNodeDeviceGetName</a>	(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">const char *</span>	<a href="#virNodeDeviceGetParent">virNodeDeviceGetParent</a>	(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">char *</span>	<a href="#virNodeDeviceGetXMLDesc">virNodeDeviceGetXMLDesc</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeDeviceListCaps">virNodeDeviceListCaps</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev, <br/>					 <span class="type">char ** const</span> names, <br/>					 <span class="type">int</span> maxnames)
<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span>	<a href="#virNodeDeviceLookupByName">virNodeDeviceLookupByName</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-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span>	<a href="#virNodeDeviceLookupSCSIHostByWWN">virNodeDeviceLookupSCSIHostByWWN</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>							 <span class="type">const char *</span> wwnn, <br/>							 <span class="type">const char *</span> wwpn, <br/>							 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeDeviceNumOfCaps">virNodeDeviceNumOfCaps</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">int</span>	<a href="#virNodeDeviceReAttach">virNodeDeviceReAttach</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">int</span>	<a href="#virNodeDeviceRef">virNodeDeviceRef</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">int</span>	<a href="#virNodeDeviceReset">virNodeDeviceReset</a>		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)
<span class="type">int</span>	<a href="#virNodeListDevices">virNodeListDevices</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> cap, <br/>					 <span class="type">char ** const</span> names, <br/>					 <span class="type">int</span> maxnames, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeNumOfDevices">virNodeNumOfDevices</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> cap, <br/>					 <span class="type">unsigned int</span> flags)
</pre>
        <h2>Description</h2>
        <h3>
          <a name="macros">Macros</a>
        </h3>
        <h3>
          <a name="VIR_NODE_DEVICE_EVENT_CALLBACK">
            <code>VIR_NODE_DEVICE_EVENT_CALLBACK</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_DEVICE_EVENT_CALLBACK</pre>
        <div class="description">
          <p>Used to cast the event specific callback into the generic one for use for <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventRegisterAny">virConnectNodeDeviceEventRegisterAny</a>()</p>
        </div>
        <h3>
          <a name="types">Types</a>
        </h3>
        <h3>
          <a name="virConnectListAllNodeDeviceFlags">
            <code>virConnectListAllNodeDeviceFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virConnectListAllNodeDeviceFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM</a>
              </td>
              <td> = </td>
              <td class="enumvalue">1 (0x1; 1 &lt;&lt; 0)</td>
              <td>
                <div class="comment">System capability</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV</a>
              </td>
              <td> = </td>
              <td class="enumvalue">2 (0x2; 1 &lt;&lt; 1)</td>
              <td>
                <div class="comment">PCI device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV</a>
              </td>
              <td> = </td>
              <td class="enumvalue">4 (0x4; 1 &lt;&lt; 2)</td>
              <td>
                <div class="comment">USB device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE">VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE</a>
              </td>
              <td> = </td>
              <td class="enumvalue">8 (0x8; 1 &lt;&lt; 3)</td>
              <td>
                <div class="comment">USB interface</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET">VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET</a>
              </td>
              <td> = </td>
              <td class="enumvalue">16 (0x10; 1 &lt;&lt; 4)</td>
              <td>
                <div class="comment">Network device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST</a>
              </td>
              <td> = </td>
              <td class="enumvalue">32 (0x20; 1 &lt;&lt; 5)</td>
              <td>
                <div class="comment">SCSI Host Bus Adapter</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET</a>
              </td>
              <td> = </td>
              <td class="enumvalue">64 (0x40; 1 &lt;&lt; 6)</td>
              <td>
                <div class="comment">SCSI Target</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI</a>
              </td>
              <td> = </td>
              <td class="enumvalue">128 (0x80; 1 &lt;&lt; 7)</td>
              <td>
                <div class="comment">SCSI device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE">VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE</a>
              </td>
              <td> = </td>
              <td class="enumvalue">256 (0x100; 1 &lt;&lt; 8)</td>
              <td>
                <div class="comment">Storage device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST">VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST</a>
              </td>
              <td> = </td>
              <td class="enumvalue">512 (0x200; 1 &lt;&lt; 9)</td>
              <td>
                <div class="comment">FC Host Bus Adapter</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS">VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS</a>
              </td>
              <td> = </td>
              <td class="enumvalue">1024 (0x400; 1 &lt;&lt; 10)</td>
              <td>
                <div class="comment">Capable of vport</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC</a>
              </td>
              <td> = </td>
              <td class="enumvalue">2048 (0x800; 1 &lt;&lt; 11)</td>
              <td>
                <div class="comment">Capable of scsi_generic</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM">VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM</a>
              </td>
              <td> = </td>
              <td class="enumvalue">4096 (0x1000; 1 &lt;&lt; 12)</td>
              <td>
                <div class="comment">DRM device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES">VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES</a>
              </td>
              <td> = </td>
              <td class="enumvalue">8192 (0x2000; 1 &lt;&lt; 13)</td>
              <td>
                <div class="comment">Capable of mediated devices</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV</a>
              </td>
              <td> = </td>
              <td class="enumvalue">16384 (0x4000; 1 &lt;&lt; 14)</td>
              <td>
                <div class="comment">Mediated device</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV</a>
              </td>
              <td> = </td>
              <td class="enumvalue">32768 (0x8000; 1 &lt;&lt; 15)</td>
              <td>
                <div class="comment">CCW device</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virNodeDevice">
            <code>virNodeDevice</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virNodeDevice {
</pre>
          <div class="undisclosed">The content of this structure is not made public by the API</div>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virNodeDeviceEventID">
            <code>virNodeDeviceEventID</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virNodeDeviceEventID {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE">VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE</a>
              </td>
              <td> = </td>
              <td class="enumvalue">0 (0x0)</td>
              <td>
                <div class="comment">
                  <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventLifecycleCallback">virConnectNodeDeviceEventLifecycleCallback</a>
                </div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_DEVICE_EVENT_ID_UPDATE">VIR_NODE_DEVICE_EVENT_ID_UPDATE</a>
              </td>
              <td> = </td>
              <td class="enumvalue">1 (0x1)</td>
              <td>
                <div class="comment">
                  <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventGenericCallback">virConnectNodeDeviceEventGenericCallback</a>
                </div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_DEVICE_EVENT_ID_LAST">VIR_NODE_DEVICE_EVENT_ID_LAST</a>
              </td>
              <td> = </td>
              <td class="enumvalue">2 (0x2)</td>
              <td>
                <div class="comment">NB: this enum value will increase over time as new events are added to the libvirt API. It reflects the last event ID supported by this version of the libvirt API.</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virNodeDeviceEventLifecycleType">
            <code>virNodeDeviceEventLifecycleType</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virNodeDeviceEventLifecycleType {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_NODE_DEVICE_EVENT_CREATED">VIR_NODE_DEVICE_EVENT_CREATED</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">0 (0x0)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_DEVICE_EVENT_DELETED">VIR_NODE_DEVICE_EVENT_DELETED</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">1 (0x1)</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_DEVICE_EVENT_LAST">VIR_NODE_DEVICE_EVENT_LAST</a>
              </td>
              <td> = </td>
              <td colspan="2" class="enumvalue">2 (0x2)</td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="functions">Functions</a>
        </h3>
        <h3>
          <a name="virConnectListAllNodeDevices">
            <code>virConnectListAllNodeDevices</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectListAllNodeDevices	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a> **</span> devices,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of node devices, and allocate an array to store those objects.</p>
          <p>Normally, all node devices are returned; however, @flags can be used to filter the results for a smaller list of targeted node devices. The valid flags are divided into groups, where each group contains bits that describe mutually exclusive attributes of a node device, and where all bits within a group describe all possible node devices.</p>
          <p>Only one group of the @flags is provided to filter the node devices by capability type, flags include: <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE">VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET">VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE">VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST">VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS">VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC">VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM">VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES">VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV</a> <a href="libvirt-libvirt-nodedev.html#VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV">VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV</a></p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>Pointer to the hypervisor connection.</dd>
          <dt>devices</dt>
          <dd>Pointer to a variable to store the array containing the node device objects or NULL if the list is not required (just returns number of node devices).</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-nodedev.html#virConnectListAllNodeDeviceFlags">virConnectListAllNodeDeviceFlags</a>.</dd>
          <dt>Returns</dt>
          <dd>the number of node devices found or -1 and sets @devices to NULL in case of error. On success, the array stored into @devices 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-nodedev.html#virNodeDeviceFree">virNodeDeviceFree</a>() on each array element, then calling free() on @devices.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectNodeDeviceEventDeregisterAny">
            <code>virConnectNodeDeviceEventDeregisterAny</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectNodeDeviceEventDeregisterAny	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type">int</span> callbackID)</pre>
        <div class="description">
          <p>Removes an event callback. The callbackID parameter should be the value obtained from a previous <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventRegisterAny">virConnectNodeDeviceEventRegisterAny</a>() method.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection</dd>
          <dt>callbackID</dt>
          <dd>the callback identifier</dd>
          <dt>Returns</dt>
          <dd>0 on success, -1 on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectNodeDeviceEventGenericCallback">
            <code>virConnectNodeDeviceEventGenericCallback</code>
          </a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">void</span>	(*virConnectNodeDeviceEventGenericCallback)	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
							 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev,
							 <span class="type">void *</span> opaque)
</pre>
        <div class="description">
          <p>A generic node device event callback handler, for use with <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventRegisterAny">virConnectNodeDeviceEventRegisterAny</a>(). Specific events usually have a customization with extra parameters, often with @opaque being passed in a different parameter position; use <a href="libvirt-libvirt-nodedev.html#VIR_NODE_DEVICE_EVENT_CALLBACK">VIR_NODE_DEVICE_EVENT_CALLBACK</a>() when registering an appropriate handler.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>the connection pointer</dd>
          <dt>dev</dt>
          <dd>the node device pointer</dd>
          <dt>opaque</dt>
          <dd>application specified data</dd>
        </dl>
        <br/>
        <h3>
          <a name="virConnectNodeDeviceEventLifecycleCallback">
            <code>virConnectNodeDeviceEventLifecycleCallback</code>
          </a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">void</span>	(*virConnectNodeDeviceEventLifecycleCallback)	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
							 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev,
							 <span class="type">int</span> event,
							 <span class="type">int</span> detail,
							 <span class="type">void *</span> opaque)
</pre>
        <div class="description">
          <p>This callback is called when a node device lifecycle action is performed, like added or removed.</p>
          <p>The callback signature to use when registering for an event of type <a href="libvirt-libvirt-nodedev.html#VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE">VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE</a> with <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventRegisterAny">virConnectNodeDeviceEventRegisterAny</a>()</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>connection object</dd>
          <dt>dev</dt>
          <dd>node device on which the event occurred</dd>
          <dt>event</dt>
          <dd>The specific virNodeDeviceEventLifeCycleType which occurred</dd>
          <dt>detail</dt>
          <dd>contains some details on the reason of the event.</dd>
          <dt>opaque</dt>
          <dd>application specified data</dd>
        </dl>
        <br/>
        <h3>
          <a name="virConnectNodeDeviceEventRegisterAny">
            <code>virConnectNodeDeviceEventRegisterAny</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectNodeDeviceEventRegisterAny	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev,
						 <span class="type">int</span> eventID,
						 <span class="type"><a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventGenericCallback">virConnectNodeDeviceEventGenericCallback</a></span> cb,
						 <span class="type">void *</span> opaque,
						 <span class="type"><a href="libvirt-libvirt-common.html#virFreeCallback">virFreeCallback</a></span> freecb)</pre>
        <div class="description">
          <p>Adds a callback to receive notifications of arbitrary node device events occurring on a node device. This function requires that an event loop has been previously registered with <a href="libvirt-libvirt-event.html#virEventRegisterImpl">virEventRegisterImpl</a>() or <a href="libvirt-libvirt-event.html#virEventRegisterDefaultImpl">virEventRegisterDefaultImpl</a>().</p>
          <p>If @dev is NULL, then events will be monitored for any node device. If @dev is non-NULL, then only the specific node device will be monitored.</p>
          <p>Most types of events have a callback providing a custom set of parameters for the event. When registering an event, it is thus necessary to use the <a href="libvirt-libvirt-nodedev.html#VIR_NODE_DEVICE_EVENT_CALLBACK">VIR_NODE_DEVICE_EVENT_CALLBACK</a>() macro to cast the supplied function pointer to match the signature of this method.</p>
          <p>The <a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the node device object after the callback returns, it shall take a reference to it, by calling <a href="libvirt-libvirt-nodedev.html#virNodeDeviceRef">virNodeDeviceRef</a>(). The reference can be released once the object is no longer required by calling <a href="libvirt-libvirt-nodedev.html#virNodeDeviceFree">virNodeDeviceFree</a>().</p>
          <p>The return value from this method is a positive integer identifier for the callback. To unregister a callback, this callback ID should be passed to the <a href="libvirt-libvirt-nodedev.html#virConnectNodeDeviceEventDeregisterAny">virConnectNodeDeviceEventDeregisterAny</a>() method.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection</dd>
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>eventID</dt>
          <dd>the event type to receive</dd>
          <dt>cb</dt>
          <dd>callback to the function handling node device events</dd>
          <dt>opaque</dt>
          <dd>opaque data to pass on to the callback</dd>
          <dt>freecb</dt>
          <dd>optional function to deallocate opaque when not used anymore</dd>
          <dt>Returns</dt>
          <dd>a callback identifier on success, -1 on failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceCreateXML">
            <code>virNodeDeviceCreateXML</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span>	virNodeDeviceCreateXML	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type">const char *</span> xmlDesc,
						 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.</p>
          <p><a href="libvirt-libvirt-nodedev.html#virNodeDeviceFree">virNodeDeviceFree</a> should be used to free the resources after the node device object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>xmlDesc</dt>
          <dd>string containing an XML description of the device to be created</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>a node device object if successful, NULL in case of failure</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceDestroy">
            <code>virNodeDeviceDestroy</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceDestroy		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Destroy the device object. The virtual device (only works for vHBA currently) is removed from the host operating system. This function may require privileged access.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>a device object</dd>
          <dt>Returns</dt>
          <dd>0 in case of success and -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceDetachFlags">
            <code>virNodeDeviceDetachFlags</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceDetachFlags	(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev,
					 <span class="type">const char *</span> driverName,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Detach the node device from the node itself so that it may be assigned to a guest domain.</p>
          <p>Depending on the hypervisor, this may involve operations such as unbinding any device drivers from the device, binding the device to a dummy device driver and resetting the device. Different backend drivers expect the device to be bound to different dummy devices. For example, QEMU's "kvm" backend driver (the default) expects the device to be bound to "pci-stub", but its "vfio" backend driver expects the device to be bound to "vfio-pci".</p>
          <p>If the device is currently in use by the node, this method may fail.</p>
          <p>Once the device is not assigned to any guest, it may be re-attached to the node using the <a href="libvirt-libvirt-nodedev.html#virNodeDeviceReAttach">virNodeDeviceReAttach</a>() method.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>driverName</dt>
          <dd>name of backend driver that will be used for later device assignment to a domain. NULL means "use the hypervisor default driver"</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceDettach">
            <code>virNodeDeviceDettach</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceDettach		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Dettach the node device from the node itself so that it may be assigned to a guest domain.</p>
          <p>Depending on the hypervisor, this may involve operations such as unbinding any device drivers from the device, binding the device to a dummy device driver and resetting the device.</p>
          <p>If the device is currently in use by the node, this method may fail.</p>
          <p>Once the device is not assigned to any guest, it may be re-attached to the node using the virNodeDeviceReattach() method.</p>
          <p>If the caller needs control over which backend driver will be used during PCI device assignment (to use something other than the default, for example VFIO), the newer <a href="libvirt-libvirt-nodedev.html#virNodeDeviceDetachFlags">virNodeDeviceDetachFlags</a>() API should be used instead.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceFree">
            <code>virNodeDeviceFree</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceFree		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Drops a reference to the node device, freeing it if this was the last reference.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>Returns</dt>
          <dd>the 0 for success, -1 for error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceGetName">
            <code>virNodeDeviceGetName</code>
          </a>
        </h3>
        <pre class="api"><span class="type">const char *</span>	virNodeDeviceGetName	(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Just return the device name</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>the device</dd>
          <dt>Returns</dt>
          <dd>the device name or NULL in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceGetParent">
            <code>virNodeDeviceGetParent</code>
          </a>
        </h3>
        <pre class="api"><span class="type">const char *</span>	virNodeDeviceGetParent	(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Accessor for the parent of the device</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>the device</dd>
          <dt>Returns</dt>
          <dd>the name of the device's parent, or NULL if an error occurred or when the device has no parent.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceGetXMLDesc">
            <code>virNodeDeviceGetXMLDesc</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virNodeDeviceGetXMLDesc		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Fetch an XML document describing all aspects of the device.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the XML document, or NULL on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceListCaps">
            <code>virNodeDeviceListCaps</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceListCaps		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev,
					 <span class="type">char ** const</span> names,
					 <span class="type">int</span> maxnames)</pre>
        <div class="description">
          <p>Lists the names of the capabilities supported by the device.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>the device</dd>
          <dt>names</dt>
          <dd>array to collect the list of capability names</dd>
          <dt>maxnames</dt>
          <dd>size of @names</dd>
          <dt>Returns</dt>
          <dd>the number of capability names listed in @names or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceLookupByName">
            <code>virNodeDeviceLookupByName</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span>	virNodeDeviceLookupByName	(<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>Lookup a node device by its name.</p>
          <p><a href="libvirt-libvirt-nodedev.html#virNodeDeviceFree">virNodeDeviceFree</a> should be used to free the resources after the node device object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>name</dt>
          <dd>unique device name</dd>
          <dt>Returns</dt>
          <dd>a <a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a> if found, NULL otherwise.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceLookupSCSIHostByWWN">
            <code>virNodeDeviceLookupSCSIHostByWWN</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span>	virNodeDeviceLookupSCSIHostByWWN	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
							 <span class="type">const char *</span> wwnn,
							 <span class="type">const char *</span> wwpn,
							 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Lookup SCSI Host which is capable with 'fc_host' by its WWNN and WWPN.</p>
          <p><a href="libvirt-libvirt-nodedev.html#virNodeDeviceFree">virNodeDeviceFree</a> should be used to free the resources after the node device object is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>wwnn</dt>
          <dd>WWNN of the SCSI Host.</dd>
          <dt>wwpn</dt>
          <dd>WWPN of the SCSI Host.</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>a <a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a> if found, NULL otherwise.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceNumOfCaps">
            <code>virNodeDeviceNumOfCaps</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceNumOfCaps		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Accessor for the number of capabilities supported by the device.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>the device</dd>
          <dt>Returns</dt>
          <dd>the number of capabilities supported by the device or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceReAttach">
            <code>virNodeDeviceReAttach</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceReAttach		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Re-attach a previously detached node device to the node so that it may be used by the node again.</p>
          <p>Depending on the hypervisor, this may involve operations such as resetting the device, unbinding it from a dummy device driver and binding it to its appropriate driver.</p>
          <p>If the device is currently in use by a guest, this method may fail.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeDeviceRef">
            <code>virNodeDeviceRef</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceRef		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt-nodedev.html#virNodeDeviceFree">virNodeDeviceFree</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 a dev would increment the reference count.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>the dev 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"/>
        <h3>
          <a name="virNodeDeviceReset">
            <code>virNodeDeviceReset</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeDeviceReset		(<span class="type"><a href="libvirt-libvirt-nodedev.html#virNodeDevicePtr">virNodeDevicePtr</a></span> dev)</pre>
        <div class="description">
          <p>Reset a previously detached node device to the node before or after assigning it to a guest.</p>
          <p>The exact reset semantics depends on the hypervisor and device type but, for example, KVM will attempt to reset PCI devices with a Function Level Reset, Secondary Bus Reset or a Power Management D-State reset.</p>
          <p>If the reset will affect other devices which are currently in use, this function may fail.</p>
        </div>
        <dl class="variablelist">
          <dt>dev</dt>
          <dd>pointer to the node device</dd>
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeListDevices">
            <code>virNodeListDevices</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeListDevices		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> cap,
					 <span class="type">char ** const</span> names,
					 <span class="type">int</span> maxnames,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Collect the list of node devices, and store their names in @names</p>
          <p>For more control over the results, see <a href="libvirt-libvirt-nodedev.html#virConnectListAllNodeDevices">virConnectListAllNodeDevices</a>().</p>
          <p>If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>cap</dt>
          <dd>capability name</dd>
          <dt>names</dt>
          <dd>array to collect the list of node device names</dd>
          <dt>maxnames</dt>
          <dd>size of @names</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the number of node devices found or -1 in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeNumOfDevices">
            <code>virNodeNumOfDevices</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeNumOfDevices		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> cap,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Provides the number of node devices.</p>
          <p>If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>cap</dt>
          <dd>capability name</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the number of node devices or -1 in case of error</dd>
        </dl>
        <div class="acl"/>
      </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">Docs</a>
          </li>
        </ul>
      </div>
      <div id="search">
        <form id="simplesearch" action="https://www.google.com/search" enctype="application/x-www-form-urlencoded" method="get">
          <div>
            <input id="searchsite" name="sitesearch" type="hidden" value="libvirt.org"/>
            <input id="searchq" name="q" type="text" size="12" value=""/>
            <input name="submit" type="submit" value="Go"/>
          </div>
        </form>
        <div id="advancedsearch">
          <span>
            <input type="radio" name="what" id="whatwebsite" checked="checked" value="website"/>
            <label for="whatwebsite">Website</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatwiki" value="wiki"/>
            <label for="whatwiki">Wiki</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatdevs" value="devs"/>
            <label for="whatdevs">Developers list</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatusers" value="users"/>
            <label for="whatusers">Users list</label>
          </span>
        </div>
      </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="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>