diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 54d6ae297e..86416937fd 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29566,10 +29566,10 @@ virDomainNetGetActualBandwidth(virDomainNetDefPtr iface) return iface->bandwidth; } -virNetDevVlanPtr -virDomainNetGetActualVlan(virDomainNetDefPtr iface) +const virNetDevVlan * +virDomainNetGetActualVlan(const virDomainNetDef *iface) { - virNetDevVlanPtr vlan = &iface->vlan; + const virNetDevVlan *vlan = &iface->vlan; /* if there is an ActualNetDef, *always* return * its vlan rather than the NetDef's vlan. diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 39fb42e29d..443d4fa2a3 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3217,7 +3217,7 @@ virNetDevVPortProfilePtr virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface); virNetDevBandwidthPtr virDomainNetGetActualBandwidth(virDomainNetDefPtr iface); -virNetDevVlanPtr virDomainNetGetActualVlan(virDomainNetDefPtr iface); +const virNetDevVlan *virDomainNetGetActualVlan(const virDomainNetDef *iface); bool virDomainNetGetActualTrustGuestRxFilters(virDomainNetDefPtr iface); const char *virDomainNetGetModelString(const virDomainNetDef *net); int virDomainNetSetModelString(virDomainNetDefPtr et, diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 6e4e6f5c90..636f188eb1 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1204,7 +1204,7 @@ libxlMakeNic(virDomainDefPtr def, virConnectPtr conn = NULL; virNetDevBandwidthPtr actual_bw; virNetDevVPortProfilePtr port_profile; - virNetDevVlanPtr virt_vlan; + const virNetDevVlan *virt_vlan; virBuffer buf = VIR_BUFFER_INITIALIZER; size_t i; const char *script = NULL; diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index b6c96799d9..07f7c3f704 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -1668,7 +1668,7 @@ xenFormatNet(virConnectPtr conn, case VIR_DOMAIN_NET_TYPE_BRIDGE: { virNetDevVPortProfilePtr port_profile = virDomainNetGetActualVirtPortProfile(net); - virNetDevVlanPtr virt_vlan = virDomainNetGetActualVlan(net); + const virNetDevVlan *virt_vlan = virDomainNetGetActualVlan(net); const char *script = net->script; size_t i; diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 17eb290825..b3b9240731 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -497,7 +497,7 @@ virHostdevSetNetConfig(virDomainHostdevDefPtr hostdev, const unsigned char *uuid) { g_autofree char *linkdev = NULL; - virNetDevVlanPtr vlan; + const virNetDevVlan *vlan; virNetDevVPortProfilePtr virtPort; int vf = -1; bool port_profile_associate = true; diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 9b2741bc28..43d2fb06cf 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -2168,7 +2168,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, int virNetDevSetNetConfig(const char *linkdev, int vf, const virMacAddr *adminMAC, - virNetDevVlanPtr vlan, + const virNetDevVlan *vlan, const virMacAddr *MAC, bool setVlan) { @@ -2391,7 +2391,7 @@ int virNetDevSetNetConfig(const char *linkdev G_GNUC_UNUSED, int vf G_GNUC_UNUSED, const virMacAddr *adminMAC G_GNUC_UNUSED, - virNetDevVlanPtr vlan G_GNUC_UNUSED, + const virNetDevVlan *vlan G_GNUC_UNUSED, const virMacAddr *MAC G_GNUC_UNUSED, bool setVlan G_GNUC_UNUSED) { diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index b5a5214bcb..24b41498ed 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -253,7 +253,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf, int virNetDevSetNetConfig(const char *linkdev, int vf, const virMacAddr *adminMAC, - virNetDevVlanPtr vlan, + const virNetDevVlan *vlan, const virMacAddr *MAC, bool setVLan) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 68c68a19ff..9e6d608639 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -893,7 +893,7 @@ virNetDevMacVLanCreateWithVPortProfile(const char *ifnameRequested, const virMacAddr *macaddress, const char *linkdev, virNetDevMacVLanMode mode, - virNetDevVlanPtr vlan, + const virNetDevVlan *vlan, const unsigned char *vmuuid, virNetDevVPortProfilePtr virtPortProfile, char **ifnameResult, @@ -1222,7 +1222,7 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname G_GNUC_UNUSED, const virMacAddr *macaddress G_GNUC_UNUSED, const char *linkdev G_GNUC_UNUSED, virNetDevMacVLanMode mode G_GNUC_UNUSED, - virNetDevVlanPtr vlan G_GNUC_UNUSED, + const virNetDevVlan *vlan G_GNUC_UNUSED, const unsigned char *vmuuid G_GNUC_UNUSED, virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, char **res_ifname G_GNUC_UNUSED, diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h index 30038a45b5..f455ec3384 100644 --- a/src/util/virnetdevmacvlan.h +++ b/src/util/virnetdevmacvlan.h @@ -76,7 +76,7 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname, const virMacAddr *macaddress, const char *linkdev, virNetDevMacVLanMode mode, - virNetDevVlanPtr vlan, + const virNetDevVlan *vlan, const unsigned char *vmuuid, virNetDevVPortProfilePtr virtPortProfile, char **res_ifname, diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index e85c7dfbdb..34524375b3 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -68,7 +68,7 @@ virNetDevOpenvswitchAddTimeout(virCommandPtr cmd) * Returns 0 in case of success or -1 in case of failure. */ static int -virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, virNetDevVlanPtr virtVlan) +virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan *virtVlan) { int ret = -1; size_t i = 0; @@ -133,7 +133,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname, const virMacAddr *macaddr, const unsigned char *vmuuid, virNetDevVPortProfilePtr ovsport, - virNetDevVlanPtr virtVlan) + const virNetDevVlan *virtVlan) { char macaddrstr[VIR_MAC_STRING_BUFLEN]; char ifuuidstr[VIR_UUID_STRING_BUFLEN]; @@ -538,7 +538,7 @@ virNetDevOpenvswitchGetVhostuserIfname(const char *path, * Returns 0 in case of success or -1 in case of failure. */ int virNetDevOpenvswitchUpdateVlan(const char *ifname, - virNetDevVlanPtr virtVlan) + const virNetDevVlan *virtVlan) { g_autoptr(virCommand) cmd = NULL; diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h index 2e15384b5f..dddb21a5a2 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -33,7 +33,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, virNetDevVPortProfilePtr ovsport, - virNetDevVlanPtr virtVlan) + const virNetDevVlan *virtVlan) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT; @@ -65,5 +65,5 @@ int virNetDevOpenvswitchGetVhostuserIfname(const char *path, ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE; int virNetDevOpenvswitchUpdateVlan(const char *ifname, - virNetDevVlanPtr virtVlan) + const virNetDevVlan *virtVlan) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 445aaa2727..e733f6a0bf 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -500,7 +500,7 @@ virNetDevTapAttachBridge(const char *tapname, const virMacAddr *macaddr, const unsigned char *vmuuid, virNetDevVPortProfilePtr virtPortProfile, - virNetDevVlanPtr virtVlan, + const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) { @@ -572,7 +572,7 @@ virNetDevTapReattachBridge(const char *tapname, const virMacAddr *macaddr, const unsigned char *vmuuid, virNetDevVPortProfilePtr virtPortProfile, - virNetDevVlanPtr virtVlan, + const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) { @@ -658,7 +658,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, int *tapfd, size_t tapfdSize, virNetDevVPortProfilePtr virtPortProfile, - virNetDevVlanPtr virtVlan, + const virNetDevVlan *virtVlan, virNetDevCoalescePtr coalesce, unsigned int mtu, unsigned int *actualMTU, diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h index cbc799bdbe..4fc734fd5e 100644 --- a/src/util/virnetdevtap.h +++ b/src/util/virnetdevtap.h @@ -64,7 +64,7 @@ virNetDevTapAttachBridge(const char *tapname, const virMacAddr *macaddr, const unsigned char *vmuuid, virNetDevVPortProfilePtr virtPortProfile, - virNetDevVlanPtr virtVlan, + const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) @@ -76,7 +76,7 @@ virNetDevTapReattachBridge(const char *tapname, const virMacAddr *macaddr, const unsigned char *vmuuid, virNetDevVPortProfilePtr virtPortProfile, - virNetDevVlanPtr virtVlan, + const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) @@ -90,7 +90,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, int *tapfd, size_t tapfdSize, virNetDevVPortProfilePtr virtPortProfile, - virNetDevVlanPtr virtVlan, + const virNetDevVlan *virtVlan, virNetDevCoalescePtr coalesce, unsigned int mtu, unsigned int *actualMTU, diff --git a/tests/bhyvexml2argvmock.c b/tests/bhyvexml2argvmock.c index b0d38187f9..ac4ffe8596 100644 --- a/tests/bhyvexml2argvmock.c +++ b/tests/bhyvexml2argvmock.c @@ -27,7 +27,7 @@ int virNetDevTapCreateInBridgePort(const char *brname G_GNUC_UNUSED, int *tapfd G_GNUC_UNUSED, size_t tapfdSize G_GNUC_UNUSED, virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, - virNetDevVlanPtr virtVlan G_GNUC_UNUSED, + const virNetDevVlan *virtVlan G_GNUC_UNUSED, virNetDevCoalescePtr coalesce G_GNUC_UNUSED, unsigned int mtu G_GNUC_UNUSED, unsigned int *actualMTU G_GNUC_UNUSED,