summary refs log tree commit diff
path: root/src/libnm-core-public
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-core-public')
-rw-r--r--src/libnm-core-public/meson.build3
-rw-r--r--src/libnm-core-public/nm-core-types.h1
-rw-r--r--src/libnm-core-public/nm-dbus-interface.h7
-rw-r--r--src/libnm-core-public/nm-dbus-types.xml12
-rw-r--r--src/libnm-core-public/nm-setting-connection.h16
-rw-r--r--src/libnm-core-public/nm-setting-ethtool.h6
-rw-r--r--src/libnm-core-public/nm-setting-hsr.h49
-rw-r--r--src/libnm-core-public/nm-setting-ip-config.h3
-rw-r--r--src/libnm-core-public/nm-utils.h17
-rw-r--r--src/libnm-core-public/nm-version-macros.h5
-rw-r--r--src/libnm-core-public/nm-version-macros.h.in1
-rw-r--r--src/libnm-core-public/nm-version.h14
12 files changed, 121 insertions, 13 deletions
diff --git a/src/libnm-core-public/meson.build b/src/libnm-core-public/meson.build
index d135dbff..b5ed71e8 100644
--- a/src/libnm-core-public/meson.build
+++ b/src/libnm-core-public/meson.build
@@ -23,6 +23,7 @@ libnm_core_headers = files(
   'nm-setting-ethtool.h',
   'nm-setting-generic.h',
   'nm-setting-gsm.h',
+  'nm-setting-hsr.h',
   'nm-setting-hostname.h',
   'nm-setting-infiniband.h',
   'nm-setting-ip-config.h',
@@ -128,5 +129,5 @@ foreach docbook: docbooks
     build_by_default: true,
   )
 
-  content_files += xml.full_path()
+  content_files += xml
 endforeach
diff --git a/src/libnm-core-public/nm-core-types.h b/src/libnm-core-public/nm-core-types.h
index 758733a1..d9a8225e 100644
--- a/src/libnm-core-public/nm-core-types.h
+++ b/src/libnm-core-public/nm-core-types.h
@@ -30,6 +30,7 @@ typedef struct _NMSettingEthtool          NMSettingEthtool;
 typedef struct _NMSettingGeneric          NMSettingGeneric;
 typedef struct _NMSettingGsm              NMSettingGsm;
 typedef struct _NMSettingHostname         NMSettingHostname;
+typedef struct _NMSettingHsr              NMSettingHsr;
 typedef struct _NMSettingIP4Config        NMSettingIP4Config;
 typedef struct _NMSettingIP6Config        NMSettingIP6Config;
 typedef struct _NMSettingIPConfig         NMSettingIPConfig;
diff --git a/src/libnm-core-public/nm-dbus-interface.h b/src/libnm-core-public/nm-dbus-interface.h
index b490e3b1..5acbf467 100644
--- a/src/libnm-core-public/nm-dbus-interface.h
+++ b/src/libnm-core-public/nm-dbus-interface.h
@@ -37,6 +37,7 @@
 #define NM_DBUS_INTERFACE_DEVICE_DUMMY         NM_DBUS_INTERFACE_DEVICE ".Dummy"
 #define NM_DBUS_INTERFACE_DEVICE_GENERIC       NM_DBUS_INTERFACE_DEVICE ".Generic"
 #define NM_DBUS_INTERFACE_DEVICE_GRE           NM_DBUS_INTERFACE_DEVICE ".Gre"
+#define NM_DBUS_INTERFACE_DEVICE_HSR           NM_DBUS_INTERFACE_DEVICE ".Hsr"
 #define NM_DBUS_INTERFACE_DEVICE_INFINIBAND    NM_DBUS_INTERFACE_DEVICE ".Infiniband"
 #define NM_DBUS_INTERFACE_DEVICE_IP_TUNNEL     NM_DBUS_INTERFACE_DEVICE ".IPTunnel"
 #define NM_DBUS_INTERFACE_DEVICE_LOOPBACK      NM_DBUS_INTERFACE_DEVICE ".Loopback"
@@ -234,6 +235,7 @@ typedef enum {
  * @NM_DEVICE_TYPE_WIFI_P2P: an 802.11 Wi-Fi P2P device. Since: 1.16.
  * @NM_DEVICE_TYPE_VRF: A VRF (Virtual Routing and Forwarding) interface. Since: 1.24.
  * @NM_DEVICE_TYPE_LOOPBACK: a loopback interface. Since: 1.42.
+ * @NM_DEVICE_TYPE_HSR: A HSR/PRP device. Since: 1.46.
  *
  * #NMDeviceType values indicate the type of hardware represented by a
  * device object.
@@ -272,6 +274,7 @@ typedef enum {
     NM_DEVICE_TYPE_WIFI_P2P      = 30,
     NM_DEVICE_TYPE_VRF           = 31,
     NM_DEVICE_TYPE_LOOPBACK      = 32,
+    NM_DEVICE_TYPE_HSR           = 33,
 } NMDeviceType;
 
 /**
@@ -306,6 +309,7 @@ typedef enum /*< flags >*/ {
  * @NM_WIFI_DEVICE_CAP_FREQ_VALID: device reports frequency capabilities
  * @NM_WIFI_DEVICE_CAP_FREQ_2GHZ: device supports 2.4GHz frequencies
  * @NM_WIFI_DEVICE_CAP_FREQ_5GHZ: device supports 5GHz frequencies
+ * @NM_WIFI_DEVICE_CAP_FREQ_6GHZ: device supports 6GHz frequencies. Since: 1.46.
  * @NM_WIFI_DEVICE_CAP_MESH: device supports acting as a mesh point. Since: 1.20.
  * @NM_WIFI_DEVICE_CAP_IBSS_RSN: device supports WPA2/RSN in an IBSS network. Since: 1.22.
  *
@@ -324,6 +328,7 @@ typedef enum /*< flags >*/ {
     NM_WIFI_DEVICE_CAP_FREQ_VALID    = 0x00000100,
     NM_WIFI_DEVICE_CAP_FREQ_2GHZ     = 0x00000200,
     NM_WIFI_DEVICE_CAP_FREQ_5GHZ     = 0x00000400,
+    NM_WIFI_DEVICE_CAP_FREQ_6GHZ     = 0x00000800,
     NM_WIFI_DEVICE_CAP_MESH          = 0x00001000,
     NM_WIFI_DEVICE_CAP_IBSS_RSN      = 0x00002000,
 } NMDeviceWifiCapabilities;
@@ -967,7 +972,7 @@ typedef enum {
  * @NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES: upon rollback,
  *   disconnect any new device appeared after the checkpoint. Since: 1.6.
  * @NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING: by default, creating
- *   a checkpoint fails if there are already existing checkoints that
+ *   a checkpoint fails if there are already existing checkpoints that
  *   reference the same devices. With this flag, creation of such
  *   checkpoints is allowed, however, if an older checkpoint
  *   that references overlapping devices gets rolled back, it will
diff --git a/src/libnm-core-public/nm-dbus-types.xml b/src/libnm-core-public/nm-dbus-types.xml
index d5ac04b4..18417169 100644
--- a/src/libnm-core-public/nm-dbus-types.xml
+++ b/src/libnm-core-public/nm-dbus-types.xml
@@ -347,6 +347,11 @@
               <entry role="enum_member_value"><para>= <literal>32</literal></para><para></para></entry>
               <entry role="enum_member_description"><para>a loopback interface. Since: 1.42.</para><para></para></entry>
             </row>
+            <row role="constant">
+              <entry role="enum_member_name"><para>NM_DEVICE_TYPE_HSR</para><para></para></entry>
+              <entry role="enum_member_value"><para>= <literal>33</literal></para><para></para></entry>
+              <entry role="enum_member_description"><para>A HSR/PRP device. Since: 1.46.</para><para></para></entry>
+            </row>
           </tbody>
         </tgroup>
       </informaltable>
@@ -473,6 +478,11 @@
               <entry role="enum_member_description"><para>device supports 5GHz frequencies</para><para></para></entry>
             </row>
             <row role="constant">
+              <entry role="enum_member_name"><para>NM_WIFI_DEVICE_CAP_FREQ_6GHZ</para><para></para></entry>
+              <entry role="enum_member_value"><para>= <literal>0x00000800</literal></para><para></para></entry>
+              <entry role="enum_member_description"><para>device supports 6GHz frequencies. Since: 1.46.</para><para></para></entry>
+            </row>
+            <row role="constant">
               <entry role="enum_member_name"><para>NM_WIFI_DEVICE_CAP_MESH</para><para></para></entry>
               <entry role="enum_member_value"><para>= <literal>0x00001000</literal></para><para></para></entry>
               <entry role="enum_member_description"><para>device supports acting as a mesh point. Since: 1.20.</para><para></para></entry>
@@ -1670,7 +1680,7 @@
             <row role="constant">
               <entry role="enum_member_name"><para>NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING</para><para></para></entry>
               <entry role="enum_member_value"><para>= <literal>0x08</literal></para><para></para></entry>
-              <entry role="enum_member_description"><para>by default, creating a checkpoint fails if there are already existing checkoints that reference the same devices. With this flag, creation of such checkpoints is allowed, however, if an older checkpoint that references overlapping devices gets rolled back, it will automatically destroy this checkpoint during rollback. This allows to create several overlapping checkpoints in parallel, and rollback to them at will. With the special case that rolling back to an older checkpoint will invalidate all overlapping younger checkpoints. This opts-in that the checkpoint can be automatically destroyed by the rollback of an older checkpoint. Since: 1.12.</para><para></para></entry>
+              <entry role="enum_member_description"><para>by default, creating a checkpoint fails if there are already existing checkpoints that reference the same devices. With this flag, creation of such checkpoints is allowed, however, if an older checkpoint that references overlapping devices gets rolled back, it will automatically destroy this checkpoint during rollback. This allows to create several overlapping checkpoints in parallel, and rollback to them at will. With the special case that rolling back to an older checkpoint will invalidate all overlapping younger checkpoints. This opts-in that the checkpoint can be automatically destroyed by the rollback of an older checkpoint. Since: 1.12.</para><para></para></entry>
             </row>
             <row role="constant">
               <entry role="enum_member_name"><para>NM_CHECKPOINT_CREATE_FLAG_NO_PRESERVE_EXTERNAL_PORTS</para><para></para></entry>
diff --git a/src/libnm-core-public/nm-setting-connection.h b/src/libnm-core-public/nm-setting-connection.h
index 42dff205..e21fd3e5 100644
--- a/src/libnm-core-public/nm-setting-connection.h
+++ b/src/libnm-core-public/nm-setting-connection.h
@@ -47,7 +47,9 @@ G_BEGIN_DECLS
 #define NM_SETTING_CONNECTION_PERMISSIONS           "permissions"
 #define NM_SETTING_CONNECTION_ZONE                  "zone"
 #define NM_SETTING_CONNECTION_MASTER                "master"
+#define NM_SETTING_CONNECTION_CONTROLLER            "controller"
 #define NM_SETTING_CONNECTION_SLAVE_TYPE            "slave-type"
+#define NM_SETTING_CONNECTION_PORT_TYPE             "port-type"
 #define NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES    "autoconnect-slaves"
 #define NM_SETTING_CONNECTION_SECONDARIES           "secondaries"
 #define NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT  "gateway-ping-timeout"
@@ -193,9 +195,21 @@ gboolean    nm_setting_connection_remove_permission_by_value(NMSettingConnection
                                                              const char          *pitem,
                                                              const char          *detail);
 
+NM_DEPRECATED_IN_1_46
 const char *nm_setting_connection_get_master(NMSettingConnection *setting);
-gboolean    nm_setting_connection_is_slave_type(NMSettingConnection *setting, const char *type);
+
+NM_AVAILABLE_IN_1_46
+const char *nm_setting_connection_get_controller(NMSettingConnection *setting);
+
+NM_DEPRECATED_IN_1_46
+gboolean nm_setting_connection_is_slave_type(NMSettingConnection *setting, const char *type);
+
+NM_DEPRECATED_IN_1_46
 const char *nm_setting_connection_get_slave_type(NMSettingConnection *setting);
+
+NM_AVAILABLE_IN_1_46
+const char *nm_setting_connection_get_port_type(NMSettingConnection *setting);
+
 NM_AVAILABLE_IN_1_2
 NMSettingConnectionAutoconnectSlaves
 nm_setting_connection_get_autoconnect_slaves(NMSettingConnection *setting);
diff --git a/src/libnm-core-public/nm-setting-ethtool.h b/src/libnm-core-public/nm-setting-ethtool.h
index 698dcebe..fe1fbc0e 100644
--- a/src/libnm-core-public/nm-setting-ethtool.h
+++ b/src/libnm-core-public/nm-setting-ethtool.h
@@ -26,6 +26,12 @@ gboolean nm_ethtool_optname_is_ring(const char *optname);
 NM_AVAILABLE_IN_1_32
 gboolean nm_ethtool_optname_is_pause(const char *optname);
 
+NM_AVAILABLE_IN_1_46
+gboolean nm_ethtool_optname_is_channels(const char *optname);
+
+NM_AVAILABLE_IN_1_46
+gboolean nm_ethtool_optname_is_eee(const char *optname);
+
 /*****************************************************************************/
 
 #define NM_TYPE_SETTING_ETHTOOL (nm_setting_ethtool_get_type())
diff --git a/src/libnm-core-public/nm-setting-hsr.h b/src/libnm-core-public/nm-setting-hsr.h
new file mode 100644
index 00000000..f7b0136f
--- /dev/null
+++ b/src/libnm-core-public/nm-setting-hsr.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2023 Red Hat, Inc.
+ */
+
+#ifndef __NM_SETTING_HSR_H__
+#define __NM_SETTING_HSR_H__
+
+#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
+#include "nm-setting.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_SETTING_HSR            (nm_setting_hsr_get_type())
+#define NM_SETTING_HSR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_HSR, NMSettingHsr))
+#define NM_IS_SETTING_HSR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_HSR))
+#define NM_IS_SETTING_HSR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_HSR))
+#define NM_SETTING_HSR_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_HSR, NMSettingHsrClass))
+
+#define NM_SETTING_HSR_SETTING_NAME "hsr"
+
+#define NM_SETTING_HSR_PORT1          "port1"
+#define NM_SETTING_HSR_PORT2          "port2"
+#define NM_SETTING_HSR_MULTICAST_SPEC "multicast-spec"
+#define NM_SETTING_HSR_PRP            "prp"
+
+typedef struct _NMSettingHsrClass NMSettingHsrClass;
+
+NM_AVAILABLE_IN_1_46
+GType nm_setting_hsr_get_type(void);
+NM_AVAILABLE_IN_1_46
+NMSetting *nm_setting_hsr_new(void);
+
+NM_AVAILABLE_IN_1_46
+const char *nm_setting_hsr_get_port1(NMSettingHsr *setting);
+NM_AVAILABLE_IN_1_46
+const char *nm_setting_hsr_get_port2(NMSettingHsr *setting);
+NM_AVAILABLE_IN_1_46
+guint32 nm_setting_hsr_get_multicast_spec(NMSettingHsr *setting);
+NM_AVAILABLE_IN_1_46
+gboolean nm_setting_hsr_get_prp(NMSettingHsr *setting);
+
+G_END_DECLS
+
+#endif /* __NM_SETTING_HSR_H__ */
diff --git a/src/libnm-core-public/nm-setting-ip-config.h b/src/libnm-core-public/nm-setting-ip-config.h
index f7281965..aa0d6d71 100644
--- a/src/libnm-core-public/nm-setting-ip-config.h
+++ b/src/libnm-core-public/nm-setting-ip-config.h
@@ -363,6 +363,9 @@ char *nm_ip_routing_rule_to_string(const NMIPRoutingRule       *self,
 #define NM_SETTING_DNS_OPTION_NO_RELOAD             "no-reload"
 #define NM_SETTING_DNS_OPTION_TRUST_AD              "trust-ad"
 #define NM_SETTING_DNS_OPTION_NO_AAAA               "no-aaaa"
+/* Internal options (not added to resolv.conf) */
+#define NM_SETTING_DNS_OPTION_INTERNAL_NO_ADD_EDNS0    "_no-add-edns0"
+#define NM_SETTING_DNS_OPTION_INTERNAL_NO_ADD_TRUST_AD "_no-add-trust-ad"
 
 typedef struct _NMSettingIPConfigClass NMSettingIPConfigClass;
 
diff --git a/src/libnm-core-public/nm-utils.h b/src/libnm-core-public/nm-utils.h
index ca399c4c..35ef580d 100644
--- a/src/libnm-core-public/nm-utils.h
+++ b/src/libnm-core-public/nm-utils.h
@@ -24,14 +24,17 @@ G_BEGIN_DECLS
 typedef struct _NMVariantAttributeSpec NMVariantAttributeSpec;
 
 /* SSID helpers */
-gboolean    nm_utils_is_empty_ssid(const guint8 *ssid, gsize len);
+gboolean nm_utils_is_empty_ssid(const guint8 *ssid, gsize len);
+
+NM_DEPRECATED_IN_1_46
 const char *nm_utils_escape_ssid(const guint8 *ssid, gsize len);
-gboolean    nm_utils_same_ssid(const guint8 *ssid1,
-                               gsize         len1,
-                               const guint8 *ssid2,
-                               gsize         len2,
-                               gboolean      ignore_trailing_null);
-char       *nm_utils_ssid_to_utf8(const guint8 *ssid, gsize len);
+
+gboolean nm_utils_same_ssid(const guint8 *ssid1,
+                            gsize         len1,
+                            const guint8 *ssid2,
+                            gsize         len2,
+                            gboolean      ignore_trailing_null);
+char    *nm_utils_ssid_to_utf8(const guint8 *ssid, gsize len);
 
 /**
  * NMUtilsSecurityType:
diff --git a/src/libnm-core-public/nm-version-macros.h b/src/libnm-core-public/nm-version-macros.h
index 14948f2b..f7880755 100644
--- a/src/libnm-core-public/nm-version-macros.h
+++ b/src/libnm-core-public/nm-version-macros.h
@@ -22,7 +22,7 @@
  * Evaluates to the minor version number of NetworkManager which this source
  * is compiled against.
  */
-#define NM_MINOR_VERSION (44)
+#define NM_MINOR_VERSION (45)
 
 /**
  * NM_MICRO_VERSION:
@@ -30,7 +30,7 @@
  * Evaluates to the micro version number of NetworkManager which this source
  * compiled against.
  */
-#define NM_MICRO_VERSION (2)
+#define NM_MICRO_VERSION (90)
 
 /**
  * NM_CHECK_VERSION:
@@ -73,6 +73,7 @@
 #define NM_VERSION_1_40   (NM_ENCODE_VERSION(1, 40, 0))
 #define NM_VERSION_1_42   (NM_ENCODE_VERSION(1, 42, 0))
 #define NM_VERSION_1_44   (NM_ENCODE_VERSION(1, 44, 0))
+#define NM_VERSION_1_46   (NM_ENCODE_VERSION(1, 46, 0))
 
 /* For releases, NM_API_VERSION is equal to NM_VERSION.
  *
diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in
index f44199a0..072b8ca5 100644
--- a/src/libnm-core-public/nm-version-macros.h.in
+++ b/src/libnm-core-public/nm-version-macros.h.in
@@ -73,6 +73,7 @@
 #define NM_VERSION_1_40   (NM_ENCODE_VERSION(1, 40, 0))
 #define NM_VERSION_1_42   (NM_ENCODE_VERSION(1, 42, 0))
 #define NM_VERSION_1_44   (NM_ENCODE_VERSION(1, 44, 0))
+#define NM_VERSION_1_46   (NM_ENCODE_VERSION(1, 46, 0))
 
 /* For releases, NM_API_VERSION is equal to NM_VERSION.
  *
diff --git a/src/libnm-core-public/nm-version.h b/src/libnm-core-public/nm-version.h
index 271535d2..24471129 100644
--- a/src/libnm-core-public/nm-version.h
+++ b/src/libnm-core-public/nm-version.h
@@ -369,6 +369,20 @@
 #define NM_AVAILABLE_IN_1_44
 #endif
 
+#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_46
+#define NM_DEPRECATED_IN_1_46        G_DEPRECATED
+#define NM_DEPRECATED_IN_1_46_FOR(f) G_DEPRECATED_FOR(f)
+#else
+#define NM_DEPRECATED_IN_1_46
+#define NM_DEPRECATED_IN_1_46_FOR(f)
+#endif
+
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_46
+#define NM_AVAILABLE_IN_1_46 G_UNAVAILABLE(1, 46)
+#else
+#define NM_AVAILABLE_IN_1_46
+#endif
+
 /*
  * Synchronous API for calling D-Bus in libnm is deprecated. See
  * https://networkmanager.dev/docs/libnm/latest/usage.html#sync-api