summary refs log tree commit diff
path: root/libnm/nm-libnm-utils.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2021-02-11 18:11:46 +0100
committerMichael Biebl <biebl@debian.org>2021-02-11 18:11:46 +0100
commit80ec1decc49c72efec2a8b87c06245c92c0ab807 (patch)
treee3b229aa94e8dcf0590f2317664176e7b8f7607b /libnm/nm-libnm-utils.h
parent65f86e8f56267192d42f2b629fc6b0c99fb9cd0c (diff)
New upstream version 1.29.90 upstream/1.29.90
Diffstat (limited to 'libnm/nm-libnm-utils.h')
-rw-r--r--libnm/nm-libnm-utils.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h
index 9582e1d8..7b9f0e6b 100644
--- a/libnm/nm-libnm-utils.h
+++ b/libnm/nm-libnm-utils.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Copyright (C) 2017, 2018 Red Hat, Inc.
  */
@@ -7,6 +7,7 @@
 #define __NM_LIBNM_UTILS_H__
 
 #include "c-list/src/c-list.h"
+#include "nm-device.h"
 #include "nm-glib-aux/nm-ref-string.h"
 #include "nm-glib-aux/nm-logging-fwd.h"
 #include "nm-types.h"
@@ -220,11 +221,12 @@ typedef enum {
     /* See comments below for NMLDBusMetaIface.interface_prio.
      *
      * Higher numbers means more important to detect the GObject type. */
-    NML_DBUS_META_INTERFACE_PRIO_NONE             = 0,
-    NML_DBUS_META_INTERFACE_PRIO_NMCLIENT         = 1,
-    NML_DBUS_META_INTERFACE_PRIO_PARENT_TYPE      = 2,
-    NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_LOW  = 3,
-    NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH = 4,
+    NML_DBUS_META_INTERFACE_PRIO_NONE           = 0,
+    NML_DBUS_META_INTERFACE_PRIO_NMCLIENT       = 1,
+    NML_DBUS_META_INTERFACE_PRIO_PARENT_TYPE    = 2,
+    NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_10 = 3,
+    NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_20 = 4,
+    NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_30 = 5,
 } NMLDBusMetaInteracePrio;
 
 /*****************************************************************************/
@@ -514,7 +516,7 @@ struct _NMLDBusMetaIface {
      * NetworkManager's API does not add/remove interfaces after exporting the object the
      * first time, so in practice each D-Bus object is expected to have a suitable D-Bus
      * interface (and only determining interface, which doesn't change). Those interfaces have
-     * priority %NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH.
+     * priority %NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_30.
      *
      * (*) note that nothing bad would happen if a faulty NetworkManager would violate that.
      * Of course, something would not work correctly, but the D-Bus interface we find is unexpected
@@ -522,9 +524,15 @@ struct _NMLDBusMetaIface {
      *
      * One exception is "org.freedesktop.NetworkManager.Connection.Active". This can either
      * be a NMActiveConnection or a NMVpnConnection. Hence, this profile has priority
-     * %NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_LOW, and depending on whether there is
+     * %NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_10, and depending on whether there is
      * a "org.freedesktop.NetworkManager.VPN.Connection" (with high priority), we create
      * one or the other type.
+     *
+     * Another exception is "org.freedesktop.NetworkManager.Device.Veth". It is a NMDeviceVeth
+     * and the parent is NMDeviceEthernet. Therefore it contains "org.freedesktop.NetworkManager.Device.Wired"
+     * as it should be registered as NMDeviceVeth, the profile has priority
+     * %NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_20.
+     *
      */
     NMLDBusMetaInteracePrio interface_prio : 3;
 };
@@ -816,6 +824,19 @@ struct _NMDeviceClass {
 
 /*****************************************************************************/
 
+struct _NMDeviceEthernetPrivate;
+
+struct _NMDeviceEthernet {
+    NMDevice                         parent;
+    struct _NMDeviceEthernetPrivate *_priv;
+};
+
+struct _NMDeviceEthernetClass {
+    NMDeviceClass parent;
+};
+
+/*****************************************************************************/
+
 struct _NMActiveConnectionPrivate;
 
 struct _NMActiveConnection {