File: libvirt-libvirt-host.html

package info (click to toggle)
libvirt 5.0.0-4%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 251,264 kB
  • sloc: ansic: 573,843; xml: 168,347; sh: 9,976; python: 4,883; perl: 3,953; makefile: 3,323; ml: 465
file content (2203 lines) | stat: -rw-r--r-- 125,461 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
<?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-host.html.in
        Do not edit this file. Changes will be lost.
      -->
  <!--
        This page was generated at Thu Jan 10 20:48: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-host from libvirt</title>
    <meta name="description" content="libvirt, virtualization, virtualization API"/>
    <script type="text/javascript">
      <!--
          
      function init() {
          window.addEventListener('scroll', function(e){
              var distanceY = window.pageYOffset || document.documentElement.scrollTop,
              shrinkOn = 94
              home = document.getElementById("home");
              links = document.getElementById("jumplinks");
              search = document.getElementById("search");
              body = document.getElementById("body");
              if (distanceY > shrinkOn) {
                  if (home.className != "navhide") {
                      body.className = "navhide"
                      home.className = "navhide"
                      links.className = "navhide"
                      search.className = "navhide"
                  }
              } else {
                  if (home.className == "navhide") {
                      body.className = ""
                      home.className = ""
                      links.className = ""
                      search.className = ""
                  }
              }
          });
      }
      window.onload = init();
           
          -->
    </script>
  </head>
  <body>
    <div id="body">
      <div id="content">
        <h1>Module libvirt-host from libvirt</h1>
        <p>Provides APIs for the management of hosts 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_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_FIELD_LENGTH">VIR_NODE_CPU_STATS_FIELD_LENGTH</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_IDLE">VIR_NODE_CPU_STATS_IDLE</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_INTR">VIR_NODE_CPU_STATS_INTR</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_IOWAIT">VIR_NODE_CPU_STATS_IOWAIT</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_KERNEL">VIR_NODE_CPU_STATS_KERNEL</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_USER">VIR_NODE_CPU_STATS_USER</a>
<span class="directive">#define</span> <a href="#VIR_NODE_CPU_STATS_UTILIZATION">VIR_NODE_CPU_STATS_UTILIZATION</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_FULL_SCANS">VIR_NODE_MEMORY_SHARED_FULL_SCANS</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES">VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_PAGES_SHARED">VIR_NODE_MEMORY_SHARED_PAGES_SHARED</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_PAGES_SHARING">VIR_NODE_MEMORY_SHARED_PAGES_SHARING</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN">VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED">VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE">VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS">VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_STATS_BUFFERS">VIR_NODE_MEMORY_STATS_BUFFERS</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_STATS_CACHED">VIR_NODE_MEMORY_STATS_CACHED</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_STATS_FIELD_LENGTH">VIR_NODE_MEMORY_STATS_FIELD_LENGTH</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_STATS_FREE">VIR_NODE_MEMORY_STATS_FREE</a>
<span class="directive">#define</span> <a href="#VIR_NODE_MEMORY_STATS_TOTAL">VIR_NODE_MEMORY_STATS_TOTAL</a>
<span class="directive">#define</span> <a href="#VIR_NODE_SEV_CBITPOS">VIR_NODE_SEV_CBITPOS</a>
<span class="directive">#define</span> <a href="#VIR_NODE_SEV_CERT_CHAIN">VIR_NODE_SEV_CERT_CHAIN</a>
<span class="directive">#define</span> <a href="#VIR_NODE_SEV_PDH">VIR_NODE_SEV_PDH</a>
<span class="directive">#define</span> <a href="#VIR_NODE_SEV_REDUCED_PHYS_BITS">VIR_NODE_SEV_REDUCED_PHYS_BITS</a>
<span class="directive">#define</span> <a href="#VIR_SECURITY_DOI_BUFLEN">VIR_SECURITY_DOI_BUFLEN</a>
<span class="directive">#define</span> <a href="#VIR_SECURITY_LABEL_BUFLEN">VIR_SECURITY_LABEL_BUFLEN</a>
<span class="directive">#define</span> <a href="#VIR_SECURITY_MODEL_BUFLEN">VIR_SECURITY_MODEL_BUFLEN</a>
<span class="directive">#define</span> <a href="#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a>
<span class="directive">#define</span> <a href="#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a>
</pre>
        <h3>
          <a href="#types">Types</a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virCPUCompareResult">virCPUCompareResult</a>
<span class="keyword">typedef</span> <span class="type">struct _virConnect</span> <a href="#virConnect">virConnect</a>
<span class="keyword">typedef</span> <span class="type">struct _virConnectAuth</span> <a href="#virConnectAuth">virConnectAuth</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virConnectAuth">virConnectAuth</a> *</span> <a name="virConnectAuthPtr">virConnectAuthPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectBaselineCPUFlags">virConnectBaselineCPUFlags</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectCompareCPUFlags">virConnectCompareCPUFlags</a>
<span class="keyword">typedef</span> <span class="type">struct _virConnectCredential</span> <a href="#virConnectCredential">virConnectCredential</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virConnectCredential">virConnectCredential</a> *</span> <a name="virConnectCredentialPtr">virConnectCredentialPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectCredentialType">virConnectCredentialType</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectFlags">virConnectFlags</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> *</span> <a name="virConnectPtr">virConnectPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNodeAllocPagesFlags">virNodeAllocPagesFlags</a>
<span class="keyword">typedef</span> <span class="type">struct _virNodeCPUStats</span> <a href="#virNodeCPUStats">virNodeCPUStats</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virNodeCPUStats">virNodeCPUStats</a> *</span> <a name="virNodeCPUStatsPtr">virNodeCPUStatsPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNodeGetCPUStatsAllCPUs">virNodeGetCPUStatsAllCPUs</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNodeGetMemoryStatsAllCells">virNodeGetMemoryStatsAllCells</a>
<span class="keyword">typedef</span> <span class="type">struct _virNodeInfo</span> <a href="#virNodeInfo">virNodeInfo</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virNodeInfo">virNodeInfo</a> *</span> <a name="virNodeInfoPtr">virNodeInfoPtr</a>
<span class="keyword">typedef</span> <span class="type">struct _virNodeMemoryStats</span> <a href="#virNodeMemoryStats">virNodeMemoryStats</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virNodeMemoryStats">virNodeMemoryStats</a> *</span> <a name="virNodeMemoryStatsPtr">virNodeMemoryStatsPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNodeSuspendTarget">virNodeSuspendTarget</a>
<span class="keyword">typedef</span> <span class="type">struct _virSecurityLabel</span> <a href="#virSecurityLabel">virSecurityLabel</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virSecurityLabel">virSecurityLabel</a> *</span> <a name="virSecurityLabelPtr">virSecurityLabelPtr</a>
<span class="keyword">typedef</span> <span class="type">struct _virSecurityModel</span> <a href="#virSecurityModel">virSecurityModel</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virSecurityModel">virSecurityModel</a> *</span> <a name="virSecurityModelPtr">virSecurityModelPtr</a>
<span class="keyword">typedef</span> <span class="type">struct _virStream</span> <a href="#virStream">virStream</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-host.html#virStream">virStream</a> *</span> <a name="virStreamPtr">virStreamPtr</a>
</pre>
        <h3>
          <a href="#functions">Functions</a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <a href="#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a>
<span class="type">int</span>	<a href="#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectCredentialPtr">virConnectCredentialPtr</a></span> cred, <br/>					 <span class="type">unsigned int</span> ncred, <br/>					 <span class="type">void *</span> cbdata)

<span class="type">char *</span>	<a href="#virConnectBaselineCPU">virConnectBaselineCPU</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char **</span> xmlCPUs, <br/>					 <span class="type">unsigned int</span> ncpus, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">char *</span>	<a href="#virConnectBaselineHypervisorCPU">virConnectBaselineHypervisorCPU</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> emulator, <br/>					 <span class="type">const char *</span> arch, <br/>					 <span class="type">const char *</span> machine, <br/>					 <span class="type">const char *</span> virttype, <br/>					 <span class="type">const char **</span> xmlCPUs, <br/>					 <span class="type">unsigned int</span> ncpus, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virConnectClose">virConnectClose</a>			(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="keyword">typedef</span> <a href="#virConnectCloseFunc">virConnectCloseFunc</a>
<span class="type">void</span>	<a href="#virConnectCloseFunc">virConnectCloseFunc</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">int</span> reason, <br/>					 <span class="type">void *</span> opaque)

<span class="type">int</span>	<a href="#virConnectCompareCPU">virConnectCompareCPU</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="#virConnectCompareHypervisorCPU">virConnectCompareHypervisorCPU</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> emulator, <br/>					 <span class="type">const char *</span> arch, <br/>					 <span class="type">const char *</span> machine, <br/>					 <span class="type">const char *</span> virttype, <br/>					 <span class="type">const char *</span> xmlCPU, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virConnectGetCPUModelNames">virConnectGetCPUModelNames</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> arch, <br/>					 <span class="type">char ** *</span> models, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">char *</span>	<a href="#virConnectGetCapabilities">virConnectGetCapabilities</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">char *</span>	<a href="#virConnectGetHostname">virConnectGetHostname</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virConnectGetLibVersion">virConnectGetLibVersion</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned long *</span> libVer)
<span class="type">int</span>	<a href="#virConnectGetMaxVcpus">virConnectGetMaxVcpus</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">const char *</span> type)
<span class="type">char *</span>	<a href="#virConnectGetSysinfo">virConnectGetSysinfo</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">const char *</span>	<a href="#virConnectGetType">virConnectGetType</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">char *</span>	<a href="#virConnectGetURI">virConnectGetURI</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virConnectGetVersion">virConnectGetVersion</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned long *</span> hvVer)
<span class="type">int</span>	<a href="#virConnectIsAlive">virConnectIsAlive</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virConnectIsEncrypted">virConnectIsEncrypted</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virConnectIsSecure">virConnectIsSecure</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	<a href="#virConnectOpen">virConnectOpen</a>		(<span class="type">const char *</span> name)
<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	<a href="#virConnectOpenAuth">virConnectOpenAuth</a>	(<span class="type">const char *</span> name, <br/>					 <span class="type"><a href="libvirt-libvirt-host.html#virConnectAuthPtr">virConnectAuthPtr</a></span> auth, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	<a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a>	(<span class="type">const char *</span> name)
<span class="type">int</span>	<a href="#virConnectRef">virConnectRef</a>			(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virConnectRegisterCloseCallback">virConnectRegisterCloseCallback</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-host.html#virConnectCloseFunc">virConnectCloseFunc</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">int</span>	<a href="#virConnectSetKeepAlive">virConnectSetKeepAlive</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">int</span> interval, <br/>					 <span class="type">unsigned int</span> count)
<span class="type">int</span>	<a href="#virConnectUnregisterCloseCallback">virConnectUnregisterCloseCallback</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>						 <span class="type"><a href="libvirt-libvirt-host.html#virConnectCloseFunc">virConnectCloseFunc</a></span> cb)
<span class="type">int</span>	<a href="#virGetVersion">virGetVersion</a>			(<span class="type">unsigned long *</span> libVer, <br/>					 <span class="type">const char *</span> type, <br/>					 <span class="type">unsigned long *</span> typeVer)
<span class="type">int</span>	<a href="#virInitialize">virInitialize</a>			(<span class="type">void</span>)
<span class="type">int</span>	<a href="#virNodeAllocPages">virNodeAllocPages</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned int</span> npages, <br/>					 <span class="type">unsigned int *</span> pageSizes, <br/>					 <span class="type">unsigned long long *</span> pageCounts, <br/>					 <span class="type">int</span> startCell, <br/>					 <span class="type">unsigned int</span> cellCount, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetCPUMap">virNodeGetCPUMap</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned char **</span> cpumap, <br/>					 <span class="type">unsigned int *</span> online, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetCPUStats">virNodeGetCPUStats</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">int</span> cpuNum, <br/>					 <span class="type"><a href="libvirt-libvirt-host.html#virNodeCPUStatsPtr">virNodeCPUStatsPtr</a></span> params, <br/>					 <span class="type">int *</span> nparams, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetCellsFreeMemory">virNodeGetCellsFreeMemory</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned long long *</span> freeMems, <br/>					 <span class="type">int</span> startCell, <br/>					 <span class="type">int</span> maxCells)
<span class="type">unsigned long long</span>	<a href="#virNodeGetFreeMemory">virNodeGetFreeMemory</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span>	<a href="#virNodeGetFreePages">virNodeGetFreePages</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned int</span> npages, <br/>					 <span class="type">unsigned int *</span> pages, <br/>					 <span class="type">int</span> startCell, <br/>					 <span class="type">unsigned int</span> cellCount, <br/>					 <span class="type">unsigned long long *</span> counts, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetInfo">virNodeGetInfo</a>			(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-host.html#virNodeInfoPtr">virNodeInfoPtr</a></span> info)
<span class="type">int</span>	<a href="#virNodeGetMemoryParameters">virNodeGetMemoryParameters</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-common.html#virTypedParameterPtr">virTypedParameterPtr</a></span> params, <br/>					 <span class="type">int *</span> nparams, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetMemoryStats">virNodeGetMemoryStats</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">int</span> cellNum, <br/>					 <span class="type"><a href="libvirt-libvirt-host.html#virNodeMemoryStatsPtr">virNodeMemoryStatsPtr</a></span> params, <br/>					 <span class="type">int *</span> nparams, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetSEVInfo">virNodeGetSEVInfo</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-common.html#virTypedParameterPtr">virTypedParameterPtr</a> *</span> params, <br/>					 <span class="type">int *</span> nparams, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeGetSecurityModel">virNodeGetSecurityModel</a>		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-host.html#virSecurityModelPtr">virSecurityModelPtr</a></span> secmodel)
<span class="type">int</span>	<a href="#virNodeSetMemoryParameters">virNodeSetMemoryParameters</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type"><a href="libvirt-libvirt-common.html#virTypedParameterPtr">virTypedParameterPtr</a></span> params, <br/>					 <span class="type">int</span> nparams, <br/>					 <span class="type">unsigned int</span> flags)
<span class="type">int</span>	<a href="#virNodeSuspendForDuration">virNodeSuspendForDuration</a>	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/>					 <span class="type">unsigned int</span> target, <br/>					 <span class="type">unsigned long long</span> duration, <br/>					 <span class="type">unsigned int</span> flags)
</pre>
        <h2>Description</h2>
        <h3>
          <a name="macros">Macros</a>
        </h3>
        <h3>
          <a name="VIR_NODEINFO_MAXCPUS">
            <code>VIR_NODEINFO_MAXCPUS</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODEINFO_MAXCPUS</pre>
        <div class="description">
          <p>This macro is to calculate the total number of CPUs supported but not necessary active in the host.</p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_FIELD_LENGTH">
            <code>VIR_NODE_CPU_STATS_FIELD_LENGTH</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_FIELD_LENGTH</pre>
        <div class="description">
          <p>Macro providing the field length of <a href="libvirt-libvirt-host.html#virNodeCPUStats">virNodeCPUStats</a></p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_IDLE">
            <code>VIR_NODE_CPU_STATS_IDLE</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_IDLE</pre>
        <div class="description">
          <p>The cumulative idle CPU time, since the node booting up (in nanoseconds).</p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_INTR">
            <code>VIR_NODE_CPU_STATS_INTR</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_INTR</pre>
        <div class="description">
          <p>The cumulative interrupt CPU time, since the node booting up (in nanoseconds).</p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_IOWAIT">
            <code>VIR_NODE_CPU_STATS_IOWAIT</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_IOWAIT</pre>
        <div class="description">
          <p>The cumulative I/O wait CPU time, since the node booting up (in nanoseconds).</p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_KERNEL">
            <code>VIR_NODE_CPU_STATS_KERNEL</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_KERNEL</pre>
        <div class="description">
          <p>Macro for the cumulative CPU time which was spent by the kernel, since the node booting up (in nanoseconds).</p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_USER">
            <code>VIR_NODE_CPU_STATS_USER</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_USER</pre>
        <div class="description">
          <p>The cumulative CPU time which was spent by user processes, since the node booting up (in nanoseconds).</p>
        </div>
        <h3>
          <a name="VIR_NODE_CPU_STATS_UTILIZATION">
            <code>VIR_NODE_CPU_STATS_UTILIZATION</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_CPU_STATS_UTILIZATION</pre>
        <div class="description">
          <p>The CPU utilization of a node. The usage value is in percent and 100% represents all CPUs of the node.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_FULL_SCANS">
            <code>VIR_NODE_MEMORY_SHARED_FULL_SCANS</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_FULL_SCANS</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many times all mergeable areas have been scanned.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES">
            <code>VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES</pre>
        <div class="description">
          <p>Macro for typed parameter that represents whether pages from different NUMA nodes can be merged. The parameter has type int, when its value is 0, only pages which physically reside in the memory area of same NUMA node are merged; When its value is 1, pages from all nodes can be merged. Other values are reserved for future use.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_PAGES_SHARED">
            <code>VIR_NODE_MEMORY_SHARED_PAGES_SHARED</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_PAGES_SHARED</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many the shared memory pages are being used.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_PAGES_SHARING">
            <code>VIR_NODE_MEMORY_SHARED_PAGES_SHARING</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_PAGES_SHARING</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many sites are sharing the pages i.e. how much saved.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN">
            <code>VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many present pages to scan before the shared memory service goes to sleep.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED">
            <code>VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many pages unique but repeatedly checked for merging.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE">
            <code>VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many pages changing too fast to be placed in a tree.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS">
            <code>VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS</pre>
        <div class="description">
          <p>Macro for typed parameter that represents how many milliseconds the shared memory service should sleep before next scan.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_STATS_BUFFERS">
            <code>VIR_NODE_MEMORY_STATS_BUFFERS</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_STATS_BUFFERS</pre>
        <div class="description">
          <p>Macro for the buffer memory: On Linux, it is only returned in case of <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_ALL_CELLS">VIR_NODE_MEMORY_STATS_ALL_CELLS</a>.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_STATS_CACHED">
            <code>VIR_NODE_MEMORY_STATS_CACHED</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_STATS_CACHED</pre>
        <div class="description">
          <p>Macro for the cached memory: On Linux, it is only returned in case of <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_ALL_CELLS">VIR_NODE_MEMORY_STATS_ALL_CELLS</a>.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_STATS_FIELD_LENGTH">
            <code>VIR_NODE_MEMORY_STATS_FIELD_LENGTH</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_STATS_FIELD_LENGTH</pre>
        <div class="description">
          <p>Macro providing the field length of <a href="libvirt-libvirt-host.html#virNodeMemoryStats">virNodeMemoryStats</a></p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_STATS_FREE">
            <code>VIR_NODE_MEMORY_STATS_FREE</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_STATS_FREE</pre>
        <div class="description">
          <p>Macro for the free memory of specified cell: On Linux, it includes buffer and cached memory, in case of <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_ALL_CELLS">VIR_NODE_MEMORY_STATS_ALL_CELLS</a>.</p>
        </div>
        <h3>
          <a name="VIR_NODE_MEMORY_STATS_TOTAL">
            <code>VIR_NODE_MEMORY_STATS_TOTAL</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_MEMORY_STATS_TOTAL</pre>
        <div class="description">
          <p>Macro for the total memory of specified cell: it represents the maximum memory.</p>
        </div>
        <h3>
          <a name="VIR_NODE_SEV_CBITPOS">
            <code>VIR_NODE_SEV_CBITPOS</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_SEV_CBITPOS</pre>
        <div class="description">
          <p>Macro represents the CBit Position used by hypervisor when SEV is enabled.</p>
        </div>
        <h3>
          <a name="VIR_NODE_SEV_CERT_CHAIN">
            <code>VIR_NODE_SEV_CERT_CHAIN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_SEV_CERT_CHAIN</pre>
        <div class="description">
          <p>Macro represents the platform certificate chain that includes the platform endorsement key (PEK), owner certificate authority (OCD) and chip endorsement key (CEK), as VIR_TYPED_PARAMS_STRING.</p>
        </div>
        <h3>
          <a name="VIR_NODE_SEV_PDH">
            <code>VIR_NODE_SEV_PDH</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_SEV_PDH</pre>
        <div class="description">
          <p>Macro represents the Platform Diffie-Hellman key, as VIR_TYPED_PARAMS_STRING.</p>
        </div>
        <h3>
          <a name="VIR_NODE_SEV_REDUCED_PHYS_BITS">
            <code>VIR_NODE_SEV_REDUCED_PHYS_BITS</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_NODE_SEV_REDUCED_PHYS_BITS</pre>
        <div class="description">
          <p>Macro represents the number of bits we lose in physical address space when SEV is enabled in the guest.</p>
        </div>
        <h3>
          <a name="VIR_SECURITY_DOI_BUFLEN">
            <code>VIR_SECURITY_DOI_BUFLEN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_SECURITY_DOI_BUFLEN</pre>
        <div class="description">
          <p>Macro providing the maximum length of the <a href="libvirt-libvirt-host.html#virSecurityModel">virSecurityModel</a> doi string.</p>
        </div>
        <h3>
          <a name="VIR_SECURITY_LABEL_BUFLEN">
            <code>VIR_SECURITY_LABEL_BUFLEN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_SECURITY_LABEL_BUFLEN</pre>
        <div class="description">
          <p>Macro providing the maximum length of the <a href="libvirt-libvirt-host.html#virSecurityLabel">virSecurityLabel</a> label string. Note that this value is based on that used by Labeled NFS.</p>
        </div>
        <h3>
          <a name="VIR_SECURITY_MODEL_BUFLEN">
            <code>VIR_SECURITY_MODEL_BUFLEN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_SECURITY_MODEL_BUFLEN</pre>
        <div class="description">
          <p>Macro providing the maximum length of the <a href="libvirt-libvirt-host.html#virSecurityModel">virSecurityModel</a> model string.</p>
        </div>
        <h3>
          <a name="VIR_UUID_BUFLEN">
            <code>VIR_UUID_BUFLEN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_UUID_BUFLEN</pre>
        <div class="description">
          <p>This macro provides the length of the buffer required for <a href="libvirt-libvirt-domain.html#virDomainGetUUID">virDomainGetUUID</a>()</p>
        </div>
        <h3>
          <a name="VIR_UUID_STRING_BUFLEN">
            <code>VIR_UUID_STRING_BUFLEN</code>
          </a>
        </h3>
        <pre class="api"><span class="directive">#define</span> VIR_UUID_STRING_BUFLEN</pre>
        <div class="description">
          <p>This macro provides the length of the buffer required for <a href="libvirt-libvirt-domain.html#virDomainGetUUIDString">virDomainGetUUIDString</a>()</p>
        </div>
        <h3>
          <a name="types">Types</a>
        </h3>
        <h3>
          <a name="virCPUCompareResult">
            <code>virCPUCompareResult</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virCPUCompareResult {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CPU_COMPARE_ERROR">VIR_CPU_COMPARE_ERROR</a>
              </td>
              <td> = </td>
              <td colspan="2">-1</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CPU_COMPARE_INCOMPATIBLE">VIR_CPU_COMPARE_INCOMPATIBLE</a>
              </td>
              <td> = </td>
              <td colspan="2">0</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CPU_COMPARE_IDENTICAL">VIR_CPU_COMPARE_IDENTICAL</a>
              </td>
              <td> = </td>
              <td colspan="2">1</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CPU_COMPARE_SUPERSET">VIR_CPU_COMPARE_SUPERSET</a>
              </td>
              <td> = </td>
              <td colspan="2">2</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CPU_COMPARE_LAST">VIR_CPU_COMPARE_LAST</a>
              </td>
              <td> = </td>
              <td colspan="2">3</td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virConnect">
            <code>virConnect</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virConnect {
</pre>
          <div class="undisclosed">The content of this structure is not made public by the API</div>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virConnectAuth">
            <code>virConnectAuth</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virConnectAuth {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">int *</span>
              </td>
              <td>credtype</td>
              <td>
                <div class="comment">List of supported <a href="libvirt-libvirt-host.html#virConnectCredentialType">virConnectCredentialType</a> values</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>ncredtype</td>
            </tr>
            <tr>
              <td>
                <span class="type">
                  <a href="libvirt-libvirt-host.html#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a>
                </span>
              </td>
              <td>cb</td>
              <td>
                <div class="comment">Callback used to collect credentials</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">void *</span>
              </td>
              <td>cbdata</td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virConnectBaselineCPUFlags">
            <code>virConnectBaselineCPUFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virConnectBaselineCPUFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES">VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">show all features</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_BASELINE_CPU_MIGRATABLE">VIR_CONNECT_BASELINE_CPU_MIGRATABLE</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">filter out non-migratable features</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virConnectCompareCPUFlags">
            <code>virConnectCompareCPUFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virConnectCompareCPUFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE">VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">treat incompatible CPUs as failure</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virConnectCredential">
            <code>virConnectCredential</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virConnectCredential {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">int</span>
              </td>
              <td>type</td>
              <td>
                <div class="comment">One of <a href="libvirt-libvirt-host.html#virConnectCredentialType">virConnectCredentialType</a> constants</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">const char *</span>
              </td>
              <td>prompt</td>
              <td>
                <div class="comment">Prompt to show to user</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">const char *</span>
              </td>
              <td>challenge</td>
              <td>
                <div class="comment">Additional challenge to show</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">const char *</span>
              </td>
              <td>defresult</td>
              <td>
                <div class="comment">Optional default result</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">char *</span>
              </td>
              <td>result</td>
              <td>
                <div class="comment">Result to be filled with user response (or defresult)</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>resultlen</td>
              <td>
                <div class="comment">Length of the result</div>
              </td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virConnectCredentialType">
            <code>virConnectCredentialType</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virConnectCredentialType {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CRED_USERNAME">VIR_CRED_USERNAME</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">Identity to act as</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_AUTHNAME">VIR_CRED_AUTHNAME</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">Identify to authorize as</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_LANGUAGE">VIR_CRED_LANGUAGE</a>
              </td>
              <td> = </td>
              <td>3</td>
              <td>
                <div class="comment">RFC 1766 languages, comma separated</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_CNONCE">VIR_CRED_CNONCE</a>
              </td>
              <td> = </td>
              <td>4</td>
              <td>
                <div class="comment">client supplies a nonce</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_PASSPHRASE">VIR_CRED_PASSPHRASE</a>
              </td>
              <td> = </td>
              <td>5</td>
              <td>
                <div class="comment">Passphrase secret</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_ECHOPROMPT">VIR_CRED_ECHOPROMPT</a>
              </td>
              <td> = </td>
              <td>6</td>
              <td>
                <div class="comment">Challenge response</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_NOECHOPROMPT">VIR_CRED_NOECHOPROMPT</a>
              </td>
              <td> = </td>
              <td>7</td>
              <td>
                <div class="comment">Challenge response</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_REALM">VIR_CRED_REALM</a>
              </td>
              <td> = </td>
              <td>8</td>
              <td>
                <div class="comment">Authentication realm</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_EXTERNAL">VIR_CRED_EXTERNAL</a>
              </td>
              <td> = </td>
              <td>9</td>
              <td>
                <div class="comment">Externally managed credential</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CRED_LAST">VIR_CRED_LAST</a>
              </td>
              <td> = </td>
              <td>10</td>
              <td>
                <div class="comment">More may be added - expect the unexpected</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virConnectFlags">
            <code>virConnectFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virConnectFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_CONNECT_RO">VIR_CONNECT_RO</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">A readonly connection</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_CONNECT_NO_ALIASES">VIR_CONNECT_NO_ALIASES</a>
              </td>
              <td> = </td>
              <td>2</td>
              <td>
                <div class="comment">Don't try to resolve URI aliases</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virNodeAllocPagesFlags">
            <code>virNodeAllocPagesFlags</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virNodeAllocPagesFlags {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_NODE_ALLOC_PAGES_ADD">VIR_NODE_ALLOC_PAGES_ADD</a>
              </td>
              <td> = </td>
              <td>0</td>
              <td>
                <div class="comment">Add @pageCounts to the pages pool. This can be used only to size up the pool.</div>
              </td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_ALLOC_PAGES_SET">VIR_NODE_ALLOC_PAGES_SET</a>
              </td>
              <td> = </td>
              <td>1</td>
              <td>
                <div class="comment">Don't add @pageCounts, instead set passed number of pages. This can be used to free allocated pages.</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virNodeCPUStats">
            <code>virNodeCPUStats</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virNodeCPUStats {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">char field[VIR_NODE_CPU_STATS_FIELD_LENGTH]</span>
              </td>
              <td>field</td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned long long</span>
              </td>
              <td>value</td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virNodeGetCPUStatsAllCPUs">
            <code>virNodeGetCPUStatsAllCPUs</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virNodeGetCPUStatsAllCPUs {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_NODE_CPU_STATS_ALL_CPUS">VIR_NODE_CPU_STATS_ALL_CPUS</a>
              </td>
              <td> = </td>
              <td colspan="2">-1</td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virNodeGetMemoryStatsAllCells">
            <code>virNodeGetMemoryStatsAllCells</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virNodeGetMemoryStatsAllCells {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_NODE_MEMORY_STATS_ALL_CELLS">VIR_NODE_MEMORY_STATS_ALL_CELLS</a>
              </td>
              <td> = </td>
              <td colspan="2">-1</td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virNodeInfo">
            <code>virNodeInfo</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virNodeInfo {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">char model[32]</span>
              </td>
              <td>model</td>
              <td>
                <div class="comment">string indicating the CPU model</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned long</span>
              </td>
              <td>memory</td>
              <td>
                <div class="comment">memory size in kilobytes</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>cpus</td>
              <td>
                <div class="comment">the number of active CPUs</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>mhz</td>
              <td>
                <div class="comment">expected CPU frequency, 0 if not known or on unusual architectures</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>nodes</td>
              <td>
                <div class="comment">the number of NUMA cell, 1 for unusual NUMA topologies or uniform memory access; check capabilities XML for the actual NUMA topology</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>sockets</td>
              <td>
                <div class="comment">number of CPU sockets per node if nodes &gt; 1, 1 in case of unusual NUMA topology</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>cores</td>
              <td>
                <div class="comment">number of cores per socket, total number of processors in case of unusual NUMA topolog</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned int</span>
              </td>
              <td>threads</td>
              <td>
                <div class="comment">number of threads per core, 1 in case of unusual numa topology</div>
              </td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virNodeMemoryStats">
            <code>virNodeMemoryStats</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virNodeMemoryStats {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">char field[VIR_NODE_MEMORY_STATS_FIELD_LENGTH]</span>
              </td>
              <td>field</td>
            </tr>
            <tr>
              <td>
                <span class="type">unsigned long long</span>
              </td>
              <td>value</td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virNodeSuspendTarget">
            <code>virNodeSuspendTarget</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">enum</span> virNodeSuspendTarget {
</pre>
          <table>
            <tr>
              <td>
                <a name="VIR_NODE_SUSPEND_TARGET_MEM">VIR_NODE_SUSPEND_TARGET_MEM</a>
              </td>
              <td> = </td>
              <td colspan="2">0</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_SUSPEND_TARGET_DISK">VIR_NODE_SUSPEND_TARGET_DISK</a>
              </td>
              <td> = </td>
              <td colspan="2">1</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_SUSPEND_TARGET_HYBRID">VIR_NODE_SUSPEND_TARGET_HYBRID</a>
              </td>
              <td> = </td>
              <td colspan="2">2</td>
            </tr>
            <tr>
              <td>
                <a name="VIR_NODE_SUSPEND_TARGET_LAST">VIR_NODE_SUSPEND_TARGET_LAST</a>
              </td>
              <td> = </td>
              <td>3</td>
              <td>
                <div class="comment">This constant is subject to change</div>
              </td>
            </tr>
          </table>
          <pre>}
</pre>
        </div>
        <h3>
          <a name="virSecurityLabel">
            <code>virSecurityLabel</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virSecurityLabel {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">char label[VIR_SECURITY_LABEL_BUFLEN]</span>
              </td>
              <td>label</td>
              <td>
                <div class="comment">security label string</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">int</span>
              </td>
              <td>enforcing</td>
              <td>
                <div class="comment">1 if security policy is being enforced for domain</div>
              </td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virSecurityModel">
            <code>virSecurityModel</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virSecurityModel {
</pre>
          <table>
            <tr>
              <td>
                <span class="type">char model[VIR_SECURITY_MODEL_BUFLEN]</span>
              </td>
              <td>model</td>
              <td>
                <div class="comment">security model string</div>
              </td>
            </tr>
            <tr>
              <td>
                <span class="type">char doi[VIR_SECURITY_DOI_BUFLEN]</span>
              </td>
              <td>doi</td>
              <td>
                <div class="comment">domain of interpretation</div>
              </td>
            </tr>
          </table>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="virStream">
            <code>virStream</code>
          </a>
        </h3>
        <div class="api">
          <pre><span class="keyword">struct </span>virStream {
</pre>
          <div class="undisclosed">The content of this structure is not made public by the API</div>
          <pre>
}
</pre>
        </div>
        <h3>
          <a name="functions">Functions</a>
        </h3>
        <h3>
          <a name="virConnectAuthCallbackPtr">
            <code>virConnectAuthCallbackPtr</code>
          </a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">int</span>	(*virConnectAuthCallbackPtr)	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectCredentialPtr">virConnectCredentialPtr</a></span> cred,
					 <span class="type">unsigned int</span> ncred,
					 <span class="type">void *</span> cbdata)
</pre>
        <div class="description">
          <p>When authentication requires one or more interactions, this callback is invoked. For each interaction supplied, data must be gathered from the user and filled in to the 'result' and 'resultlen' fields. If an interaction cannot be filled, fill in NULL and 0.</p>
        </div>
        <dl class="variablelist">
          <dt>cred</dt>
          <dd>list of <a href="libvirt-libvirt-host.html#virConnectCredential">virConnectCredential</a> object to fetch from user</dd>
          <dt>ncred</dt>
          <dd>size of cred list</dd>
          <dt>cbdata</dt>
          <dd>opaque data passed to <a href="libvirt-libvirt-host.html#virConnectOpenAuth">virConnectOpenAuth</a></dd>
          <dt>Returns</dt>
          <dd>0 if all interactions were filled, or -1 upon error</dd>
        </dl>
        <br/>
        <h3>
          <a name="virConnectBaselineCPU">
            <code>virConnectBaselineCPU</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virConnectBaselineCPU		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char **</span> xmlCPUs,
					 <span class="type">unsigned int</span> ncpus,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Computes the most feature-rich CPU which is compatible with all given host CPUs.</p>
          <p>See <a href="libvirt-libvirt-host.html#virConnectBaselineHypervisorCPU">virConnectBaselineHypervisorCPU</a>() to get a CPU which can be provided by the hypervisor.</p>
          <p>If @flags includes <a href="libvirt-libvirt-host.html#VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES">VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES</a> then libvirt will explicitly list all CPU features that are part of the host CPU, without this flag features that are part of the CPU model will not be listed.</p>
          <p>If @flags includes <a href="libvirt-libvirt-host.html#VIR_CONNECT_BASELINE_CPU_MIGRATABLE">VIR_CONNECT_BASELINE_CPU_MIGRATABLE</a>, the resulting CPU will not include features that block migration.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>xmlCPUs</dt>
          <dd>array of XML descriptions of host CPUs</dd>
          <dt>ncpus</dt>
          <dd>number of CPUs in xmlCPUs</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-host.html#virConnectBaselineCPUFlags">virConnectBaselineCPUFlags</a></dd>
          <dt>Returns</dt>
          <dd>XML description of the computed CPU (caller frees) or NULL on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectBaselineHypervisorCPU">
            <code>virConnectBaselineHypervisorCPU</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virConnectBaselineHypervisorCPU	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> emulator,
					 <span class="type">const char *</span> arch,
					 <span class="type">const char *</span> machine,
					 <span class="type">const char *</span> virttype,
					 <span class="type">const char **</span> xmlCPUs,
					 <span class="type">unsigned int</span> ncpus,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Computes the most feature-rich CPU which is compatible with all given CPUs and can be provided by the specified hypervisor. For best results the host-model CPUs as advertised by <a href="libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a>() should be passed in @xmlCPUs. Any of @emulator, @arch, @machine, and @virttype parameters may be NULL; libvirt will choose sensible defaults tailored to the host and its current configuration.</p>
          <p>This is different from <a href="libvirt-libvirt-host.html#virConnectBaselineCPU">virConnectBaselineCPU</a>() which doesn't consider any hypervisor abilities when computing the best CPU.</p>
          <p>If @flags includes <a href="libvirt-libvirt-host.html#VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES">VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES</a> then libvirt will explicitly list all CPU features that are part of the computed CPU, without this flag features that are part of the CPU model will not be listed.</p>
          <p>If @flags includes <a href="libvirt-libvirt-host.html#VIR_CONNECT_BASELINE_CPU_MIGRATABLE">VIR_CONNECT_BASELINE_CPU_MIGRATABLE</a>, the resulting CPU will not include features that block migration.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>emulator</dt>
          <dd>path to the emulator binary</dd>
          <dt>arch</dt>
          <dd>CPU architecture</dd>
          <dt>machine</dt>
          <dd>machine type</dd>
          <dt>virttype</dt>
          <dd>virtualization type</dd>
          <dt>xmlCPUs</dt>
          <dd>array of XML descriptions of CPUs</dd>
          <dt>ncpus</dt>
          <dd>number of CPUs in xmlCPUs</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-host.html#virConnectBaselineCPUFlags">virConnectBaselineCPUFlags</a></dd>
          <dt>Returns</dt>
          <dd>XML description of the computed CPU (caller frees) or NULL on error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectClose">
            <code>virConnectClose</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectClose			(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p>
          <p>Connections are reference counted; the count is explicitly increased by the initial open (<a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>, <a href="libvirt-libvirt-host.html#virConnectOpenAuth">virConnectOpenAuth</a>, and the like) as well as <a href="libvirt-libvirt-host.html#virConnectRef">virConnectRef</a>; it is also temporarily increased by other API that depend on the connection remaining alive. The open and every <a href="libvirt-libvirt-host.html#virConnectRef">virConnectRef</a> call should have a matching <a href="libvirt-libvirt-host.html#virConnectClose">virConnectClose</a>, and all other references will be released after the corresponding operation completes.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>Returns</dt>
          <dd>a positive number if at least 1 reference remains on success. The returned value should not be assumed to be the total reference count. A return of 0 implies no references remain and the connection is closed and memory has been freed. A return of -1 implies a failure. It is possible for the last <a href="libvirt-libvirt-host.html#virConnectClose">virConnectClose</a> to return a positive value if some other object still has a temporary reference to the connection, but the application should not try to further use a connection after the <a href="libvirt-libvirt-host.html#virConnectClose">virConnectClose</a> that matches the initial open.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectCloseFunc">
            <code>virConnectCloseFunc</code>
          </a>
        </h3>
        <pre class="api"><span class="keyword">typedef</span> <span class="type">void</span>	(*virConnectCloseFunc	)	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">int</span> reason,
					 <span class="type">void *</span> opaque)
</pre>
        <div class="description">
          <p>A callback function to be registered, and called when the connection is closed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>reason</dt>
          <dd>reason why the connection was closed (one of <a href="libvirt-libvirt-common.html#virConnectCloseReason">virConnectCloseReason</a>)</dd>
          <dt>opaque</dt>
          <dd>opaque user data</dd>
        </dl>
        <br/>
        <h3>
          <a name="virConnectCompareCPU">
            <code>virConnectCompareCPU</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectCompareCPU		(<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>Compares the given CPU description with the host CPU.</p>
          <p>See <a href="libvirt-libvirt-host.html#virConnectCompareHypervisorCPU">virConnectCompareHypervisorCPU</a>() if you want to consider hypervisor abilities and compare the CPU to the CPU which a hypervisor is able to provide on the host.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>xmlDesc</dt>
          <dd>XML describing the CPU to compare with host CPU</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-host.html#virConnectCompareCPUFlags">virConnectCompareCPUFlags</a></dd>
          <dt>Returns</dt>
          <dd>comparison result according to enum <a href="libvirt-libvirt-host.html#virCPUCompareResult">virCPUCompareResult</a>. If <a href="libvirt-libvirt-host.html#VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE">VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE</a> is used and @xmlDesc CPU is incompatible with host CPU, this function will return <a href="libvirt-libvirt-host.html#VIR_CPU_COMPARE_ERROR">VIR_CPU_COMPARE_ERROR</a> (instead of <a href="libvirt-libvirt-host.html#VIR_CPU_COMPARE_INCOMPATIBLE">VIR_CPU_COMPARE_INCOMPATIBLE</a>) and the error will use the <a href="libvirt-virterror.html#VIR_ERR_CPU_INCOMPATIBLE">VIR_ERR_CPU_INCOMPATIBLE</a> code with a message providing more details about the incompatibility.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectCompareHypervisorCPU">
            <code>virConnectCompareHypervisorCPU</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectCompareHypervisorCPU	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> emulator,
					 <span class="type">const char *</span> arch,
					 <span class="type">const char *</span> machine,
					 <span class="type">const char *</span> virttype,
					 <span class="type">const char *</span> xmlCPU,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Compares the given CPU description with the CPU the specified hypervisor is able to provide on the host. Any of @emulator, @arch, @machine, and @virttype parameters may be NULL; libvirt will choose sensible defaults tailored to the host and its current configuration.</p>
          <p>This is different from <a href="libvirt-libvirt-host.html#virConnectCompareCPU">virConnectCompareCPU</a>() which compares the CPU definition with the host CPU without considering any specific hypervisor and its abilities.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>emulator</dt>
          <dd>path to the emulator binary</dd>
          <dt>arch</dt>
          <dd>CPU architecture</dd>
          <dt>machine</dt>
          <dd>machine type</dd>
          <dt>virttype</dt>
          <dd>virtualization type</dd>
          <dt>xmlCPU</dt>
          <dd>XML describing the CPU to be compared</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-host.html#virConnectCompareCPUFlags">virConnectCompareCPUFlags</a></dd>
          <dt>Returns</dt>
          <dd>comparison result according to enum <a href="libvirt-libvirt-host.html#virCPUCompareResult">virCPUCompareResult</a>. If <a href="libvirt-libvirt-host.html#VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE">VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE</a> is used and @xmlCPU is incompatible with the CPU the specified hypervisor is able to provide on the host, this function will return <a href="libvirt-libvirt-host.html#VIR_CPU_COMPARE_ERROR">VIR_CPU_COMPARE_ERROR</a> (instead of <a href="libvirt-libvirt-host.html#VIR_CPU_COMPARE_INCOMPATIBLE">VIR_CPU_COMPARE_INCOMPATIBLE</a>) and the error will use the <a href="libvirt-virterror.html#VIR_ERR_CPU_INCOMPATIBLE">VIR_ERR_CPU_INCOMPATIBLE</a> code with a message providing more details about the incompatibility.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetCPUModelNames">
            <code>virConnectGetCPUModelNames</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectGetCPUModelNames	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> arch,
					 <span class="type">char ** *</span> models,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Get the list of CPU models supported by libvirt for a specific architecture.</p>
          <p>The returned list limits CPU models usable with libvirt (empty list means there's no limit imposed by libvirt) and it does not reflect capabilities of any particular hypervisor. See the XML returned by <a href="libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a>() for a list of CPU models supported by libvirt for domains created on a specific hypervisor.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd><a href="libvirt-libvirt-host.html#virConnect">virConnect</a> connection</dd>
          <dt>arch</dt>
          <dd>Architecture</dd>
          <dt>models</dt>
          <dd>Pointer to a variable to store the NULL-terminated array of the CPU models supported for the specified architecture. Each element and the array itself must be freed by the caller with free. Pass NULL if only the list length is needed.</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0.</dd>
          <dt>Returns</dt>
          <dd>-1 on error, number of elements in @models on success (0 means libvirt accepts any CPU model).</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetCapabilities">
            <code>virConnectGetCapabilities</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virConnectGetCapabilities	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Provides capabilities of the hypervisor / driver.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>Returns</dt>
          <dd>NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetHostname">
            <code>virConnectGetHostname</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virConnectGetHostname		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>This returns a system hostname on which the hypervisor is running (based on the result of the gethostname system call, but possibly expanded to a fully-qualified domain name via getaddrinfo). If we are connected to a remote system, then this returns the hostname of the remote system.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to a hypervisor connection</dd>
          <dt>Returns</dt>
          <dd>the hostname which must be freed by the caller, or NULL if there was an error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetLibVersion">
            <code>virConnectGetLibVersion</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectGetLibVersion		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned long *</span> libVer)</pre>
        <div class="description">
          <p>Provides @libVer, which is the version of libvirt used by the daemon running on the @conn host</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>libVer</dt>
          <dd>returns the libvirt library version used on the connection (OUT)</dd>
          <dt>Returns</dt>
          <dd>-1 in case of failure, 0 otherwise, and values for @libVer have the format major * 1,000,000 + minor * 1,000 + release.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetMaxVcpus">
            <code>virConnectGetMaxVcpus</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectGetMaxVcpus		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">const char *</span> type)</pre>
        <div class="description">
          <p>Provides the maximum number of virtual CPUs supported for a guest VM of a specific type. The 'type' parameter here corresponds to the 'type' attribute in the &lt;domain&gt; element of the XML. This API doesn't take emulator limits into consideration, hence the returned value is not guaranteed to be usable. It is recommended to use <a href="libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a>() and look for "&lt;vcpu max='...'&gt;" in its output instead.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>type</dt>
          <dd>value of the 'type' attribute in the &lt;domain&gt; element</dd>
          <dt>Returns</dt>
          <dd>the maximum of virtual CPU or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetSysinfo">
            <code>virConnectGetSysinfo</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virConnectGetSysinfo		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>This returns the XML description of the sysinfo details for the host on which the hypervisor is running, in the same format as the &lt;sysinfo&gt; element of a domain XML. This information is generally available only for hypervisors running with root privileges.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to a hypervisor connection</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the XML string which must be freed by the caller, or NULL if there was an error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetType">
            <code>virConnectGetType</code>
          </a>
        </h3>
        <pre class="api"><span class="type">const char *</span>	virConnectGetType	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Get the name of the Hypervisor driver used. This is merely the driver name; for example, both KVM and QEMU guests are serviced by the driver for the qemu:// URI, so a return of "QEMU" does not indicate whether KVM acceleration is present. For more details about the hypervisor, use <a href="libvirt-libvirt-host.html#virConnectGetCapabilities">virConnectGetCapabilities</a>().</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>Returns</dt>
          <dd>NULL in case of error, a static zero terminated string otherwise. See also: <a href="http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html">http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html</a></dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetURI">
            <code>virConnectGetURI</code>
          </a>
        </h3>
        <pre class="api"><span class="type">char *</span>	virConnectGetURI		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>This returns the URI (name) of the hypervisor connection. Normally this is the same as or similar to the string passed to the virConnectOpen/virConnectOpenReadOnly call, but the driver may make the URI canonical. If name == NULL was passed to <a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>, then the driver will return a non-NULL URI which can be used to connect to the same hypervisor later.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to a hypervisor connection</dd>
          <dt>Returns</dt>
          <dd>the URI string which must be freed by the caller, or NULL if there was an error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectGetVersion">
            <code>virConnectGetVersion</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectGetVersion		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned long *</span> hvVer)</pre>
        <div class="description">
          <p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with privileged access to the hypervisor, not with a Read-Only connection.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>hvVer</dt>
          <dd>return value for the version of the running hypervisor (OUT)</dd>
          <dt>Returns</dt>
          <dd>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectIsAlive">
            <code>virConnectIsAlive</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectIsAlive		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Determine if the connection to the hypervisor is still alive</p>
          <p>A connection will be classed as alive if it is either local, or running over a channel (TCP or UNIX socket) which is not closed.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection object</dd>
          <dt>Returns</dt>
          <dd>1 if alive, 0 if dead, -1 on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectIsEncrypted">
            <code>virConnectIsEncrypted</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectIsEncrypted		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Determine if the connection to the hypervisor is encrypted</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection object</dd>
          <dt>Returns</dt>
          <dd>1 if encrypted, 0 if not encrypted, -1 on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectIsSecure">
            <code>virConnectIsSecure</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectIsSecure		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Determine if the connection to the hypervisor is secure</p>
          <p>A connection will be classed as secure if it is either encrypted, or running over a channel which is not exposed to eavesdropping (eg a UNIX domain socket, or pipe)</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the connection object</dd>
          <dt>Returns</dt>
          <dd>1 if secure, 0 if not secure, -1 on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectOpen">
            <code>virConnectOpen</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	virConnectOpen		(<span class="type">const char *</span> name)</pre>
        <div class="description">
          <p>This function should be called first to get a connection to the Hypervisor and xen store</p>
          <p>If @name is NULL, if the LIBVIRT_DEFAULT_URI environment variable is set, then it will be used. Otherwise if the client configuration file has the "uri_default" parameter set, then it will be used. Finally probing will be done to determine a suitable default driver to activate. This involves trying each hypervisor in turn until one successfully opens.</p>
          <p>If connecting to an unprivileged hypervisor driver which requires the libvirtd daemon to be active, it will automatically be launched if not already running. This can be prevented by setting the environment variable LIBVIRT_AUTOSTART=0</p>
          <p>URIs are documented at https://libvirt.org/uri.html</p>
          <p><a href="libvirt-libvirt-host.html#virConnectClose">virConnectClose</a> should be used to release the resources after the connection is no longer needed.</p>
        </div>
        <dl class="variablelist">
          <dt>name</dt>
          <dd>(optional) URI of the hypervisor</dd>
          <dt>Returns</dt>
          <dd>a pointer to the hypervisor connection or NULL in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectOpenAuth">
            <code>virConnectOpenAuth</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	virConnectOpenAuth	(<span class="type">const char *</span> name,
					 <span class="type"><a href="libvirt-libvirt-host.html#virConnectAuthPtr">virConnectAuthPtr</a></span> auth,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>This function should be called first to get a connection to the Hypervisor. If necessary, authentication will be performed fetching credentials via the callback</p>
          <p>See <a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a> for notes about environment variables which can have an effect on opening drivers and freeing the connection resources</p>
          <p>URIs are documented at https://libvirt.org/uri.html</p>
        </div>
        <dl class="variablelist">
          <dt>name</dt>
          <dd>(optional) URI of the hypervisor</dd>
          <dt>auth</dt>
          <dd>Authenticate callback parameters</dd>
          <dt>flags</dt>
          <dd>bitwise-OR of <a href="libvirt-libvirt-host.html#virConnectFlags">virConnectFlags</a></dd>
          <dt>Returns</dt>
          <dd>a pointer to the hypervisor connection or NULL in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectOpenReadOnly">
            <code>virConnectOpenReadOnly</code>
          </a>
        </h3>
        <pre class="api"><span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span>	virConnectOpenReadOnly	(<span class="type">const char *</span> name)</pre>
        <div class="description">
          <p>This function should be called first to get a restricted connection to the library functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p>
          <p>See <a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a> for notes about environment variables which can have an effect on opening drivers and freeing the connection resources</p>
          <p>URIs are documented at https://libvirt.org/uri.html</p>
        </div>
        <dl class="variablelist">
          <dt>name</dt>
          <dd>(optional) URI of the hypervisor</dd>
          <dt>Returns</dt>
          <dd>a pointer to the hypervisor connection or NULL in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectRef">
            <code>virConnectRef</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectRef			(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt-host.html#virConnectClose">virConnectClose</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 connection would increment the reference count.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>the connection 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="virConnectRegisterCloseCallback">
            <code>virConnectRegisterCloseCallback</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectRegisterCloseCallback	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-host.html#virConnectCloseFunc">virConnectCloseFunc</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>Registers a callback to be invoked when the connection is closed. This callback is invoked when there is any condition that causes the socket connection to the hypervisor to be closed.</p>
          <p>This function is only applicable to hypervisor drivers which maintain a persistent open connection. Drivers which open a new connection for every operation will not invoke this.</p>
          <p>The @freecb must not invoke any other libvirt public APIs, since it is not called from a re-entrant safe context.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to connection object</dd>
          <dt>cb</dt>
          <dd>callback to invoke upon close</dd>
          <dt>opaque</dt>
          <dd>user data to pass to @cb</dd>
          <dt>freecb</dt>
          <dd>callback to free @opaque</dd>
          <dt>Returns</dt>
          <dd>0 on success, -1 on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectSetKeepAlive">
            <code>virConnectSetKeepAlive</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectSetKeepAlive		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">int</span> interval,
					 <span class="type">unsigned int</span> count)</pre>
        <div class="description">
          <p>Start sending keepalive messages after @interval seconds of inactivity and consider the connection to be broken when no response is received after @count keepalive messages sent in a row. In other words, sending count + 1 keepalive message results in closing the connection. When @interval is &lt;= 0, no keepalive messages will be sent. When @count is 0, the connection will be automatically closed after @interval seconds of inactivity without sending any keepalive messages.</p>
          <p>Note: The client has to implement and run an event loop with <a href="libvirt-libvirt-event.html#virEventRegisterImpl">virEventRegisterImpl</a>() or <a href="libvirt-libvirt-event.html#virEventRegisterDefaultImpl">virEventRegisterDefaultImpl</a>() to be able to use keepalive messages. Failure to do so may result in connections being closed unexpectedly.</p>
          <p>Note: This API function controls only keepalive messages sent by the client. If the server is configured to use keepalive you still need to run the event loop to respond to them, even if you disable keepalives by this function.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to a hypervisor connection</dd>
          <dt>interval</dt>
          <dd>number of seconds of inactivity before a keepalive message is sent</dd>
          <dt>count</dt>
          <dd>number of messages that can be sent in a row</dd>
          <dt>Returns</dt>
          <dd>-1 on error, 0 on success, 1 when remote party doesn't support keepalive messages.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virConnectUnregisterCloseCallback">
            <code>virConnectUnregisterCloseCallback</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virConnectUnregisterCloseCallback	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
						 <span class="type"><a href="libvirt-libvirt-host.html#virConnectCloseFunc">virConnectCloseFunc</a></span> cb)</pre>
        <div class="description">
          <p>Unregisters the callback previously set with the <a href="libvirt-libvirt-host.html#virConnectRegisterCloseCallback">virConnectRegisterCloseCallback</a> method. The callback will no longer receive notifications when the connection closes. If a <a href="libvirt-libvirt-common.html#virFreeCallback">virFreeCallback</a> was provided at time of registration, it will be invoked</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to connection object</dd>
          <dt>cb</dt>
          <dd>pointer to the current registered callback</dd>
          <dt>Returns</dt>
          <dd>0 on success, -1 on error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virGetVersion">
            <code>virGetVersion</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virGetVersion			(<span class="type">unsigned long *</span> libVer,
					 <span class="type">const char *</span> type,
					 <span class="type">unsigned long *</span> typeVer)</pre>
        <div class="description">
          <p>Provides version information. @libVer is the version of the library and will always be set unless an error occurs, in which case an error code will be returned. @typeVer exists for historical compatibility; if it is not NULL it will duplicate @libVer (it was originally intended to return hypervisor information based on @type, but due to the design of remote clients this is not reliable). To get the version of the running hypervisor use the <a href="libvirt-libvirt-host.html#virConnectGetVersion">virConnectGetVersion</a>() function instead. To get the libvirt library version used by a connection use the <a href="libvirt-libvirt-host.html#virConnectGetLibVersion">virConnectGetLibVersion</a>() instead.</p>
          <p>This function includes a call to <a href="libvirt-libvirt-host.html#virInitialize">virInitialize</a>() when necessary.</p>
        </div>
        <dl class="variablelist">
          <dt>libVer</dt>
          <dd>return value for the library version (OUT)</dd>
          <dt>type</dt>
          <dd>ignored; pass NULL</dd>
          <dt>typeVer</dt>
          <dd>pass NULL; for historical purposes duplicates @libVer if non-NULL</dd>
          <dt>Returns</dt>
          <dd>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virInitialize">
            <code>virInitialize</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virInitialize			(<span class="type">void</span>)</pre>
        <div class="description">
          <p>Initialize the library.</p>
          <p>This method is invoked automatically by any of the <a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>() API calls, and by <a href="libvirt-libvirt-host.html#virGetVersion">virGetVersion</a>(). Since release 1.0.0, there is no need to call this method even in a multithreaded application, since initialization is performed in a thread safe manner; but applications using an older version of the library should manually call this before setting up competing threads that attempt <a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a> in parallel.</p>
          <p>The only other time it would be necessary to call <a href="libvirt-libvirt-host.html#virInitialize">virInitialize</a> is if the application did not invoke <a href="libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a> as its first API call, such as when calling <a href="libvirt-libvirt-event.html#virEventRegisterImpl">virEventRegisterImpl</a>() before setting up connections, or when using <a href="libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>() to alter error reporting of the first connection attempt.</p>
        </div>
        <dl class="variablelist">
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeAllocPages">
            <code>virNodeAllocPages</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeAllocPages		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned int</span> npages,
					 <span class="type">unsigned int *</span> pageSizes,
					 <span class="type">unsigned long long *</span> pageCounts,
					 <span class="type">int</span> startCell,
					 <span class="type">unsigned int</span> cellCount,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Sometimes, when trying to start a new domain, it may be necessary to reserve some huge pages in the system pool which can be then allocated by the domain. This API serves that purpose. On its input, @pageSizes and @pageCounts are arrays of the same cardinality of @npages. The @pageSizes contains page sizes which are to be allocated in the system (the size unit is kibibytes), and @pageCounts then contains the number of pages to reserve. If @flags is 0 (<a href="libvirt-libvirt-host.html#VIR_NODE_ALLOC_PAGES_ADD">VIR_NODE_ALLOC_PAGES_ADD</a>), each pool corresponding to @pageSizes grows by the number of pages specified in the corresponding @pageCounts. If @flags contains <a href="libvirt-libvirt-host.html#VIR_NODE_ALLOC_PAGES_SET">VIR_NODE_ALLOC_PAGES_SET</a>, each pool mentioned is resized to the given number of pages. The pages pool can be allocated over several NUMA nodes at once, just point at @startCell and tell how many subsequent NUMA nodes should be taken in. As a special case, if @startCell is equal to negative one, then kernel is instructed to allocate the pages over all NUMA nodes proportionally.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>npages</dt>
          <dd>number of items in the @pageSizes and @pageCounts arrays</dd>
          <dt>pageSizes</dt>
          <dd>which huge page sizes to allocate</dd>
          <dt>pageCounts</dt>
          <dd>how many pages should be allocated</dd>
          <dt>startCell</dt>
          <dd>index of first cell to allocate pages on</dd>
          <dt>cellCount</dt>
          <dd>number of consecutive cells to allocate pages on</dd>
          <dt>flags</dt>
          <dd>extra flags; binary-OR of <a href="libvirt-libvirt-host.html#virNodeAllocPagesFlags">virNodeAllocPagesFlags</a></dd>
          <dt>Returns</dt>
          <dd>the number of nodes successfully adjusted or -1 in case of an error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetCPUMap">
            <code>virNodeGetCPUMap</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetCPUMap		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned char **</span> cpumap,
					 <span class="type">unsigned int *</span> online,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Get CPU map of host node CPUs.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>cpumap</dt>
          <dd>optional pointer to a bit map of real CPUs on the host node (in 8-bit bytes) (OUT) In case of success each bit set to 1 means that corresponding CPU is online. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit. The bit map is allocated by <a href="libvirt-libvirt-host.html#virNodeGetCPUMap">virNodeGetCPUMap</a> and needs to be released using free() by the caller.</dd>
          <dt>online</dt>
          <dd>optional number of online CPUs in cpumap (OUT) Contains the number of online CPUs if the call was successful.</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>number of CPUs present on the host node, or -1 if there was an error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetCPUStats">
            <code>virNodeGetCPUStats</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetCPUStats		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">int</span> cpuNum,
					 <span class="type"><a href="libvirt-libvirt-host.html#virNodeCPUStatsPtr">virNodeCPUStatsPtr</a></span> params,
					 <span class="type">int *</span> nparams,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>This function provides individual cpu statistics of the node. If you want to get total cpu statistics of the node, you must specify <a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_ALL_CPUS">VIR_NODE_CPU_STATS_ALL_CPUS</a> to @cpuNum. The @params array will be filled with the values equal to the number of parameters suggested by @nparams</p>
          <p>As the value of @nparams is dynamic, call the API setting @nparams to 0 and @params as NULL, the API returns the number of parameters supported by the HV by updating @nparams on SUCCESS. The caller should then allocate @params array, i.e. (sizeof(@virNodeCPUStats) * @nparams) bytes and call the API again.</p>
          <p>Here is a sample code snippet:</p>
          <pre class="code">if (virNodeGetCPUStats(conn, cpuNum, NULL, &amp;nparams, 0) == 0 &amp;&amp;
    nparams != 0) {
    if ((params = malloc(sizeof(virNodeCPUStats) * nparams)) == NULL)
        goto error;
    memset(params, 0, sizeof(virNodeCPUStats) * nparams);
    if (virNodeGetCPUStats(conn, cpuNum, params, &amp;nparams, 0))
        goto error;
}</pre>
          <p>This function doesn't require privileged access to the hypervisor. This function expects the caller to allocate the @params.</p>
          <p>CPU time Statistics:</p>
          <p><a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_KERNEL">VIR_NODE_CPU_STATS_KERNEL</a>: The cumulative CPU time which spends by kernel, when the node booting up.(nanoseconds) <a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_USER">VIR_NODE_CPU_STATS_USER</a>: The cumulative CPU time which spends by user processes, when the node booting up.(nanoseconds) <a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_IDLE">VIR_NODE_CPU_STATS_IDLE</a>: The cumulative idle CPU time, when the node booting up.(nanoseconds) <a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_IOWAIT">VIR_NODE_CPU_STATS_IOWAIT</a>: The cumulative I/O wait CPU time, when the node booting up.(nanoseconds) <a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_UTILIZATION">VIR_NODE_CPU_STATS_UTILIZATION</a>: The CPU utilization. The usage value is in percent and 100% represents all CPUs on the server.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection.</dd>
          <dt>cpuNum</dt>
          <dd>number of node cpu. (<a href="libvirt-libvirt-host.html#VIR_NODE_CPU_STATS_ALL_CPUS">VIR_NODE_CPU_STATS_ALL_CPUS</a> means total cpu statistics)</dd>
          <dt>params</dt>
          <dd>pointer to node cpu time parameter objects</dd>
          <dt>nparams</dt>
          <dd>number of node cpu time parameter (this value should be same or less than the number of parameters supported)</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>-1 in case of error, 0 in case of success.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetCellsFreeMemory">
            <code>virNodeGetCellsFreeMemory</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetCellsFreeMemory	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned long long *</span> freeMems,
					 <span class="type">int</span> startCell,
					 <span class="type">int</span> maxCells)</pre>
        <div class="description">
          <p>This call returns the amount of free memory in one or more NUMA cells. The @freeMems array must be allocated by the caller and will be filled with the amount of free memory in bytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>freeMems</dt>
          <dd>pointer to the array of unsigned long long</dd>
          <dt>startCell</dt>
          <dd>index of first cell to return freeMems info on.</dd>
          <dt>maxCells</dt>
          <dd>Maximum number of cells for which freeMems information can be returned.</dd>
          <dt>Returns</dt>
          <dd>the number of entries filled in freeMems, or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetFreeMemory">
            <code>virNodeGetFreeMemory</code>
          </a>
        </h3>
        <pre class="api"><span class="type">unsigned long long</span>	virNodeGetFreeMemory	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
        <div class="description">
          <p>provides the free memory available on the Node Note: most libvirt APIs provide memory sizes in kibibytes, but in this function the returned value is in bytes. Divide by 1024 as necessary.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>Returns</dt>
          <dd>the available free memory in bytes or 0 in case of error</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetFreePages">
            <code>virNodeGetFreePages</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetFreePages		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned int</span> npages,
					 <span class="type">unsigned int *</span> pages,
					 <span class="type">int</span> startCell,
					 <span class="type">unsigned int</span> cellCount,
					 <span class="type">unsigned long long *</span> counts,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>This calls queries the host system on free pages of specified size. For the input, @pages is expected to be filled with pages that caller is interested in (the size unit is kibibytes, so e.g. pass 2048 for 2MB), then @startcell refers to the first NUMA node that info should be collected from, and @cellcount tells how many consecutive nodes should be queried. On the function output, @counts is filled with desired information, where items are grouped by NUMA node. So from @counts[0] till @counts[@npages - 1] you'll find count for the first node (@startcell), then from @counts[@npages] till @count[2 * @npages - 1] you'll find info for the (@startcell + 1) node, and so on. It's callers responsibility to allocate the @counts array.</p>
          <p>Example how to use this API:</p>
          <pre class="code">unsigned int pages[] = { 4, 2048, 1048576}
unsigned int npages = ARRAY_CARDINALITY(pages);
int startcell = 0;
unsigned int cellcount = 2;

unsigned long long counts = malloc(sizeof(long long) * npages * cellcount);

virNodeGetFreePages(conn, pages, npages,
                    startcell, cellcount, counts, 0);

for (i = 0 ; i &lt; cellcount ; i++) {
    fprintf(stdout, "Cell %d\n", startcell + i);
    for (j = 0 ; j &lt; npages ; j++) {
       fprintf(stdout, "  Page size=%d count=%d bytes=%llu\n",
               pages[j], counts[(i * npages) +  j],
               pages[j] * counts[(i * npages) +  j]);
    }
}

This little code snippet will produce something like this:
Cell 0
 Page size=4096 count=300 bytes=1228800
 Page size=2097152 count=0 bytes=0
 Page size=1073741824 count=1 bytes=1073741824
Cell 1
 Page size=4096 count=0 bytes=0
 Page size=2097152 count=20 bytes=41943040
 Page size=1073741824 count=0 bytes=0</pre>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>npages</dt>
          <dd>number of items in the @pages array</dd>
          <dt>pages</dt>
          <dd>page sizes to query</dd>
          <dt>startCell</dt>
          <dd>index of first cell to return free pages info on.</dd>
          <dt>cellCount</dt>
          <dd>maximum number of cells for which free pages information can be returned.</dd>
          <dt>counts</dt>
          <dd>returned counts of free pages</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>the number of entries filled in @counts or -1 in case of error.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetInfo">
            <code>virNodeGetInfo</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetInfo			(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-host.html#virNodeInfoPtr">virNodeInfoPtr</a></span> info)</pre>
        <div class="description">
          <p>Extract hardware information about the node.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>info</dt>
          <dd>pointer to a <a href="libvirt-libvirt-host.html#virNodeInfo">virNodeInfo</a> structure allocated by the user</dd>
          <dt>Returns</dt>
          <dd>0 in case of success and -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetMemoryParameters">
            <code>virNodeGetMemoryParameters</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetMemoryParameters	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-common.html#virTypedParameterPtr">virTypedParameterPtr</a></span> params,
					 <span class="type">int *</span> nparams,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Get all node memory parameters (parameters unsupported by OS will be omitted). On input, @nparams gives the size of the @params array; on output, @nparams gives how many slots were filled with parameter information, which might be less but will not exceed the input value.</p>
          <p>As a special case, calling with @params as NULL and @nparams as 0 on input will cause @nparams on output to contain the number of parameters supported by the hypervisor. The caller should then allocate @params array, i.e. (sizeof(@virTypedParameter) * @nparams) bytes and call the API again. See <a href="libvirt-libvirt-domain.html#virDomainGetMemoryParameters">virDomainGetMemoryParameters</a>() for an equivalent usage example.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>params</dt>
          <dd>pointer to memory parameter object (return value, allocated by the caller)</dd>
          <dt>nparams</dt>
          <dd>pointer to number of memory parameters; input and output</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, and -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetMemoryStats">
            <code>virNodeGetMemoryStats</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetMemoryStats		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">int</span> cellNum,
					 <span class="type"><a href="libvirt-libvirt-host.html#virNodeMemoryStatsPtr">virNodeMemoryStatsPtr</a></span> params,
					 <span class="type">int *</span> nparams,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>This function provides memory stats of the node. If you want to get total memory statistics of the node, you must specify <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_ALL_CELLS">VIR_NODE_MEMORY_STATS_ALL_CELLS</a> to @cellNum. The @params array will be filled with the values equal to the number of stats suggested by @nparams</p>
          <p>As the value of @nparams is dynamic, call the API setting @nparams to 0 and @params as NULL, the API returns the number of parameters supported by the HV by updating @nparams on SUCCESS. The caller should then allocate @params array, i.e. (sizeof(@virNodeMemoryStats) * @nparams) bytes and call the API again.</p>
          <p>Here is the sample code snippet:</p>
          <pre class="code">if (virNodeGetMemoryStats(conn, cellNum, NULL, &amp;nparams, 0) == 0 &amp;&amp;
    nparams != 0) {
    if ((params = malloc(sizeof(virNodeMemoryStats) * nparams)) == NULL)
        goto error;
    memset(params, cellNum, 0, sizeof(virNodeMemoryStats) * nparams);
    if (virNodeGetMemoryStats(conn, params, &amp;nparams, 0))
        goto error;
}</pre>
          <p>This function doesn't require privileged access to the hypervisor. This function expects the caller to allocate the @params.</p>
          <p>Memory Stats:</p>
          <p><a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_TOTAL">VIR_NODE_MEMORY_STATS_TOTAL</a>: The total memory usage.(KB) <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_FREE">VIR_NODE_MEMORY_STATS_FREE</a>: The free memory usage.(KB) On linux, this usage includes buffers and cached. <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_BUFFERS">VIR_NODE_MEMORY_STATS_BUFFERS</a>: The buffers memory usage.(KB) <a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_CACHED">VIR_NODE_MEMORY_STATS_CACHED</a>: The cached memory usage.(KB)</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection.</dd>
          <dt>cellNum</dt>
          <dd>number of node cell. (<a href="libvirt-libvirt-host.html#VIR_NODE_MEMORY_STATS_ALL_CELLS">VIR_NODE_MEMORY_STATS_ALL_CELLS</a> means total cell statistics)</dd>
          <dt>params</dt>
          <dd>pointer to node memory stats objects</dd>
          <dt>nparams</dt>
          <dd>number of node memory stats (this value should be same or less than the number of stats supported)</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>-1 in case of error, 0 in case of success.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetSEVInfo">
            <code>virNodeGetSEVInfo</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetSEVInfo		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-common.html#virTypedParameterPtr">virTypedParameterPtr</a> *</span> params,
					 <span class="type">int *</span> nparams,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>If hypervisor supports AMD's SEV feature, then @params will contain various platform specific information like PDH and certificate chain. Caller is responsible for freeing @params.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>params</dt>
          <dd>where to store SEV information</dd>
          <dt>nparams</dt>
          <dd>pointer to number of SEV parameters returned in @params</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, and -1 in case of failure.</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeGetSecurityModel">
            <code>virNodeGetSecurityModel</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeGetSecurityModel		(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-host.html#virSecurityModelPtr">virSecurityModelPtr</a></span> secmodel)</pre>
        <div class="description">
          <p>Extract the security model of a hypervisor. The 'model' field in the @secmodel argument may be initialized to the empty string if the driver has not activated a security model.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>a connection object</dd>
          <dt>secmodel</dt>
          <dd>pointer to a <a href="libvirt-libvirt-host.html#virSecurityModel">virSecurityModel</a> structure</dd>
          <dt>Returns</dt>
          <dd>0 in case of success, -1 in case of failure</dd>
        </dl>
        <div class="acl"/>
        <h3>
          <a name="virNodeSetMemoryParameters">
            <code>virNodeSetMemoryParameters</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeSetMemoryParameters	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type"><a href="libvirt-libvirt-common.html#virTypedParameterPtr">virTypedParameterPtr</a></span> params,
					 <span class="type">int</span> nparams,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Change all or a subset of the node memory tunables. The function fails if not all of the tunables are supported.</p>
          <p>Note that it's not recommended to use this function while the outside tuning program is running (such as ksmtuned under Linux), as they could change the tunables in parallel, which could cause conflicts.</p>
          <p>This function may require privileged access to the hypervisor.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>params</dt>
          <dd>pointer to scheduler parameter objects</dd>
          <dt>nparams</dt>
          <dd>number of scheduler parameter objects (this value can be the same or less than the returned value nparams of <a href="libvirt-libvirt-domain.html#virDomainGetSchedulerType">virDomainGetSchedulerType</a>)</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="virNodeSuspendForDuration">
            <code>virNodeSuspendForDuration</code>
          </a>
        </h3>
        <pre class="api"><span class="type">int</span>	virNodeSuspendForDuration	(<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
					 <span class="type">unsigned int</span> target,
					 <span class="type">unsigned long long</span> duration,
					 <span class="type">unsigned int</span> flags)</pre>
        <div class="description">
          <p>Attempt to suspend the node (host machine) for the given duration of time in the specified state (Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend). Schedule the node's Real-Time-Clock interrupt to resume the node after the duration is complete.</p>
        </div>
        <dl class="variablelist">
          <dt>conn</dt>
          <dd>pointer to the hypervisor connection</dd>
          <dt>target</dt>
          <dd>the state to which the host must be suspended to, such as: <a href="libvirt-libvirt-host.html#VIR_NODE_SUSPEND_TARGET_MEM">VIR_NODE_SUSPEND_TARGET_MEM</a> (Suspend-to-RAM) <a href="libvirt-libvirt-host.html#VIR_NODE_SUSPEND_TARGET_DISK">VIR_NODE_SUSPEND_TARGET_DISK</a> (Suspend-to-Disk) <a href="libvirt-libvirt-host.html#VIR_NODE_SUSPEND_TARGET_HYBRID">VIR_NODE_SUSPEND_TARGET_HYBRID</a> (Hybrid-Suspend, which is a combination of the former modes).</dd>
          <dt>duration</dt>
          <dd>the time duration in seconds for which the host has to be suspended</dd>
          <dt>flags</dt>
          <dd>extra flags; not used yet, so callers should always pass 0</dd>
          <dt>Returns</dt>
          <dd>0 on success (i.e., the node will be suspended after a short delay), -1 on failure (the operation is not supported, or an attempted suspend is already underway).</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 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>