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
|
<?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-network.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-network 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-network from libvirt</h1>
<p>Provides APIs for the management of networks 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_NETWORK_EVENT_CALLBACK">VIR_NETWORK_EVENT_CALLBACK</a>
</pre>
<h3>
<a href="#types">Types</a>
</h3>
<pre class="api"><span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virConnectListAllNetworksFlags">virConnectListAllNetworksFlags</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virIPAddrType">virIPAddrType</a>
<span class="keyword">typedef</span> <span class="type">struct _virNetwork</span> <a href="#virNetwork">virNetwork</a>
<span class="keyword">typedef</span> <span class="type">struct _virNetworkDHCPLease</span> <a href="#virNetworkDHCPLease">virNetworkDHCPLease</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-network.html#virNetworkDHCPLease">virNetworkDHCPLease</a> *</span> <a name="virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNetworkEventID">virNetworkEventID</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNetworkEventLifecycleType">virNetworkEventLifecycleType</a>
<span class="keyword">typedef</span> <span class="type"><a href="libvirt-libvirt-network.html#virNetwork">virNetwork</a> *</span> <a name="virNetworkPtr">virNetworkPtr</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNetworkUpdateCommand">virNetworkUpdateCommand</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNetworkUpdateFlags">virNetworkUpdateFlags</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNetworkUpdateSection">virNetworkUpdateSection</a>
<span class="keyword">typedef</span> <span class="keyword">enum</span> <a href="#virNetworkXMLFlags">virNetworkXMLFlags</a>
</pre>
<h3>
<a href="#functions">Functions</a>
</h3>
<pre class="api"><span class="type">int</span> <a href="#virConnectListAllNetworks">virConnectListAllNetworks</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a> **</span> nets, <br/> <span class="type">unsigned int</span> flags)
<span class="type">int</span> <a href="#virConnectListDefinedNetworks">virConnectListDefinedNetworks</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">char ** const</span> names, <br/> <span class="type">int</span> maxnames)
<span class="type">int</span> <a href="#virConnectListNetworks">virConnectListNetworks</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">char ** const</span> names, <br/> <span class="type">int</span> maxnames)
<span class="type">int</span> <a href="#virConnectNetworkEventDeregisterAny">virConnectNetworkEventDeregisterAny</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">int</span> callbackID)
<span class="keyword">typedef</span> <a href="#virConnectNetworkEventGenericCallback">virConnectNetworkEventGenericCallback</a>
<span class="type">void</span> <a href="#virConnectNetworkEventGenericCallback">virConnectNetworkEventGenericCallback</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net, <br/> <span class="type">void *</span> opaque)
<span class="keyword">typedef</span> <a href="#virConnectNetworkEventLifecycleCallback">virConnectNetworkEventLifecycleCallback</a>
<span class="type">void</span> <a href="#virConnectNetworkEventLifecycleCallback">virConnectNetworkEventLifecycleCallback</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net, <br/> <span class="type">int</span> event, <br/> <span class="type">int</span> detail, <br/> <span class="type">void *</span> opaque)
<span class="type">int</span> <a href="#virConnectNetworkEventRegisterAny">virConnectNetworkEventRegisterAny</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net, <br/> <span class="type">int</span> eventID, <br/> <span class="type"><a href="libvirt-libvirt-network.html#virConnectNetworkEventGenericCallback">virConnectNetworkEventGenericCallback</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="#virConnectNumOfDefinedNetworks">virConnectNumOfDefinedNetworks</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span> <a href="#virConnectNumOfNetworks">virConnectNumOfNetworks</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)
<span class="type">int</span> <a href="#virNetworkCreate">virNetworkCreate</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> <a href="#virNetworkCreateXML">virNetworkCreateXML</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">const char *</span> xmlDesc)
<span class="type">void</span> <a href="#virNetworkDHCPLeaseFree">virNetworkDHCPLeaseFree</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a></span> lease)
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> <a href="#virNetworkDefineXML">virNetworkDefineXML</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">const char *</span> xml)
<span class="type">int</span> <a href="#virNetworkDestroy">virNetworkDestroy</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type">int</span> <a href="#virNetworkFree">virNetworkFree</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type">int</span> <a href="#virNetworkGetAutostart">virNetworkGetAutostart</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">int *</span> autostart)
<span class="type">char *</span> <a href="#virNetworkGetBridgeName">virNetworkGetBridgeName</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> <a href="#virNetworkGetConnect">virNetworkGetConnect</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net)
<span class="type">int</span> <a href="#virNetworkGetDHCPLeases">virNetworkGetDHCPLeases</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">const char *</span> mac, <br/> <span class="type"><a href="libvirt-libvirt-network.html#virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a> **</span> leases, <br/> <span class="type">unsigned int</span> flags)
<span class="type">const char *</span> <a href="#virNetworkGetName">virNetworkGetName</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type">int</span> <a href="#virNetworkGetUUID">virNetworkGetUUID</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">unsigned char *</span> uuid)
<span class="type">int</span> <a href="#virNetworkGetUUIDString">virNetworkGetUUIDString</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">char *</span> buf)
<span class="type">char *</span> <a href="#virNetworkGetXMLDesc">virNetworkGetXMLDesc</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">unsigned int</span> flags)
<span class="type">int</span> <a href="#virNetworkIsActive">virNetworkIsActive</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net)
<span class="type">int</span> <a href="#virNetworkIsPersistent">virNetworkIsPersistent</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net)
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> <a href="#virNetworkLookupByName">virNetworkLookupByName</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">const char *</span> name)
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> <a href="#virNetworkLookupByUUID">virNetworkLookupByUUID</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">const unsigned char *</span> uuid)
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> <a href="#virNetworkLookupByUUIDString">virNetworkLookupByUUIDString</a> (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn, <br/> <span class="type">const char *</span> uuidstr)
<span class="type">int</span> <a href="#virNetworkRef">virNetworkRef</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type">int</span> <a href="#virNetworkSetAutostart">virNetworkSetAutostart</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">int</span> autostart)
<span class="type">int</span> <a href="#virNetworkUndefine">virNetworkUndefine</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)
<span class="type">int</span> <a href="#virNetworkUpdate">virNetworkUpdate</a> (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network, <br/> <span class="type">unsigned int</span> command, <br/> <span class="type">unsigned int</span> section, <br/> <span class="type">int</span> parentIndex, <br/> <span class="type">const char *</span> xml, <br/> <span class="type">unsigned int</span> flags)
</pre>
<h2>Description</h2>
<h3>
<a name="macros">Macros</a>
</h3>
<h3>
<a name="VIR_NETWORK_EVENT_CALLBACK">
<code>VIR_NETWORK_EVENT_CALLBACK</code>
</a>
</h3>
<pre class="api"><span class="directive">#define</span> VIR_NETWORK_EVENT_CALLBACK</pre>
<div class="description">
<p>Used to cast the event specific callback into the generic one for use for <a href="libvirt-libvirt-network.html#virConnectNetworkEventRegisterAny">virConnectNetworkEventRegisterAny</a>()</p>
</div>
<h3>
<a name="types">Types</a>
</h3>
<h3>
<a name="virConnectListAllNetworksFlags">
<code>virConnectListAllNetworksFlags</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virConnectListAllNetworksFlags {
</pre>
<table>
<tr>
<td>
<a name="VIR_CONNECT_LIST_NETWORKS_INACTIVE">VIR_CONNECT_LIST_NETWORKS_INACTIVE</a>
</td>
<td> = </td>
<td colspan="2">1</td>
</tr>
<tr>
<td>
<a name="VIR_CONNECT_LIST_NETWORKS_ACTIVE">VIR_CONNECT_LIST_NETWORKS_ACTIVE</a>
</td>
<td> = </td>
<td colspan="2">2</td>
</tr>
<tr>
<td>
<a name="VIR_CONNECT_LIST_NETWORKS_PERSISTENT">VIR_CONNECT_LIST_NETWORKS_PERSISTENT</a>
</td>
<td> = </td>
<td colspan="2">4</td>
</tr>
<tr>
<td>
<a name="VIR_CONNECT_LIST_NETWORKS_TRANSIENT">VIR_CONNECT_LIST_NETWORKS_TRANSIENT</a>
</td>
<td> = </td>
<td colspan="2">8</td>
</tr>
<tr>
<td>
<a name="VIR_CONNECT_LIST_NETWORKS_AUTOSTART">VIR_CONNECT_LIST_NETWORKS_AUTOSTART</a>
</td>
<td> = </td>
<td colspan="2">16</td>
</tr>
<tr>
<td>
<a name="VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART">VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART</a>
</td>
<td> = </td>
<td colspan="2">32</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virIPAddrType">
<code>virIPAddrType</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virIPAddrType {
</pre>
<table>
<tr>
<td>
<a name="VIR_IP_ADDR_TYPE_IPV4">VIR_IP_ADDR_TYPE_IPV4</a>
</td>
<td> = </td>
<td colspan="2">0</td>
</tr>
<tr>
<td>
<a name="VIR_IP_ADDR_TYPE_IPV6">VIR_IP_ADDR_TYPE_IPV6</a>
</td>
<td> = </td>
<td colspan="2">1</td>
</tr>
<tr>
<td>
<a name="VIR_IP_ADDR_TYPE_LAST">VIR_IP_ADDR_TYPE_LAST</a>
</td>
<td> = </td>
<td colspan="2">2</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virNetwork">
<code>virNetwork</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">struct </span>virNetwork {
</pre>
<div class="undisclosed">The content of this structure is not made public by the API</div>
<pre>
}
</pre>
</div>
<h3>
<a name="virNetworkDHCPLease">
<code>virNetworkDHCPLease</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">struct </span>virNetworkDHCPLease {
</pre>
<table>
<tr>
<td>
<span class="type">char *</span>
</td>
<td>iface</td>
<td>
<div class="comment">Network interface name</div>
</td>
</tr>
<tr>
<td>
<span class="type">long long</span>
</td>
<td>expirytime</td>
<td>
<div class="comment">Seconds since epoch</div>
</td>
</tr>
<tr>
<td>
<span class="type">int</span>
</td>
<td>type</td>
<td>
<div class="comment">
<a href="libvirt-libvirt-network.html#virIPAddrType">virIPAddrType</a>
</div>
</td>
</tr>
<tr>
<td>
<span class="type">char *</span>
</td>
<td>mac</td>
<td>
<div class="comment">MAC address</div>
</td>
</tr>
<tr>
<td>
<span class="type">char *</span>
</td>
<td>iaid</td>
<td>
<div class="comment">IAID</div>
</td>
</tr>
<tr>
<td>
<span class="type">char *</span>
</td>
<td>ipaddr</td>
<td>
<div class="comment">IP address</div>
</td>
</tr>
<tr>
<td>
<span class="type">unsigned int</span>
</td>
<td>prefix</td>
<td>
<div class="comment">IP address prefix</div>
</td>
</tr>
<tr>
<td>
<span class="type">char *</span>
</td>
<td>hostname</td>
<td>
<div class="comment">Hostname</div>
</td>
</tr>
<tr>
<td>
<span class="type">char *</span>
</td>
<td>clientid</td>
<td>
<div class="comment">Client ID or DUID</div>
</td>
</tr>
</table>
<pre>
}
</pre>
</div>
<h3>
<a name="virNetworkEventID">
<code>virNetworkEventID</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virNetworkEventID {
</pre>
<table>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_ID_LIFECYCLE">VIR_NETWORK_EVENT_ID_LIFECYCLE</a>
</td>
<td> = </td>
<td>0</td>
<td>
<div class="comment">
<a href="libvirt-libvirt-network.html#virConnectNetworkEventLifecycleCallback">virConnectNetworkEventLifecycleCallback</a>
</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_ID_LAST">VIR_NETWORK_EVENT_ID_LAST</a>
</td>
<td> = </td>
<td>1</td>
<td>
<div class="comment">NB: this enum value will increase over time as new events are added to the libvirt API. It reflects the last event ID supported by this version of the libvirt API.</div>
</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virNetworkEventLifecycleType">
<code>virNetworkEventLifecycleType</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virNetworkEventLifecycleType {
</pre>
<table>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_DEFINED">VIR_NETWORK_EVENT_DEFINED</a>
</td>
<td> = </td>
<td colspan="2">0</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_UNDEFINED">VIR_NETWORK_EVENT_UNDEFINED</a>
</td>
<td> = </td>
<td colspan="2">1</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_STARTED">VIR_NETWORK_EVENT_STARTED</a>
</td>
<td> = </td>
<td colspan="2">2</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_STOPPED">VIR_NETWORK_EVENT_STOPPED</a>
</td>
<td> = </td>
<td colspan="2">3</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_EVENT_LAST">VIR_NETWORK_EVENT_LAST</a>
</td>
<td> = </td>
<td colspan="2">4</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virNetworkUpdateCommand">
<code>virNetworkUpdateCommand</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virNetworkUpdateCommand {
</pre>
<table>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_COMMAND_NONE">VIR_NETWORK_UPDATE_COMMAND_NONE</a>
</td>
<td> = </td>
<td>0</td>
<td>
<div class="comment">(invalid)</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_COMMAND_MODIFY">VIR_NETWORK_UPDATE_COMMAND_MODIFY</a>
</td>
<td> = </td>
<td>1</td>
<td>
<div class="comment">modify an existing element</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_COMMAND_DELETE">VIR_NETWORK_UPDATE_COMMAND_DELETE</a>
</td>
<td> = </td>
<td>2</td>
<td>
<div class="comment">delete an existing element</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_COMMAND_ADD_LAST">VIR_NETWORK_UPDATE_COMMAND_ADD_LAST</a>
</td>
<td> = </td>
<td>3</td>
<td>
<div class="comment">add an element at end of list</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST">VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST</a>
</td>
<td> = </td>
<td>4</td>
<td>
<div class="comment">add an element at start of list</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_COMMAND_LAST">VIR_NETWORK_UPDATE_COMMAND_LAST</a>
</td>
<td> = </td>
<td colspan="2">5</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virNetworkUpdateFlags">
<code>virNetworkUpdateFlags</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virNetworkUpdateFlags {
</pre>
<table>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_AFFECT_CURRENT">VIR_NETWORK_UPDATE_AFFECT_CURRENT</a>
</td>
<td> = </td>
<td>0</td>
<td>
<div class="comment">affect live if network is active, config if it's not active</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_AFFECT_LIVE">VIR_NETWORK_UPDATE_AFFECT_LIVE</a>
</td>
<td> = </td>
<td>1</td>
<td>
<div class="comment">affect live state of network only</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_UPDATE_AFFECT_CONFIG">VIR_NETWORK_UPDATE_AFFECT_CONFIG</a>
</td>
<td> = </td>
<td>2</td>
<td>
<div class="comment">affect persistent config only</div>
</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virNetworkUpdateSection">
<code>virNetworkUpdateSection</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virNetworkUpdateSection {
</pre>
<table>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_NONE">VIR_NETWORK_SECTION_NONE</a>
</td>
<td> = </td>
<td>0</td>
<td>
<div class="comment">(invalid)</div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_BRIDGE">VIR_NETWORK_SECTION_BRIDGE</a>
</td>
<td> = </td>
<td>1</td>
<td>
<div class="comment"><bridge></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_DOMAIN">VIR_NETWORK_SECTION_DOMAIN</a>
</td>
<td> = </td>
<td>2</td>
<td>
<div class="comment"><domain></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_IP">VIR_NETWORK_SECTION_IP</a>
</td>
<td> = </td>
<td>3</td>
<td>
<div class="comment"><ip></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_IP_DHCP_HOST">VIR_NETWORK_SECTION_IP_DHCP_HOST</a>
</td>
<td> = </td>
<td>4</td>
<td>
<div class="comment"><ip>/<dhcp>/<host></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_IP_DHCP_RANGE">VIR_NETWORK_SECTION_IP_DHCP_RANGE</a>
</td>
<td> = </td>
<td>5</td>
<td>
<div class="comment"><ip>/<dhcp>/<range></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_FORWARD">VIR_NETWORK_SECTION_FORWARD</a>
</td>
<td> = </td>
<td>6</td>
<td>
<div class="comment"><forward></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_FORWARD_INTERFACE">VIR_NETWORK_SECTION_FORWARD_INTERFACE</a>
</td>
<td> = </td>
<td>7</td>
<td>
<div class="comment"><forward>/<interface></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_FORWARD_PF">VIR_NETWORK_SECTION_FORWARD_PF</a>
</td>
<td> = </td>
<td>8</td>
<td>
<div class="comment"><forward>/<pf></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_PORTGROUP">VIR_NETWORK_SECTION_PORTGROUP</a>
</td>
<td> = </td>
<td>9</td>
<td>
<div class="comment"><portgroup></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_DNS_HOST">VIR_NETWORK_SECTION_DNS_HOST</a>
</td>
<td> = </td>
<td>10</td>
<td>
<div class="comment"><dns>/<host></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_DNS_TXT">VIR_NETWORK_SECTION_DNS_TXT</a>
</td>
<td> = </td>
<td>11</td>
<td>
<div class="comment"><dns>/<txt></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_DNS_SRV">VIR_NETWORK_SECTION_DNS_SRV</a>
</td>
<td> = </td>
<td>12</td>
<td>
<div class="comment"><dns>/<srv></div>
</td>
</tr>
<tr>
<td>
<a name="VIR_NETWORK_SECTION_LAST">VIR_NETWORK_SECTION_LAST</a>
</td>
<td> = </td>
<td colspan="2">13</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="virNetworkXMLFlags">
<code>virNetworkXMLFlags</code>
</a>
</h3>
<div class="api">
<pre><span class="keyword">enum</span> virNetworkXMLFlags {
</pre>
<table>
<tr>
<td>
<a name="VIR_NETWORK_XML_INACTIVE">VIR_NETWORK_XML_INACTIVE</a>
</td>
<td> = </td>
<td>1</td>
<td>
<div class="comment">dump inactive network information</div>
</td>
</tr>
</table>
<pre>}
</pre>
</div>
<h3>
<a name="functions">Functions</a>
</h3>
<h3>
<a name="virConnectListAllNetworks">
<code>virConnectListAllNetworks</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectListAllNetworks (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a> **</span> nets,
<span class="type">unsigned int</span> flags)</pre>
<div class="description">
<p>Collect the list of networks, and allocate an array to store those objects. This API solves the race inherent between <a href="libvirt-libvirt-network.html#virConnectListNetworks">virConnectListNetworks</a> and <a href="libvirt-libvirt-network.html#virConnectListDefinedNetworks">virConnectListDefinedNetworks</a>.</p>
<p>Normally, all networks are returned; however, @flags can be used to filter the results for a smaller list of targeted networks. The valid flags are divided into groups, where each group contains bits that describe mutually exclusive attributes of a network, and where all bits within a group describe all possible networks.</p>
<p>The first group of @flags is <a href="libvirt-libvirt-network.html#VIR_CONNECT_LIST_NETWORKS_ACTIVE">VIR_CONNECT_LIST_NETWORKS_ACTIVE</a> (up) and <a href="libvirt-libvirt-network.html#VIR_CONNECT_LIST_NETWORKS_INACTIVE">VIR_CONNECT_LIST_NETWORKS_INACTIVE</a> (down) to filter the networks by state.</p>
<p>The second group of @flags is <a href="libvirt-libvirt-network.html#VIR_CONNECT_LIST_NETWORKS_PERSISTENT">VIR_CONNECT_LIST_NETWORKS_PERSISTENT</a> (defined) and <a href="libvirt-libvirt-network.html#VIR_CONNECT_LIST_NETWORKS_TRANSIENT">VIR_CONNECT_LIST_NETWORKS_TRANSIENT</a> (running but not defined), to filter the networks by whether they have persistent config or not.</p>
<p>The third group of @flags is <a href="libvirt-libvirt-network.html#VIR_CONNECT_LIST_NETWORKS_AUTOSTART">VIR_CONNECT_LIST_NETWORKS_AUTOSTART</a> and <a href="libvirt-libvirt-network.html#VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART">VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART</a>, to filter the networks by whether they are marked as autostart or not.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>Pointer to the hypervisor connection.</dd>
<dt>nets</dt>
<dd>Pointer to a variable to store the array containing the network objects or NULL if the list is not required (just returns number of networks).</dd>
<dt>flags</dt>
<dd>bitwise-OR of <a href="libvirt-libvirt-network.html#virConnectListAllNetworksFlags">virConnectListAllNetworksFlags</a>.</dd>
<dt>Returns</dt>
<dd>the number of networks found or -1 and sets @nets to NULL in case of error. On success, the array stored into @nets is guaranteed to have an extra allocated element set to NULL but not included in the return count, to make iteration easier. The caller is responsible for calling <a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</a>() on each array element, then calling free() on @nets.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virConnectListDefinedNetworks">
<code>virConnectListDefinedNetworks</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectListDefinedNetworks (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">char ** const</span> names,
<span class="type">int</span> maxnames)</pre>
<div class="description">
<p>list the inactive networks, stores the pointers to the names in @names</p>
<p>For more control over the results, see <a href="libvirt-libvirt-network.html#virConnectListAllNetworks">virConnectListAllNetworks</a>().</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>names</dt>
<dd>pointer to an array to store the names</dd>
<dt>maxnames</dt>
<dd>size of the array</dd>
<dt>Returns</dt>
<dd>the number of names provided in the array or -1 in case of error. Note that this command is inherently racy; a network can be defined between a call to <a href="libvirt-libvirt-network.html#virConnectNumOfDefinedNetworks">virConnectNumOfDefinedNetworks</a>() and this call; you are only guaranteed that all currently defined networks were listed if the return is less than @maxnames. The client must call free() on each returned name.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virConnectListNetworks">
<code>virConnectListNetworks</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectListNetworks (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">char ** const</span> names,
<span class="type">int</span> maxnames)</pre>
<div class="description">
<p>Collect the list of active networks, and store their names in @names</p>
<p>For more control over the results, see <a href="libvirt-libvirt-network.html#virConnectListAllNetworks">virConnectListAllNetworks</a>().</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>names</dt>
<dd>array to collect the list of names of active networks</dd>
<dt>maxnames</dt>
<dd>size of @names</dd>
<dt>Returns</dt>
<dd>the number of networks found or -1 in case of error. Note that this command is inherently racy; a network can be started between a call to <a href="libvirt-libvirt-network.html#virConnectNumOfNetworks">virConnectNumOfNetworks</a>() and this call; you are only guaranteed that all currently active networks were listed if the return is less than @maxnames. The client must call free() on each returned name.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virConnectNetworkEventDeregisterAny">
<code>virConnectNetworkEventDeregisterAny</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectNetworkEventDeregisterAny (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">int</span> callbackID)</pre>
<div class="description">
<p>Removes an event callback. The callbackID parameter should be the value obtained from a previous <a href="libvirt-libvirt-network.html#virConnectNetworkEventRegisterAny">virConnectNetworkEventRegisterAny</a>() method.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the connection</dd>
<dt>callbackID</dt>
<dd>the callback identifier</dd>
<dt>Returns</dt>
<dd>0 on success, -1 on failure</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virConnectNetworkEventGenericCallback">
<code>virConnectNetworkEventGenericCallback</code>
</a>
</h3>
<pre class="api"><span class="keyword">typedef</span> <span class="type">void</span> (*virConnectNetworkEventGenericCallback) (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net,
<span class="type">void *</span> opaque)
</pre>
<div class="description">
<p>A generic network event callback handler, for use with <a href="libvirt-libvirt-network.html#virConnectNetworkEventRegisterAny">virConnectNetworkEventRegisterAny</a>(). Specific events usually have a customization with extra parameters, often with @opaque being passed in a different parameter position; use <a href="libvirt-libvirt-network.html#VIR_NETWORK_EVENT_CALLBACK">VIR_NETWORK_EVENT_CALLBACK</a>() when registering an appropriate handler.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>the connection pointer</dd>
<dt>net</dt>
<dd>the network pointer</dd>
<dt>opaque</dt>
<dd>application specified data</dd>
</dl>
<br/>
<h3>
<a name="virConnectNetworkEventLifecycleCallback">
<code>virConnectNetworkEventLifecycleCallback</code>
</a>
</h3>
<pre class="api"><span class="keyword">typedef</span> <span class="type">void</span> (*virConnectNetworkEventLifecycleCallback) (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net,
<span class="type">int</span> event,
<span class="type">int</span> detail,
<span class="type">void *</span> opaque)
</pre>
<div class="description">
<p>This callback occurs when the network is started or stopped.</p>
<p>The callback signature to use when registering for an event of type <a href="libvirt-libvirt-network.html#VIR_NETWORK_EVENT_ID_LIFECYCLE">VIR_NETWORK_EVENT_ID_LIFECYCLE</a> with <a href="libvirt-libvirt-network.html#virConnectNetworkEventRegisterAny">virConnectNetworkEventRegisterAny</a>()</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>connection object</dd>
<dt>net</dt>
<dd>network on which the event occurred</dd>
<dt>event</dt>
<dd>The specific virNetworkEventLifeCycleType which occurred</dd>
<dt>detail</dt>
<dd>contains some details on the reason of the event. It will be 0 for the while.</dd>
<dt>opaque</dt>
<dd>application specified data</dd>
</dl>
<br/>
<h3>
<a name="virConnectNetworkEventRegisterAny">
<code>virConnectNetworkEventRegisterAny</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectNetworkEventRegisterAny (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net,
<span class="type">int</span> eventID,
<span class="type"><a href="libvirt-libvirt-network.html#virConnectNetworkEventGenericCallback">virConnectNetworkEventGenericCallback</a></span> cb,
<span class="type">void *</span> opaque,
<span class="type"><a href="libvirt-libvirt-common.html#virFreeCallback">virFreeCallback</a></span> freecb)</pre>
<div class="description">
<p>Adds a callback to receive notifications of arbitrary network events occurring on a network. This function requires that an event loop has been previously registered with <a href="libvirt-libvirt-event.html#virEventRegisterImpl">virEventRegisterImpl</a>() or <a href="libvirt-libvirt-event.html#virEventRegisterDefaultImpl">virEventRegisterDefaultImpl</a>().</p>
<p>If @net is NULL, then events will be monitored for any network. If @net is non-NULL, then only the specific network will be monitored.</p>
<p>Most types of event have a callback providing a custom set of parameters for the event. When registering an event, it is thus necessary to use the <a href="libvirt-libvirt-network.html#VIR_NETWORK_EVENT_CALLBACK">VIR_NETWORK_EVENT_CALLBACK</a>() macro to cast the supplied function pointer to match the signature of this method.</p>
<p>The <a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the network object after the callback returns, it shall take a reference to it, by calling <a href="libvirt-libvirt-network.html#virNetworkRef">virNetworkRef</a>(). The reference can be released once the object is no longer required by calling <a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</a>().</p>
<p>The return value from this method is a positive integer identifier for the callback. To unregister a callback, this callback ID should be passed to the <a href="libvirt-libvirt-network.html#virConnectNetworkEventDeregisterAny">virConnectNetworkEventDeregisterAny</a>() method.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the connection</dd>
<dt>net</dt>
<dd>pointer to the network</dd>
<dt>eventID</dt>
<dd>the event type to receive</dd>
<dt>cb</dt>
<dd>callback to the function handling network events</dd>
<dt>opaque</dt>
<dd>opaque data to pass on to the callback</dd>
<dt>freecb</dt>
<dd>optional function to deallocate opaque when not used anymore</dd>
<dt>Returns</dt>
<dd>a callback identifier on success, -1 on failure.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virConnectNumOfDefinedNetworks">
<code>virConnectNumOfDefinedNetworks</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectNumOfDefinedNetworks (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
<div class="description">
<p>Provides the number of inactive networks.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>Returns</dt>
<dd>the number of networks found or -1 in case of error</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virConnectNumOfNetworks">
<code>virConnectNumOfNetworks</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virConnectNumOfNetworks (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn)</pre>
<div class="description">
<p>Provides the number of active networks.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>Returns</dt>
<dd>the number of network found or -1 in case of error</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkCreate">
<code>virNetworkCreate</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkCreate (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>pointer to a defined network</dd>
<dt>Returns</dt>
<dd>0 in case of success, -1 in case of error</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkCreateXML">
<code>virNetworkCreateXML</code>
</a>
</h3>
<pre class="api"><span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> virNetworkCreateXML (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> xmlDesc)</pre>
<div class="description">
<p>Create and start a new virtual network, based on an XML description similar to the one returned by <a href="libvirt-libvirt-network.html#virNetworkGetXMLDesc">virNetworkGetXMLDesc</a>()</p>
<p><a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</a> should be used to free the resources after the network object is no longer needed.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>xmlDesc</dt>
<dd>an XML description of the network</dd>
<dt>Returns</dt>
<dd>a new network object or NULL in case of failure</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkDHCPLeaseFree">
<code>virNetworkDHCPLeaseFree</code>
</a>
</h3>
<pre class="api"><span class="type">void</span> virNetworkDHCPLeaseFree (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a></span> lease)</pre>
<div class="description">
<p>Frees all the memory occupied by @lease.</p>
</div>
<dl class="variablelist">
<dt>lease</dt>
<dd>pointer to a leases object</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkDefineXML">
<code>virNetworkDefineXML</code>
</a>
</h3>
<pre class="api"><span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> virNetworkDefineXML (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> xml)</pre>
<div class="description">
<p>Define an inactive persistent virtual network or modify an existing persistent one from the XML description.</p>
<p><a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</a> should be used to free the resources after the network object is no longer needed.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>xml</dt>
<dd>the XML description for the network, preferably in UTF-8</dd>
<dt>Returns</dt>
<dd>NULL in case of error, a pointer to the network otherwise</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkDestroy">
<code>virNetworkDestroy</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkDestroy (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Destroy the network object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. This does not free the associated <a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a> object. This function may require privileged access</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>Returns</dt>
<dd>0 in case of success and -1 in case of failure.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkFree">
<code>virNetworkFree</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkFree (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Free the network object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>Returns</dt>
<dd>0 in case of success and -1 in case of failure.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetAutostart">
<code>virNetworkGetAutostart</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkGetAutostart (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">int *</span> autostart)</pre>
<div class="description">
<p>Provides a boolean value indicating whether the network configured to be automatically started when the host machine boots.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>autostart</dt>
<dd>the value returned</dd>
<dt>Returns</dt>
<dd>-1 in case of error, 0 in case of success</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetBridgeName">
<code>virNetworkGetBridgeName</code>
</a>
</h3>
<pre class="api"><span class="type">char *</span> virNetworkGetBridgeName (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Provides a bridge interface name to which a domain may connect a network interface in order to join the network.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>Returns</dt>
<dd>a 0 terminated interface name, or NULL in case of error. the caller must free() the returned value.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetConnect">
<code>virNetworkGetConnect</code>
</a>
</h3>
<pre class="api"><span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> virNetworkGetConnect (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net)</pre>
<div class="description">
<p>Provides the connection pointer associated with a network. The reference counter on the connection is not increased by this call.</p>
</div>
<dl class="variablelist">
<dt>net</dt>
<dd>pointer to a network</dd>
<dt>Returns</dt>
<dd>the <a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetDHCPLeases">
<code>virNetworkGetDHCPLeases</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkGetDHCPLeases (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">const char *</span> mac,
<span class="type"><a href="libvirt-libvirt-network.html#virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a> **</span> leases,
<span class="type">unsigned int</span> flags)</pre>
<div class="description">
<p>For DHCPv4, the information returned: - Network Interface Name - Expiry Time - MAC address - IAID (NULL) - IPv4 address (with type and prefix) - Hostname (can be NULL) - Client ID (can be NULL)</p>
<p>For DHCPv6, the information returned: - Network Interface Name - Expiry Time - MAC address - IAID (can be NULL, only in rare cases) - IPv6 address (with type and prefix) - Hostname (can be NULL) - Client DUID</p>
<p>Note: @mac, @iaid, @ipaddr, @clientid are in ASCII form, not raw bytes. Note: @expirytime can 0, in case the lease is for infinite time.</p>
<p>The API fetches leases info of guests in the specified network. If the optional parameter @mac is specified, the returned list will contain only lease info about a specific guest interface with @mac. There can be multiple leases for a single @mac because this API supports DHCPv6 too.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>Pointer to network object</dd>
<dt>mac</dt>
<dd>Optional ASCII formatted MAC address of an interface</dd>
<dt>leases</dt>
<dd>Pointer to a variable to store the array containing details on obtained leases, or NULL if the list is not required (just returns number of leases).</dd>
<dt>flags</dt>
<dd>Extra flags, not used yet, so callers should always pass 0</dd>
<dt>Returns</dt>
<dd>the number of leases found or -1 and sets @leases to NULL in case of error. On success, the array stored into @leases is guaranteed to have an extra allocated element set to NULL but not included in the return count, to make iteration easier. The caller is responsible for calling <a href="libvirt-libvirt-network.html#virNetworkDHCPLeaseFree">virNetworkDHCPLeaseFree</a>() on each array element, then calling free() on @leases. See also virNetworkGetDHCPLeasesForMAC() as a convenience for filtering the list to a single MAC address. Example of usage: <a href="libvirt-libvirt-network.html#virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a> *leases = NULL; <a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a> network = ... obtain a network pointer here ...; size_t i; int nleases; unsigned int flags = 0; nleases = virNetworkGetDHCPLeases(network, NULL, &leases, flags); if (nleases < 0) error(); ... do something with returned values, for example: for (i = 0; i < nleases; i++) { <a href="libvirt-libvirt-network.html#virNetworkDHCPLeasePtr">virNetworkDHCPLeasePtr</a> lease = leases[i]; printf("Time(epoch): %lu, MAC address: %s, " "IP address: %s, Hostname: %s, ClientID: %s\n", lease->expirytime, lease->mac, lease->ipaddr, lease->hostname, lease->clientid); virNetworkDHCPLeaseFree(leases[i]); } free(leases);</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetName">
<code>virNetworkGetName</code>
</a>
</h3>
<pre class="api"><span class="type">const char *</span> virNetworkGetName (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Get the public name for that network</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>Returns</dt>
<dd>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the network object.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetUUID">
<code>virNetworkGetUUID</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkGetUUID (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">unsigned char *</span> uuid)</pre>
<div class="description">
<p>Get the UUID for a network</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>uuid</dt>
<dd>pointer to a <a href="libvirt-libvirt-host.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes array</dd>
<dt>Returns</dt>
<dd>-1 in case of error, 0 in case of success</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetUUIDString">
<code>virNetworkGetUUIDString</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkGetUUIDString (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">char *</span> buf)</pre>
<div class="description">
<p>Get the UUID for a network as string. For more information about UUID see RFC4122.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>buf</dt>
<dd>pointer to a <a href="libvirt-libvirt-host.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes array</dd>
<dt>Returns</dt>
<dd>-1 in case of error, 0 in case of success</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkGetXMLDesc">
<code>virNetworkGetXMLDesc</code>
</a>
</h3>
<pre class="api"><span class="type">char *</span> virNetworkGetXMLDesc (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">unsigned int</span> flags)</pre>
<div class="description">
<p>Provide an XML description of the network. The description may be reused later to relaunch the network with <a href="libvirt-libvirt-network.html#virNetworkCreateXML">virNetworkCreateXML</a>().</p>
<p>Normally, if a network included a physical function, the output includes all virtual functions tied to that physical interface. If @flags includes <a href="libvirt-libvirt-network.html#VIR_NETWORK_XML_INACTIVE">VIR_NETWORK_XML_INACTIVE</a>, then the expansion of virtual interfaces is not performed.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>flags</dt>
<dd>bitwise-OR of <a href="libvirt-libvirt-network.html#virNetworkXMLFlags">virNetworkXMLFlags</a></dd>
<dt>Returns</dt>
<dd>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkIsActive">
<code>virNetworkIsActive</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkIsActive (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net)</pre>
<div class="description">
<p>Determine if the network is currently running</p>
</div>
<dl class="variablelist">
<dt>net</dt>
<dd>pointer to the network object</dd>
<dt>Returns</dt>
<dd>1 if running, 0 if inactive, -1 on error</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkIsPersistent">
<code>virNetworkIsPersistent</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkIsPersistent (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> net)</pre>
<div class="description">
<p>Determine if the network has a persistent configuration which means it will still exist after shutting down</p>
</div>
<dl class="variablelist">
<dt>net</dt>
<dd>pointer to the network object</dd>
<dt>Returns</dt>
<dd>1 if persistent, 0 if transient, -1 on error</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkLookupByName">
<code>virNetworkLookupByName</code>
</a>
</h3>
<pre class="api"><span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> virNetworkLookupByName (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> name)</pre>
<div class="description">
<p>Try to lookup a network on the given hypervisor based on its name.</p>
<p><a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</a> should be used to free the resources after the network object is no longer needed.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>name</dt>
<dd>name for the network</dd>
<dt>Returns</dt>
<dd>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkLookupByUUID">
<code>virNetworkLookupByUUID</code>
</a>
</h3>
<pre class="api"><span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> virNetworkLookupByUUID (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const unsigned char *</span> uuid)</pre>
<div class="description">
<p>Try to lookup a network on the given hypervisor based on its UUID.</p>
<p><a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</a> should be used to free the resources after the network object is no longer needed.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>uuid</dt>
<dd>the raw UUID for the network</dd>
<dt>Returns</dt>
<dd>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkLookupByUUIDString">
<code>virNetworkLookupByUUIDString</code>
</a>
</h3>
<pre class="api"><span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> virNetworkLookupByUUIDString (<span class="type"><a href="libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a></span> conn,
<span class="type">const char *</span> uuidstr)</pre>
<div class="description">
<p>Try to lookup a network on the given hypervisor based on its UUID.</p>
</div>
<dl class="variablelist">
<dt>conn</dt>
<dd>pointer to the hypervisor connection</dd>
<dt>uuidstr</dt>
<dd>the string UUID for the network</dd>
<dt>Returns</dt>
<dd>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkRef">
<code>virNetworkRef</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkRef (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt-network.html#virNetworkFree">virNetworkFree</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 network would increment the reference count.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>the network 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="virNetworkSetAutostart">
<code>virNetworkSetAutostart</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkSetAutostart (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">int</span> autostart)</pre>
<div class="description">
<p>Configure the network to be automatically started when the host machine boots.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>a network object</dd>
<dt>autostart</dt>
<dd>whether the network should be automatically started 0 or 1</dd>
<dt>Returns</dt>
<dd>-1 in case of error, 0 in case of success</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkUndefine">
<code>virNetworkUndefine</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkUndefine (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network)</pre>
<div class="description">
<p>Undefine a network but does not stop it if it is running</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>pointer to a defined network</dd>
<dt>Returns</dt>
<dd>0 in case of success, -1 in case of error</dd>
</dl>
<div class="acl"/>
<h3>
<a name="virNetworkUpdate">
<code>virNetworkUpdate</code>
</a>
</h3>
<pre class="api"><span class="type">int</span> virNetworkUpdate (<span class="type"><a href="libvirt-libvirt-network.html#virNetworkPtr">virNetworkPtr</a></span> network,
<span class="type">unsigned int</span> command,
<span class="type">unsigned int</span> section,
<span class="type">int</span> parentIndex,
<span class="type">const char *</span> xml,
<span class="type">unsigned int</span> flags)</pre>
<div class="description">
<p>Update the definition of an existing network, either its live running state, its persistent configuration, or both.</p>
</div>
<dl class="variablelist">
<dt>network</dt>
<dd>pointer to a defined network</dd>
<dt>command</dt>
<dd>what action to perform (add/delete/modify) (see <a href="libvirt-libvirt-network.html#virNetworkUpdateCommand">virNetworkUpdateCommand</a> for descriptions)</dd>
<dt>section</dt>
<dd>which section of the network to update (see <a href="libvirt-libvirt-network.html#virNetworkUpdateSection">virNetworkUpdateSection</a> for descriptions)</dd>
<dt>parentIndex</dt>
<dd>which parent element, if there are multiple parents of the same type (e.g. which <ip> element when modifying a <dhcp>/<host> element), or "-1" for "don't care" or "automatically find appropriate one".</dd>
<dt>xml</dt>
<dd>the XML description for the network, preferably in UTF-8</dd>
<dt>flags</dt>
<dd>bitwise OR of <a href="libvirt-libvirt-network.html#virNetworkUpdateFlags">virNetworkUpdateFlags</a>.</dd>
<dt>Returns</dt>
<dd>0 in case of success, -1 in case of error <a href="libvirt-libvirt-network.html#virNetworkUpdateCommand">virNetworkUpdateCommand</a> <a href="libvirt-libvirt-network.html#virNetworkUpdateSection">virNetworkUpdateSection</a></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>
|