On Tue, Aug 27, 2019 at 09:46:31PM -0400, Laine Stump wrote:
This function returns T if the given name is a macvtap device. This
is
determined by 1) getting the ifindex of the device with that name (if
there is one), and 2) checking for existence of /dev/tapXX, where "XX"
is the ifindex learned in (1).
It's also possible to learn this by getting a netlink dump of the
interface and parsing through it to look for some attributes, but that
is complicated to figure out, takes longer to execute, and I'm lazy.
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
src/libvirt_private.syms | 3 +++
src/util/virnetdevmacvlan.c | 23 +++++++++++++++++++++++
src/util/virnetdevmacvlan.h | 3 +++
3 files changed, 29 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a34d92f5ef..afea00b629 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2523,10 +2523,13 @@ virNetDevMacVLanCreate;
virNetDevMacVLanCreateWithVPortProfile;
virNetDevMacVLanDelete;
virNetDevMacVLanDeleteWithVPortProfile;
+virNetDevMacVLanIsMacvtap;
virNetDevMacVLanModeTypeFromString;
virNetDevMacVLanReleaseName;
virNetDevMacVLanReserveName;
virNetDevMacVLanRestartWithVPortProfile;
+virNetDevMacVLanTapOpen;
+virNetDevMacVLanTapSetup;
Accidentally included
virNetDevMacVLanVPortProfileRegisterCallback;
With that removed
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|