conf: move anonymous backend struct from virDomainNetDef into its own struct

This will allow us to call parser/formatter functions with a pointer
to just the backend part.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Laine Stump 2022-10-27 15:00:00 -04:00
parent d3307a8fd2
commit 7f6bb51eb9
2 changed files with 8 additions and 4 deletions

View File

@ -1051,6 +1051,11 @@ struct _virDomainActualNetDef {
unsigned int class_id; /* class ID for bandwidth 'floor' */
};
struct _virDomainNetBackend {
char *tap;
char *vhost;
};
/* Stores the virtual network interface configuration */
struct _virDomainNetDef {
virDomainNetType type;
@ -1089,10 +1094,7 @@ struct _virDomainNetDef {
virTristateSwitch rss_hash_report;
} virtio;
} driver;
struct {
char *tap;
char *vhost;
} backend;
virDomainNetBackend backend;
virDomainNetTeamingInfo *teaming;
union {
virDomainChrSourceDef *vhostuser;

View File

@ -172,6 +172,8 @@ typedef struct _virDomainMomentObjList virDomainMomentObjList;
typedef struct _virDomainNVRAMDef virDomainNVRAMDef;
typedef struct _virDomainNetBackend virDomainNetBackend;
typedef struct _virDomainNetDef virDomainNetDef;
typedef struct _virDomainNetTeamingInfo virDomainNetTeamingInfo;