driver.h 22.1 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
#include <signal.h>

16 17 18 19
#ifdef __cplusplus
extern "C" {
#endif

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


33 34 35 36 37 38 39 40 41 42 43 44 45 46
/* 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;

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
/* 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)

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

201
typedef char *
202 203
        (*virDrvDomainGetSchedulerType)	(virDomainPtr domain,
                                         int *nparams);
204

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

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

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

R
Richard W.M. Jones 已提交
228 229 230 231 232
typedef int
    (*virDrvDomainBlockPeek)
                    (virDomainPtr domain,
                     const char *path,
                     unsigned long long offset, size_t size,
233 234
                     void *buffer,
                     unsigned int flags);
R
Richard W.M. Jones 已提交
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
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);

266 267 268
typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;

269 270 271 272 273 274 275
typedef int
    (*virDrvNodeGetCellsFreeMemory)
                    (virConnectPtr conn,
                     unsigned long long *freeMems,
                     int startCell,
                     int maxCells);

276 277
typedef unsigned long long
    (*virDrvNodeGetFreeMemory)
278
                    (virConnectPtr conn);
279

280 281 282 283 284
/**
 * _virDriver:
 *
 * Structure associated to a virtualization driver, defining the various
 * entry points for it.
285 286 287 288 289 290
 *
 * All drivers must support the following fields/methods:
 *  - no
 *  - name
 *  - open
 *  - close
291 292
 */
struct _virDriver {
293 294 295 296 297 298
    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;
299
    virDrvSupportsFeature   supports_feature;
300 301
    virDrvGetType			type;
    virDrvGetVersion		version;
302 303
    virDrvGetHostname       getHostname;
    virDrvGetURI            getURI;
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
    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;
343 344 345
    virDrvDomainMigratePrepare	domainMigratePrepare;
    virDrvDomainMigratePerform	domainMigratePerform;
    virDrvDomainMigrateFinish	domainMigrateFinish;
346 347
    virDrvDomainBlockStats      domainBlockStats;
    virDrvDomainInterfaceStats  domainInterfaceStats;
R
Richard W.M. Jones 已提交
348
    virDrvDomainBlockPeek	domainBlockPeek;
349 350
    virDrvNodeGetCellsFreeMemory	nodeGetCellsFreeMemory;
    virDrvNodeGetFreeMemory		getFreeMemory;
351 352
};

353
typedef int
354
        (*virDrvNumOfNetworks)		(virConnectPtr conn);
355
typedef int
356 357 358
        (*virDrvListNetworks)		(virConnectPtr conn,
                                         char **const names,
                                         int maxnames);
359
typedef int
360
        (*virDrvNumOfDefinedNetworks)	(virConnectPtr conn);
361
typedef int
362 363 364
        (*virDrvListDefinedNetworks)	(virConnectPtr conn,
                                         char **const names,
                                         int maxnames);
365
typedef virNetworkPtr
366 367
        (*virDrvNetworkLookupByUUID)	(virConnectPtr conn,
                                         const unsigned char *uuid);
368
typedef virNetworkPtr
369 370
        (*virDrvNetworkLookupByName)	(virConnectPtr conn,
                                         const char *name);
371
typedef virNetworkPtr
372 373
        (*virDrvNetworkCreateXML)	(virConnectPtr conn,
                                         const char *xmlDesc);
374
typedef virNetworkPtr
375 376
        (*virDrvNetworkDefineXML)	(virConnectPtr conn,
                                         const char *xml);
377
typedef int
378
        (*virDrvNetworkUndefine)	(virNetworkPtr network);
379
typedef int
380
        (*virDrvNetworkCreate)		(virNetworkPtr network);
381
typedef int
382
        (*virDrvNetworkDestroy)		(virNetworkPtr network);
383
typedef char *
384 385
        (*virDrvNetworkDumpXML)		(virNetworkPtr network,
                                         int flags);
386
typedef char *
387
        (*virDrvNetworkGetBridgeName)	(virNetworkPtr network);
388
typedef int
389 390
        (*virDrvNetworkGetAutostart)	(virNetworkPtr network,
                                         int *autostart);
391
typedef int
392 393
        (*virDrvNetworkSetAutostart)	(virNetworkPtr network,
                                         int autostart);
394

395 396 397 398 399 400 401 402 403

typedef struct _virNetworkDriver virNetworkDriver;
typedef virNetworkDriver *virNetworkDriverPtr;

/**
 * _virNetworkDriver:
 *
 * Structure associated to a network virtualization driver, defining the various
 * entry points for it.
404 405 406 407
 *
 * All drivers must support the following fields/methods:
 *  - open
 *  - close
408 409
 */
struct _virNetworkDriver {
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
        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;
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

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;
};

575 576 577 578
typedef int (*virDrvStateInitialize) (void);
typedef int (*virDrvStateCleanup) (void);
typedef int (*virDrvStateReload) (void);
typedef int (*virDrvStateActive) (void);
579
typedef int (*virDrvSigHandler) (siginfo_t *siginfo);
580 581 582 583 584 585 586 587 588

typedef struct _virStateDriver virStateDriver;
typedef virStateDriver *virStateDriverPtr;

struct _virStateDriver {
    virDrvStateInitialize  initialize;
    virDrvStateCleanup     cleanup;
    virDrvStateReload      reload;
    virDrvStateActive      active;
589
    virDrvSigHandler       sigHandler;
590
};
591 592 593 594 595 596 597

/*
 * Registration
 * TODO: also need ways to (des)activate a given driver
 *       lookup based on the URI given in a virConnectOpen(ReadOnly)
 */
int virRegisterDriver(virDriverPtr);
598
int virRegisterNetworkDriver(virNetworkDriverPtr);
599
int virRegisterStorageDriver(virStorageDriverPtr);
600
int virRegisterStateDriver(virStateDriverPtr);
601 602 603 604 605

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