summaryrefslogtreecommitdiff
path: root/src/util/virnetdevmacvlan.h
diff options
context:
space:
mode:
authorShi Lei <shi_lei@massclouds.com>2020-12-14 09:50:34 +0800
committerLaine Stump <laine@redhat.com>2020-12-15 13:35:33 -0500
commit9b5d741a9d483a4700c51e4d417298a562092c18 (patch)
tree2baaae733e4c3c7f2edc44b1a7b5972c0f8eec33 /src/util/virnetdevmacvlan.h
parentc36cad1a313acf400a1dc00fbc6e016d1b5cc147 (diff)
downloadlibvirt-9b5d741a9d483a4700c51e4d417298a562092c18.tar.gz
netdevmacvlan: Use helper function to create unique macvlan/macvtap name
Simplify ReserveName/GenerateName for macvlan and macvtap by using common functions. Signed-off-by: Shi Lei <shi_lei@massclouds.com> Reviewed-by: Laine Stump <laine@redhat.com>
Diffstat (limited to 'src/util/virnetdevmacvlan.h')
-rw-r--r--src/util/virnetdevmacvlan.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h
index 48800a8fcf..0a013fc242 100644
--- a/src/util/virnetdevmacvlan.h
+++ b/src/util/virnetdevmacvlan.h
@@ -48,23 +48,15 @@ typedef enum {
VIR_NETDEV_MACVLAN_VNET_HDR = 1 << 2,
} virNetDevMacVLanCreateFlags;
-/* libvirt will start macvtap/macvlan interface names with one of
- * these prefixes when it auto-generates the name
- */
-#define VIR_NET_GENERATED_MACVTAP_PREFIX "macvtap"
-#define VIR_NET_GENERATED_MACVLAN_PREFIX "macvlan"
-
-void virNetDevMacVLanReserveName(const char *name);
-
bool virNetDevMacVLanIsMacvtap(const char *ifname)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
int virNetDevMacVLanCreate(const char *ifname,
- const char *type,
const virMacAddr *macaddress,
const char *srcdev,
- uint32_t macvlan_mode)
- ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
+ uint32_t macvlan_mode,
+ unsigned int flags)
+ ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanDelete(const char *ifname)