Re: [dbus PATCH 1/8] Introduce NWFilter Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 11, 2018 at 01:57:44PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
data/Makefile.am              |  1 +
data/org.libvirt.NWFilter.xml |  7 +++++
src/Makefile.am               |  1 +
src/connect.c                 |  6 ++++
src/connect.h                 |  1 +
src/nwfilter.c                | 65 +++++++++++++++++++++++++++++++++++++++++++
src/nwfilter.h                |  9 ++++++
src/util.c                    | 32 +++++++++++++++++++++
src/util.h                    | 15 ++++++++++
9 files changed, 137 insertions(+)
create mode 100644 data/org.libvirt.NWFilter.xml
create mode 100644 src/nwfilter.c
create mode 100644 src/nwfilter.h

diff --git a/src/util.c b/src/util.c
index 9dd901c..f6aa210 100644
--- a/src/util.c
+++ b/src/util.c
@@ -247,6 +247,38 @@ virtDBusUtilVirNetworkListFree(virNetworkPtr *networks)
    g_free(networks);
}

+virNWFilterPtr
+virtDBusUtilVirNWFilterFromBusPath(virConnectPtr connection,
+                                  const gchar *path,
+                                  const gchar *nwfilterPath)
+{
+    g_autofree gchar *name = NULL;
+    gsize prefixLen = strlen(nwfilterPath) + 1;
+
+    name = virtDBusUtilDecodeUUID(path+prefixLen);

Looks nicer with spaces around the +.

+
+    return virNWFilterLookupByUUIDString(connection, name);
+}
+

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux