net->model && STREQ(net->model, "virtio"))
vnet_hdr = 1;
- rc = virNetDevMacVLanCreate(net->ifname, net->mac,
- virDomainNetGetActualDirectDev(net),
- virDomainNetGetActualDirectMode(net),
- vnet_hdr, def->uuid,
- virDomainNetGetActualDirectVirtPortProfile(net),
- &res_ifname,
- vmop, driver->stateDir,
- virDomainNetGetActualBandwidth(net));
+ rc = virNetDevMacVLanCreateWithVPortProfile(
+ net->ifname, net->mac,
+ virDomainNetGetActualDirectDev(net),
+ virDomainNetGetActualDirectMode(net),
+ vnet_hdr, def->uuid,
+ virDomainNetGetActualDirectVirtPortProfile(net),
+ &res_ifname,
+ vmop, driver->stateDir,
+ virDomainNetGetActualBandwidth(net));
if (rc >= 0) {
virDomainAuditNetDevice(def, net, res_ifname, true);
VIR_FREE(net->ifname);
};
/**
- * virNetDevMacVLanCreate:
+ * virNetDevMacVLanCreateWithVPortProfile:
* Create an instance of a macvtap device and open its tap character
* device.
* @tgifname: Interface name that the macvtap is supposed to have. May
* negative value otherwise with error reported.
*
*/
-int virNetDevMacVLanCreate(const char *tgifname,
- const unsigned char *macaddress,
- const char *linkdev,
- enum virNetDevMacVLanMode mode,
- int vnet_hdr,
- const unsigned char *vmuuid,
- virNetDevVPortProfilePtr virtPortProfile,
- char **res_ifname,
- enum virNetDevVPortProfileOp vmOp,
- char *stateDir,
- virNetDevBandwidthPtr bandwidth)
+int virNetDevMacVLanCreateWithVPortProfile(const char *tgifname,
+ const unsigned char *macaddress,
+ const char *linkdev,
+ enum virNetDevMacVLanMode mode,
+ int vnet_hdr,
+ const unsigned char *vmuuid,
+ virNetDevVPortProfilePtr virtPortProfile,
+ char **res_ifname,
+ enum virNetDevVPortProfileOp vmOp,
+ char *stateDir,
+ virNetDevBandwidthPtr bandwidth)
{
const char *type = "macvtap";
int c, rc;
/**
- * delMacvtap:
+ * virNetDevMacVLanDeleteWithVPortProfile:
* @ifname : The name of the macvtap interface
* @linkdev: The interface name of the NIC to connect to the external bridge
* @virtPortProfile: pointer to object holding the virtual port profile data
* it with the switch if port profile parameters
* were provided.
*/
-int virNetDevMacVLanDelete(const char *ifname,
- const unsigned char *macaddr,
- const char *linkdev,
- int mode,
- virNetDevVPortProfilePtr virtPortProfile,
- char *stateDir)
+int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
+ const unsigned char *macaddr,
+ const char *linkdev,
+ int mode,
+ virNetDevVPortProfilePtr virtPortProfile,
+ char *stateDir)
{
int ret = 0;
if (mode == VIR_NETDEV_MACVLAN_MODE_PASSTHRU) {
}
#else /* ! WITH_MACVTAP */
-int virNetDevMacVLanCreate(const char *ifname ATTRIBUTE_UNUSED,
- const unsigned char *macaddress ATTRIBUTE_UNUSED,
- const char *linkdev ATTRIBUTE_UNUSED,
- enum virNetDevMacVLanMode mode ATTRIBUTE_UNUSED,
- int vnet_hdr ATTRIBUTE_UNUSED,
- const unsigned char *vmuuid ATTRIBUTE_UNUSED,
- virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
- char **res_ifname ATTRIBUTE_UNUSED,
- enum virNetDevVPortProfileOp vmop ATTRIBUTE_UNUSED,
- char *stateDir ATTRIBUTE_UNUSED,
- virNetDevBandwidthPtr bandwidth ATTRIBUTE_UNUSED)
+int virNetDevMacVLanCreateWithVPortProfile(const char *ifname ATTRIBUTE_UNUSED,
+ const unsigned char *macaddress ATTRIBUTE_UNUSED,
+ const char *linkdev ATTRIBUTE_UNUSED,
+ enum virNetDevMacVLanMode mode ATTRIBUTE_UNUSED,
+ int vnet_hdr ATTRIBUTE_UNUSED,
+ const unsigned char *vmuuid ATTRIBUTE_UNUSED,
+ virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
+ char **res_ifname ATTRIBUTE_UNUSED,
+ enum virNetDevVPortProfileOp vmop ATTRIBUTE_UNUSED,
+ char *stateDir ATTRIBUTE_UNUSED,
+ virNetDevBandwidthPtr bandwidth ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Cannot create macvlan devices on this platform"));
return -1;
}
-int virNetDevMacVLanDelete(const char *ifname ATTRIBUTE_UNUSED,
- const unsigned char *macaddress ATTRIBUTE_UNUSED,
- const char *linkdev ATTRIBUTE_UNUSED,
- int mode ATTRIBUTE_UNUSED,
- virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
- char *stateDir ATTRIBUTE_UNUSED)
+int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname ATTRIBUTE_UNUSED,
+ const unsigned char *macaddress ATTRIBUTE_UNUSED,
+ const char *linkdev ATTRIBUTE_UNUSED,
+ int mode ATTRIBUTE_UNUSED,
+ virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
+ char *stateDir ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Cannot create macvlan devices on this platform"));
};
VIR_ENUM_DECL(virNetDevMacVLanMode)
-int virNetDevMacVLanCreate(const char *ifname,
- const unsigned char *macaddress,
- const char *linkdev,
- enum virNetDevMacVLanMode mode,
- int vnet_hdr,
- const unsigned char *vmuuid,
- virNetDevVPortProfilePtr virtPortProfile,
- char **res_ifname,
- enum virNetDevVPortProfileOp vmop,
- char *stateDir,
- virNetDevBandwidthPtr bandwidth)
+int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
+ const unsigned char *macaddress,
+ const char *linkdev,
+ enum virNetDevMacVLanMode mode,
+ int vnet_hdr,
+ const unsigned char *vmuuid,
+ virNetDevVPortProfilePtr virtPortProfile,
+ char **res_ifname,
+ enum virNetDevVPortProfileOp vmop,
+ char *stateDir,
+ virNetDevBandwidthPtr bandwidth)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) ATTRIBUTE_RETURN_CHECK;
-int virNetDevMacVLanDelete(const char *ifname,
- const unsigned char *macaddress,
- const char *linkdev,
- int mode,
- virNetDevVPortProfilePtr virtPortProfile,
- char *stateDir)
+int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
+ const unsigned char *macaddress,
+ const char *linkdev,
+ int mode,
+ virNetDevVPortProfilePtr virtPortProfile,
+ char *stateDir)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(6) ATTRIBUTE_RETURN_CHECK;