diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 7f26521c7ee6b7e4fd048d2b0ea7e373d6f11443..f59c3b17ecf79138a02acd4eef96b2eadd94349d 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -645,6 +645,48 @@ typedef virTypedParameter *virTypedParameterPtr; */ #define VIR_DOMAIN_SCHEDULER_SHARES "shares" +/** + * VIR_DOMAIN_BANDWIDTH_IN_AVERAGE: + * + * Macro represents the inbound average of NIC bandwidth. + */ +#define VIR_DOMAIN_BANDWIDTH_IN_AVERAGE "inbound.average" + +/** + * VIR_DOMAIN_BANDWIDTH_IN_PEAK: + * + * Macro represents the inbound peak of NIC bandwidth. + */ +#define VIR_DOMAIN_BANDWIDTH_IN_PEAK "inbound.peak" + +/** + * VIR_DOMAIN_BANDWIDTH_IN_BURST: + * + * Macro represents the inbound burst of NIC bandwidth. + */ +#define VIR_DOMAIN_BANDWIDTH_IN_BURST "inbound.burst" + +/** + * VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE: + * + * Macro represents the outbound average of NIC bandwidth. + */ +#define VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE "outbound.average" + +/** + * VIR_DOMAIN_BANDWIDTH_OUT_PEAK: + * + * Macro represents the outbound peak of NIC bandwidth. + */ +#define VIR_DOMAIN_BANDWIDTH_OUT_PEAK "outbound.peak" + +/** + * VIR_DOMAIN_BANDWIDTH_OUT_BURST: + * + * Macro represents the outbound burst of NIC bandwidth. + */ +#define VIR_DOMAIN_BANDWIDTH_OUT_BURST "outbound.burst" + /* * Fetch scheduler parameters, caller allocates 'params' field of size 'nparams' */ @@ -1446,6 +1488,14 @@ int virDomainInterfaceStats (virDomainPtr dom, const char *path, virDomainInterfaceStatsPtr stats, size_t size); +int virDomainSetInterfaceParameters (virDomainPtr dom, + const char *device, + virTypedParameterPtr params, + int nparams, unsigned int flags); +int virDomainGetInterfaceParameters (virDomainPtr dom, + const char *device, + virTypedParameterPtr params, + int *nparams, unsigned int flags); int virDomainMemoryStats (virDomainPtr dom, virDomainMemoryStatPtr stats, unsigned int nr_stats, diff --git a/python/generator.py b/python/generator.py index 181f70e19c282f47ac68d28ff9de60633dbf3f8d..6fee3a4c428abdc560c5811549c59fd03c136903 100755 --- a/python/generator.py +++ b/python/generator.py @@ -419,6 +419,8 @@ skip_impl = ( 'virDomainBlockStatsFlags', 'virDomainSetBlockIoTune', 'virDomainGetBlockIoTune', + 'virDomainSetInterfaceParameters', + 'virDomainGetInterfaceParameters', ) qemu_skip_impl = ( diff --git a/src/driver.h b/src/driver.h index bbd6417c00400da54a5f2fc6a57909de8904ff8c..ec4abf3e4e3730459a405946c5c62fc9687156ff 100644 --- a/src/driver.h +++ b/src/driver.h @@ -375,6 +375,16 @@ typedef int (virDomainPtr domain, const char *path, struct _virDomainInterfaceStats *stats); +typedef int + (*virDrvDomainSetInterfaceParameters) (virDomainPtr dom, + const char *device, + virTypedParameterPtr params, + int nparams, unsigned int flags); +typedef int + (*virDrvDomainGetInterfaceParameters) (virDomainPtr dom, + const char *device, + virTypedParameterPtr params, + int *nparams, unsigned int flags); typedef int (*virDrvDomainMemoryStats) @@ -883,6 +893,8 @@ struct _virDriver { virDrvDomainBlockStats domainBlockStats; virDrvDomainBlockStatsFlags domainBlockStatsFlags; virDrvDomainInterfaceStats domainInterfaceStats; + virDrvDomainSetInterfaceParameters domainSetInterfaceParameters; + virDrvDomainGetInterfaceParameters domainGetInterfaceParameters; virDrvDomainMemoryStats domainMemoryStats; virDrvDomainBlockPeek domainBlockPeek; virDrvDomainMemoryPeek domainMemoryPeek; diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index 3709f080a19f3b52ad067b7682b3c51e53cac142..ea6d562ee9511f6f438fba8511bee18a13a39d0b 100644 --- a/src/libvirt_public.syms +++ b/src/libvirt_public.syms @@ -512,6 +512,8 @@ LIBVIRT_0.9.9 { global: virDomainGetNumaParameters; virDomainSetNumaParameters; + virDomainGetInterfaceParameters; + virDomainSetInterfaceParameters; } LIBVIRT_0.9.8; # .... define new API here using predicted next version number ....