driver.h 21.6 KB
Newer Older
1
/*
2
 * driver.h: description of the set of interfaces provided by a
3 4 5 6 7 8
 *           entry point to the virtualization engine
 */

#ifndef __VIR_DRIVER_H__
#define __VIR_DRIVER_H__

9 10
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"
11

12 13
#include <libxml/uri.h>

14 15 16 17
#ifdef __cplusplus
extern "C" {
#endif

18 19 20 21
/*
 * List of registered drivers numbers
 */
typedef enum {
22 23 24
    VIR_DRV_XEN_UNIFIED = 1,
    VIR_DRV_TEST = 2,
    VIR_DRV_QEMU = 3,
25
    VIR_DRV_REMOTE = 4,
26
    VIR_DRV_OPENVZ = 5,
D
Daniel Veillard 已提交
27
    VIR_DRV_LXC = 6
28 29 30
} virDrvNo;


31 32 33 34 35 36 37 38 39 40 41 42 43 44
/* Status codes returned from driver open call. */
typedef enum {
    /* Opened successfully. */
    VIR_DRV_OPEN_SUCCESS = 0,

    /* 'name' is not for us. */
    VIR_DRV_OPEN_DECLINED = -1,

    /* 'name' is for us, but there was some error.  virConnectOpen will
     * return an error rather than continue probing the other drivers.
     */
    VIR_DRV_OPEN_ERROR = -2,
} virDrvOpenStatus;

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
/* Feature detection.  This is a libvirt-private interface for determining
 * what features are supported by the driver.
 *
 * The remote driver passes features through to the real driver at the
 * remote end unmodified, except if you query a VIR_DRV_FEATURE_REMOTE*
 * feature.
 */
    /* Driver supports V1-style virDomainMigrate, ie. domainMigratePrepare/
     * domainMigratePerform/domainMigrateFinish.
     */
#define VIR_DRV_FEATURE_MIGRATION_V1 1

    /* Driver is not local. */
#define VIR_DRV_FEATURE_REMOTE 2

/* Internal feature-detection macro.  Don't call drv->supports_feature
 * directly, because it may be NULL, use this macro instead.
 *
 * Note that you must check for errors.
 *
 * Returns:
 *   >= 1  Feature is supported.
 *   0     Feature is not supported.
 *   -1    Error.
 */
#define VIR_DRV_SUPPORTS_FEATURE(drv,conn,feature)                      \
    ((drv)->supports_feature ? (drv)->supports_feature((conn),(feature)) : 0)

73
typedef const char *
74
        (*virDrvProbe)			(void);
75
typedef virDrvOpenStatus
76
        (*virDrvOpen)			(virConnectPtr conn,
77 78 79
                             xmlURIPtr uri,
                             virConnectAuthPtr auth,
                             int flags);
80
typedef int
81
        (*virDrvClose)			(virConnectPtr conn);
82 83
typedef int
    (*virDrvSupportsFeature) (virConnectPtr conn, int feature);
84
typedef const char *
85
        (*virDrvGetType)		(virConnectPtr conn);
86
typedef int
87 88
        (*virDrvGetVersion)		(virConnectPtr conn,
                                         unsigned long *hvVer);
89 90 91 92
typedef char *
    (*virDrvGetHostname)    (virConnectPtr conn);
typedef char *
    (*virDrvGetURI)         (virConnectPtr conn);
93
typedef int
94 95
        (*virDrvGetMaxVcpus)		(virConnectPtr conn,
                                         const char *type);
96
typedef int
97 98
        (*virDrvNodeGetInfo)		(virConnectPtr conn,
                                         virNodeInfoPtr info);
99
typedef char *
100
        (*virDrvGetCapabilities) (virConnectPtr conn);
101
typedef int
102 103 104
        (*virDrvListDomains)		(virConnectPtr conn,
                                         int *ids,
                                         int maxids);
105
typedef int
106
        (*virDrvNumOfDomains)		(virConnectPtr conn);
107
typedef virDomainPtr
108 109 110
        (*virDrvDomainCreateLinux)	(virConnectPtr conn,
                                         const char *xmlDesc,
                                         unsigned int flags);
111
typedef virDomainPtr
112 113
        (*virDrvDomainLookupByID)	(virConnectPtr conn,
                                         int id);
114
typedef virDomainPtr
115 116
        (*virDrvDomainLookupByUUID)	(virConnectPtr conn,
                                         const unsigned char *uuid);
117
typedef virDomainPtr
118 119
        (*virDrvDomainLookupByName)	(virConnectPtr conn,
                                         const char *name);
120
typedef int
121
        (*virDrvDomainSuspend)		(virDomainPtr domain);
122
typedef int
123
        (*virDrvDomainResume)		(virDomainPtr domain);
124
typedef int
125
        (*virDrvDomainShutdown)		(virDomainPtr domain);
126
typedef int
127 128
        (*virDrvDomainReboot)		(virDomainPtr domain,
                                         unsigned int flags);
129
typedef int
130
        (*virDrvDomainDestroy)		(virDomainPtr domain);
131
typedef char *
132
        (*virDrvDomainGetOSType)	(virDomainPtr domain);
133
typedef unsigned long
134
        (*virDrvDomainGetMaxMemory)	(virDomainPtr domain);
135
typedef int
136 137
        (*virDrvDomainSetMaxMemory)	(virDomainPtr domain,
                                         unsigned long memory);
138
typedef int
139 140
        (*virDrvDomainSetMemory)	(virDomainPtr domain,
                                         unsigned long memory);
141
typedef int
142 143
        (*virDrvDomainGetInfo)		(virDomainPtr domain,
                                         virDomainInfoPtr info);
144
typedef int
145 146
        (*virDrvDomainSave)		(virDomainPtr domain,
                                         const char *to);
147
typedef int
148 149
        (*virDrvDomainRestore)		(virConnectPtr conn,
                                         const char *from);
D
Daniel Veillard 已提交
150
typedef int
151 152 153
        (*virDrvDomainCoreDump)		(virDomainPtr domain,
                                         const char *to,
                                         int flags);
154
typedef char *
155 156
        (*virDrvDomainDumpXML)		(virDomainPtr dom,
                                         int flags);
157
typedef int
158 159 160
        (*virDrvListDefinedDomains)	(virConnectPtr conn,
                                         char **const names,
                                         int maxnames);
161
typedef int
162
        (*virDrvNumOfDefinedDomains)	(virConnectPtr conn);
163
typedef int
164
        (*virDrvDomainCreate)		(virDomainPtr dom);
165
typedef virDomainPtr
166 167
        (*virDrvDomainDefineXML)	(virConnectPtr conn,
                                         const char *xml);
168
typedef int
169
        (*virDrvDomainUndefine)		(virDomainPtr dom);
170
typedef int
171 172
        (*virDrvDomainSetVcpus)		(virDomainPtr domain,
                                         unsigned int nvcpus);
173
typedef int
174 175 176 177
        (*virDrvDomainPinVcpu)		(virDomainPtr domain,
                                         unsigned int vcpu,
                                         unsigned char *cpumap,
                                         int maplen);
178
typedef int
179 180 181 182 183
        (*virDrvDomainGetVcpus)		(virDomainPtr domain,
                                         virVcpuInfoPtr info,
                                         int maxinfo,
                                         unsigned char *cpumaps,
                                         int maplen);
184
typedef int
185
        (*virDrvDomainGetMaxVcpus)	(virDomainPtr domain);
186
typedef int
187 188
        (*virDrvDomainAttachDevice)	(virDomainPtr domain,
                                         const char *xml);
189
typedef int
190 191
        (*virDrvDomainDetachDevice)	(virDomainPtr domain,
                                         const char *xml);
192
typedef int
193 194
        (*virDrvDomainGetAutostart)	(virDomainPtr domain,
                                         int *autostart);
195
typedef int
196 197
        (*virDrvDomainSetAutostart)	(virDomainPtr domain,
                                         int autostart);
198

199
typedef char *
200 201
        (*virDrvDomainGetSchedulerType)	(virDomainPtr domain,
                                         int *nparams);
202

203
typedef int
204 205 206 207
        (*virDrvDomainGetSchedulerParameters)
                                        (virDomainPtr domain,
                                         virSchedParameterPtr params,
                                         int *nparams);
208 209

typedef int
210 211 212 213
        (*virDrvDomainSetSchedulerParameters)
                                        (virDomainPtr domain,
                                         virSchedParameterPtr params,
                                         int nparams);
214

215 216 217 218 219 220 221 222 223 224 225
typedef int
    (*virDrvDomainBlockStats)
                    (virDomainPtr domain,
                     const char *path,
                     struct _virDomainBlockStats *stats);
typedef int
    (*virDrvDomainInterfaceStats)
                    (virDomainPtr domain,
                     const char *path,
                     struct _virDomainInterfaceStats *stats);

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
typedef int
    (*virDrvDomainMigratePrepare)
                    (virConnectPtr dconn,
                     char **cookie,
                     int *cookielen,
                     const char *uri_in,
                     char **uri_out,
                     unsigned long flags,
                     const char *dname,
                     unsigned long resource);

typedef int
    (*virDrvDomainMigratePerform)
                    (virDomainPtr domain,
                     const char *cookie,
                     int cookielen,
                     const char *uri,
                     unsigned long flags,
                     const char *dname,
                     unsigned long resource);

typedef virDomainPtr
    (*virDrvDomainMigrateFinish)
                    (virConnectPtr dconn,
                     const char *dname,
                     const char *cookie,
                     int cookielen,
                     const char *uri,
                     unsigned long flags);

256 257 258
typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;

259 260 261 262 263 264 265
typedef int
    (*virDrvNodeGetCellsFreeMemory)
                    (virConnectPtr conn,
                     unsigned long long *freeMems,
                     int startCell,
                     int maxCells);

266 267
typedef unsigned long long
    (*virDrvNodeGetFreeMemory)
268
                    (virConnectPtr conn);
269

270 271 272 273 274
/**
 * _virDriver:
 *
 * Structure associated to a virtualization driver, defining the various
 * entry points for it.
275 276 277 278 279 280
 *
 * All drivers must support the following fields/methods:
 *  - no
 *  - name
 *  - open
 *  - close
281 282
 */
struct _virDriver {
283 284 285 286 287 288
    int	       no;	/* the number virDrvNo */
    const char * name;	/* the name of the driver */
    unsigned long ver;	/* the version of the backend */
    virDrvProbe			probe;
    virDrvOpen			open;
    virDrvClose			close;
289
    virDrvSupportsFeature   supports_feature;
290 291
    virDrvGetType			type;
    virDrvGetVersion		version;
292 293
    virDrvGetHostname       getHostname;
    virDrvGetURI            getURI;
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
    virDrvGetMaxVcpus		getMaxVcpus;
    virDrvNodeGetInfo		nodeGetInfo;
    virDrvGetCapabilities		getCapabilities;
    virDrvListDomains		listDomains;
    virDrvNumOfDomains		numOfDomains;
    virDrvDomainCreateLinux		domainCreateLinux;
    virDrvDomainLookupByID		domainLookupByID;
    virDrvDomainLookupByUUID	domainLookupByUUID;
    virDrvDomainLookupByName	domainLookupByName;
    virDrvDomainSuspend		domainSuspend;
    virDrvDomainResume		domainResume;
    virDrvDomainShutdown		domainShutdown;
    virDrvDomainReboot		domainReboot;
    virDrvDomainDestroy		domainDestroy;
    virDrvDomainGetOSType		domainGetOSType;
    virDrvDomainGetMaxMemory	domainGetMaxMemory;
    virDrvDomainSetMaxMemory	domainSetMaxMemory;
    virDrvDomainSetMemory		domainSetMemory;
    virDrvDomainGetInfo		domainGetInfo;
    virDrvDomainSave		domainSave;
    virDrvDomainRestore		domainRestore;
    virDrvDomainCoreDump		domainCoreDump;
    virDrvDomainSetVcpus		domainSetVcpus;
    virDrvDomainPinVcpu		domainPinVcpu;
    virDrvDomainGetVcpus		domainGetVcpus;
    virDrvDomainGetMaxVcpus		domainGetMaxVcpus;
    virDrvDomainDumpXML		domainDumpXML;
    virDrvListDefinedDomains	listDefinedDomains;
    virDrvNumOfDefinedDomains	numOfDefinedDomains;
    virDrvDomainCreate		domainCreate;
    virDrvDomainDefineXML           domainDefineXML;
    virDrvDomainUndefine            domainUndefine;
    virDrvDomainAttachDevice	domainAttachDevice;
    virDrvDomainDetachDevice	domainDetachDevice;
    virDrvDomainGetAutostart	domainGetAutostart;
    virDrvDomainSetAutostart	domainSetAutostart;
    virDrvDomainGetSchedulerType	domainGetSchedulerType;
    virDrvDomainGetSchedulerParameters domainGetSchedulerParameters;
    virDrvDomainSetSchedulerParameters domainSetSchedulerParameters;
333 334 335
    virDrvDomainMigratePrepare	domainMigratePrepare;
    virDrvDomainMigratePerform	domainMigratePerform;
    virDrvDomainMigrateFinish	domainMigrateFinish;
336 337
    virDrvDomainBlockStats      domainBlockStats;
    virDrvDomainInterfaceStats  domainInterfaceStats;
338 339
    virDrvNodeGetCellsFreeMemory	nodeGetCellsFreeMemory;
    virDrvNodeGetFreeMemory		getFreeMemory;
340 341
};

342
typedef int
343
        (*virDrvNumOfNetworks)		(virConnectPtr conn);
344
typedef int
345 346 347
        (*virDrvListNetworks)		(virConnectPtr conn,
                                         char **const names,
                                         int maxnames);
348
typedef int
349
        (*virDrvNumOfDefinedNetworks)	(virConnectPtr conn);
350
typedef int
351 352 353
        (*virDrvListDefinedNetworks)	(virConnectPtr conn,
                                         char **const names,
                                         int maxnames);
354
typedef virNetworkPtr
355 356
        (*virDrvNetworkLookupByUUID)	(virConnectPtr conn,
                                         const unsigned char *uuid);
357
typedef virNetworkPtr
358 359
        (*virDrvNetworkLookupByName)	(virConnectPtr conn,
                                         const char *name);
360
typedef virNetworkPtr
361 362
        (*virDrvNetworkCreateXML)	(virConnectPtr conn,
                                         const char *xmlDesc);
363
typedef virNetworkPtr
364 365
        (*virDrvNetworkDefineXML)	(virConnectPtr conn,
                                         const char *xml);
366
typedef int
367
        (*virDrvNetworkUndefine)	(virNetworkPtr network);
368
typedef int
369
        (*virDrvNetworkCreate)		(virNetworkPtr network);
370
typedef int
371
        (*virDrvNetworkDestroy)		(virNetworkPtr network);
372
typedef char *
373 374
        (*virDrvNetworkDumpXML)		(virNetworkPtr network,
                                         int flags);
375
typedef char *
376
        (*virDrvNetworkGetBridgeName)	(virNetworkPtr network);
377
typedef int
378 379
        (*virDrvNetworkGetAutostart)	(virNetworkPtr network,
                                         int *autostart);
380
typedef int
381 382
        (*virDrvNetworkSetAutostart)	(virNetworkPtr network,
                                         int autostart);
383

384 385 386 387 388 389 390 391 392

typedef struct _virNetworkDriver virNetworkDriver;
typedef virNetworkDriver *virNetworkDriverPtr;

/**
 * _virNetworkDriver:
 *
 * Structure associated to a network virtualization driver, defining the various
 * entry points for it.
393 394 395 396
 *
 * All drivers must support the following fields/methods:
 *  - open
 *  - close
397 398
 */
struct _virNetworkDriver {
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
        const char * name;	/* the name of the driver */
        virDrvOpen			open;
        virDrvClose			close;
        virDrvNumOfNetworks		numOfNetworks;
        virDrvListNetworks		listNetworks;
        virDrvNumOfDefinedNetworks	numOfDefinedNetworks;
        virDrvListDefinedNetworks	listDefinedNetworks;
        virDrvNetworkLookupByUUID	networkLookupByUUID;
        virDrvNetworkLookupByName	networkLookupByName;
        virDrvNetworkCreateXML		networkCreateXML;
        virDrvNetworkDefineXML		networkDefineXML;
        virDrvNetworkUndefine		networkUndefine;
        virDrvNetworkCreate		networkCreate;
        virDrvNetworkDestroy		networkDestroy;
        virDrvNetworkDumpXML		networkDumpXML;
        virDrvNetworkGetBridgeName	networkGetBridgeName;
        virDrvNetworkGetAutostart	networkGetAutostart;
        virDrvNetworkSetAutostart	networkSetAutostart;
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

typedef int
    (*virDrvConnectNumOfStoragePools)        (virConnectPtr conn);
typedef int
    (*virDrvConnectListStoragePools)         (virConnectPtr conn,
                                              char **const names,
                                              int maxnames);
typedef int
    (*virDrvConnectNumOfDefinedStoragePools) (virConnectPtr conn);
typedef int
    (*virDrvConnectListDefinedStoragePools)  (virConnectPtr conn,
                                              char **const names,
                                              int maxnames);
typedef virStoragePoolPtr
    (*virDrvStoragePoolLookupByName)         (virConnectPtr conn,
                                              const char *name);
typedef virStoragePoolPtr
    (*virDrvStoragePoolLookupByUUID)         (virConnectPtr conn,
                                              const unsigned char *uuid);
typedef virStoragePoolPtr
    (*virDrvStoragePoolLookupByVolume)       (virStorageVolPtr vol);
typedef virStoragePoolPtr
    (*virDrvStoragePoolCreateXML)            (virConnectPtr conn,
                                              const char *xmlDesc,
                                              unsigned int flags);
typedef virStoragePoolPtr
    (*virDrvStoragePoolDefineXML)            (virConnectPtr conn,
                                              const char *xmlDesc,
                                              unsigned int flags);
typedef int
    (*virDrvStoragePoolUndefine)             (virStoragePoolPtr pool);
typedef int
    (*virDrvStoragePoolBuild)                (virStoragePoolPtr pool,
                                              unsigned int flags);
typedef int
    (*virDrvStoragePoolCreate)               (virStoragePoolPtr pool,
                                              unsigned int flags);
typedef int
    (*virDrvStoragePoolDestroy)              (virStoragePoolPtr pool);
typedef int
    (*virDrvStoragePoolDelete)               (virStoragePoolPtr pool,
                                              unsigned int flags);
typedef int
    (*virDrvStoragePoolRefresh)              (virStoragePoolPtr pool,
                                              unsigned int flags);
typedef int
    (*virDrvStoragePoolGetInfo)              (virStoragePoolPtr vol,
                                              virStoragePoolInfoPtr info);
typedef char *
    (*virDrvStoragePoolGetXMLDesc)           (virStoragePoolPtr pool,
                                              unsigned int flags);
typedef int
    (*virDrvStoragePoolGetAutostart)         (virStoragePoolPtr pool,
                                              int *autostart);
typedef int
    (*virDrvStoragePoolSetAutostart)         (virStoragePoolPtr pool,
                                              int autostart);
typedef int
    (*virDrvStoragePoolNumOfVolumes)         (virStoragePoolPtr pool);
typedef int
    (*virDrvStoragePoolListVolumes)          (virStoragePoolPtr pool,
                                              char **const names,
                                              int maxnames);


typedef virStorageVolPtr
    (*virDrvStorageVolLookupByName)          (virStoragePoolPtr pool,
                                              const char *name);
typedef virStorageVolPtr
    (*virDrvStorageVolLookupByKey)           (virConnectPtr pool,
                                              const char *key);
typedef virStorageVolPtr
    (*virDrvStorageVolLookupByPath)          (virConnectPtr pool,
                                              const char *path);


typedef virStorageVolPtr
    (*virDrvStorageVolCreateXML)             (virStoragePoolPtr pool,
                                              const char *xmldesc,
                                              unsigned int flags);
typedef int
    (*virDrvStorageVolDelete)               (virStorageVolPtr vol,
                                             unsigned int flags);

typedef int
    (*virDrvStorageVolGetInfo)               (virStorageVolPtr vol,
                                              virStorageVolInfoPtr info);
typedef char *
    (*virDrvStorageVolGetXMLDesc)            (virStorageVolPtr pool,
                                              unsigned int flags);
typedef char *
    (*virDrvStorageVolGetPath)               (virStorageVolPtr vol);



typedef struct _virStorageDriver virStorageDriver;
typedef virStorageDriver *virStorageDriverPtr;

/**
 * _virStorageDriver:
 *
 * Structure associated to a network virtualization driver, defining the various
 * entry points for it.
 *
 * All drivers must support the following fields/methods:
 *  - open
 *  - close
 */
struct _virStorageDriver {
    const char * name;    /* the name of the driver */
    virDrvOpen            open;
    virDrvClose           close;

    virDrvConnectNumOfStoragePools numOfPools;
    virDrvConnectListStoragePools listPools;
    virDrvConnectNumOfDefinedStoragePools numOfDefinedPools;
    virDrvConnectListDefinedStoragePools listDefinedPools;
    virDrvStoragePoolLookupByName poolLookupByName;
    virDrvStoragePoolLookupByUUID poolLookupByUUID;
    virDrvStoragePoolLookupByVolume poolLookupByVolume;
    virDrvStoragePoolCreateXML poolCreateXML;
    virDrvStoragePoolDefineXML poolDefineXML;
    virDrvStoragePoolBuild poolBuild;
    virDrvStoragePoolUndefine poolUndefine;
    virDrvStoragePoolCreate poolCreate;
    virDrvStoragePoolDestroy poolDestroy;
    virDrvStoragePoolDelete poolDelete;
    virDrvStoragePoolRefresh poolRefresh;
    virDrvStoragePoolGetInfo poolGetInfo;
    virDrvStoragePoolGetXMLDesc poolGetXMLDesc;
    virDrvStoragePoolGetAutostart poolGetAutostart;
    virDrvStoragePoolSetAutostart poolSetAutostart;
    virDrvStoragePoolNumOfVolumes poolNumOfVolumes;
    virDrvStoragePoolListVolumes poolListVolumes;

    virDrvStorageVolLookupByName volLookupByName;
    virDrvStorageVolLookupByKey volLookupByKey;
    virDrvStorageVolLookupByPath volLookupByPath;
    virDrvStorageVolCreateXML volCreateXML;
    virDrvStorageVolDelete volDelete;
    virDrvStorageVolGetInfo volGetInfo;
    virDrvStorageVolGetXMLDesc volGetXMLDesc;
    virDrvStorageVolGetPath volGetPath;
};

564 565 566 567 568 569 570 571 572 573 574 575 576 577
typedef int (*virDrvStateInitialize) (void);
typedef int (*virDrvStateCleanup) (void);
typedef int (*virDrvStateReload) (void);
typedef int (*virDrvStateActive) (void);

typedef struct _virStateDriver virStateDriver;
typedef virStateDriver *virStateDriverPtr;

struct _virStateDriver {
    virDrvStateInitialize  initialize;
    virDrvStateCleanup     cleanup;
    virDrvStateReload      reload;
    virDrvStateActive      active;
};
578 579 580 581 582 583 584

/*
 * Registration
 * TODO: also need ways to (des)activate a given driver
 *       lookup based on the URI given in a virConnectOpen(ReadOnly)
 */
int virRegisterDriver(virDriverPtr);
585
int virRegisterNetworkDriver(virNetworkDriverPtr);
586
int virRegisterStorageDriver(virStorageDriverPtr);
587
int virRegisterStateDriver(virStateDriverPtr);
588 589 590 591 592

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VIR_DRIVER_H__ */