A type to represent the new vsock device. Also implement an allocation function to allow future addition of private data. https://bugzilla.redhat.com/show_bug.cgi?id=1291851 Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/conf/domain_conf.c | 21 +++++++++++++++++++++ src/conf/domain_conf.h | 8 ++++++++ src/libvirt_private.syms | 1 + 3 files changed, 30 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3689ac0a82..5b4b182fd2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2027,6 +2027,27 @@ virDomainActualNetDefFree(virDomainActualNetDefPtr def) VIR_FREE(def); } + +virDomainVsockDefPtr +virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt ATTRIBUTE_UNUSED) +{ + virDomainVsockDefPtr ret = NULL; + virDomainVsockDefPtr vsock; + + if (VIR_ALLOC(vsock) < 0) + return NULL; + + VIR_STEAL_PTR(ret, vsock); + return ret; +} + + +void +virDomainVsockDefFree(virDomainVsockDefPtr vsock ATTRIBUTE_UNUSED) +{ +} + + void virDomainNetDefClear(virDomainNetDefPtr def) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a78fdee40c..0eae14e732 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -157,6 +157,9 @@ typedef virDomainTPMDef *virDomainTPMDefPtr; typedef struct _virDomainIOMMUDef virDomainIOMMUDef; typedef virDomainIOMMUDef *virDomainIOMMUDefPtr; +typedef struct _virDomainVsockDef virDomainVsockDef; +typedef virDomainVsockDef *virDomainVsockDefPtr; + typedef struct _virDomainVirtioOptions virDomainVirtioOptions; typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr; @@ -2310,6 +2313,9 @@ struct _virDomainIOMMUDef { virTristateSwitch iotlb; }; +struct _virDomainVsockDef { +}; + struct _virDomainVirtioOptions { virTristateSwitch iommu; virTristateSwitch ats; @@ -2788,6 +2794,8 @@ bool virDomainControllerIsPSeriesPHB(const virDomainControllerDef *cont); virDomainFSDefPtr virDomainFSDefNew(void); void virDomainFSDefFree(virDomainFSDefPtr def); void virDomainActualNetDefFree(virDomainActualNetDefPtr def); +virDomainVsockDefPtr virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt); +void virDomainVsockDefFree(virDomainVsockDefPtr vsock); void virDomainNetDefClear(virDomainNetDefPtr def); void virDomainNetDefFree(virDomainNetDefPtr def); void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 3dece252df..8e33f3e9f6 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -573,6 +573,7 @@ virDomainVideoVGAConfTypeFromString; virDomainVideoVGAConfTypeToString; virDomainVirtTypeFromString; virDomainVirtTypeToString; +virDomainVsockDefNew; virDomainWatchdogActionTypeFromString; virDomainWatchdogActionTypeToString; virDomainWatchdogDefFree; -- 2.16.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list