summary refs log tree commit diff
path: root/src/libnm-core-public
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-02-22 17:21:11 +0100
committerMichael Biebl <biebl@debian.org>2024-02-22 17:21:11 +0100
commitbba2e4b4de668db525cbfdfc35292e5a0b51671a (patch)
tree38d20cddfcc6f71572b9e169deefab5fa96e8d0c /src/libnm-core-public
parent6681f77b757bbc42ce5c8868ee9142b7ebc8c059 (diff)
New upstream version 1.46.0 upstream/1.46.0
Diffstat (limited to 'src/libnm-core-public')
-rw-r--r--src/libnm-core-public/nm-dbus-interface.h20
-rw-r--r--src/libnm-core-public/nm-dbus-types.xml5
-rw-r--r--src/libnm-core-public/nm-setting-generic.h5
-rw-r--r--src/libnm-core-public/nm-setting-macsec.h21
-rw-r--r--src/libnm-core-public/nm-setting-sriov.h64
-rw-r--r--src/libnm-core-public/nm-setting.h3
-rw-r--r--src/libnm-core-public/nm-version-macros.h4
7 files changed, 117 insertions, 5 deletions
diff --git a/src/libnm-core-public/nm-dbus-interface.h b/src/libnm-core-public/nm-dbus-interface.h
index 5acbf467..66cd590d 100644
--- a/src/libnm-core-public/nm-dbus-interface.h
+++ b/src/libnm-core-public/nm-dbus-interface.h
@@ -610,6 +610,8 @@ typedef enum {
  * @NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED: The selected IP method is not supported
  * @NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED: configuration of SR-IOV parameters failed
  * @NM_DEVICE_STATE_REASON_PEER_NOT_FOUND: The Wi-Fi P2P peer could not be found
+ * @NM_DEVICE_STATE_REASON_DEVICE_HANDLER_FAILED: The device handler dispatcher returned an
+ *   error. Since: 1.46
  *
  * Device state change reason codes
  */
@@ -682,6 +684,7 @@ typedef enum {
     NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED          = 65,
     NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED     = 66,
     NM_DEVICE_STATE_REASON_PEER_NOT_FOUND                 = 67,
+    NM_DEVICE_STATE_REASON_DEVICE_HANDLER_FAILED          = 68,
 } NMDeviceStateReason;
 
 /**
@@ -1415,4 +1418,21 @@ typedef enum /*< flags >*/ {
     NM_MPTCP_FLAGS_FULLMESH = 0x80,
 } NMMptcpFlags;
 
+/* For secrets requests, hints starting with "x-vpn-message:" are a message to show, not
+ * a secret to request
+ */
+#define NM_SECRET_TAG_VPN_MSG "x-vpn-message:"
+
+/* For secrets requests, hints starting with "x-dynamic-challenge(-echo):" are dynamic
+ * 2FA challenges that are requested in a second authentication step, after the password
+ * (or whatever auth method is used) was already successfully validated. Because of
+ * that, the default secrets of the service mustn't be requested (again).
+ * When using the "-echo" variant, the user input doesn't need to be hidden even
+ * without --show-secrets
+ *
+ * Note: currently only implemented for VPN, but can be extended.
+ */
+#define NM_SECRET_TAG_DYNAMIC_CHALLENGE      "x-dynamic-challenge:"
+#define NM_SECRET_TAG_DYNAMIC_CHALLENGE_ECHO "x-dynamic-challenge-echo:"
+
 #endif /* __NM_DBUS_INTERFACE_H__ */
diff --git a/src/libnm-core-public/nm-dbus-types.xml b/src/libnm-core-public/nm-dbus-types.xml
index 18417169..d294453d 100644
--- a/src/libnm-core-public/nm-dbus-types.xml
+++ b/src/libnm-core-public/nm-dbus-types.xml
@@ -1247,6 +1247,11 @@
               <entry role="enum_member_value"><para>= <literal>67</literal></para><para></para></entry>
               <entry role="enum_member_description"><para>The Wi-Fi P2P peer could not be found</para><para></para></entry>
             </row>
+            <row role="constant">
+              <entry role="enum_member_name"><para>NM_DEVICE_STATE_REASON_DEVICE_HANDLER_FAILED</para><para></para></entry>
+              <entry role="enum_member_value"><para>= <literal>68</literal></para><para></para></entry>
+              <entry role="enum_member_description"><para>The device handler dispatcher returned an error. Since: 1.46</para><para></para></entry>
+            </row>
           </tbody>
         </tgroup>
       </informaltable>
diff --git a/src/libnm-core-public/nm-setting-generic.h b/src/libnm-core-public/nm-setting-generic.h
index 9bdcd11d..d735513f 100644
--- a/src/libnm-core-public/nm-setting-generic.h
+++ b/src/libnm-core-public/nm-setting-generic.h
@@ -27,12 +27,17 @@ G_BEGIN_DECLS
 
 #define NM_SETTING_GENERIC_SETTING_NAME "generic"
 
+#define NM_SETTING_GENERIC_DEVICE_HANDLER "device-handler"
+
 typedef struct _NMSettingGenericClass NMSettingGenericClass;
 
 GType nm_setting_generic_get_type(void);
 
 NMSetting *nm_setting_generic_new(void);
 
+NM_AVAILABLE_IN_1_46
+const char *nm_setting_generic_get_device_handler(NMSettingGeneric *setting);
+
 G_END_DECLS
 
 #endif /* __NM_SETTING_GENERIC_H__ */
diff --git a/src/libnm-core-public/nm-setting-macsec.h b/src/libnm-core-public/nm-setting-macsec.h
index c2662b1f..27b7311e 100644
--- a/src/libnm-core-public/nm-setting-macsec.h
+++ b/src/libnm-core-public/nm-setting-macsec.h
@@ -35,6 +35,7 @@ G_BEGIN_DECLS
 #define NM_SETTING_MACSEC_PORT          "port"
 #define NM_SETTING_MACSEC_VALIDATION    "validation"
 #define NM_SETTING_MACSEC_SEND_SCI      "send-sci"
+#define NM_SETTING_MACSEC_OFFLOAD       "offload"
 
 typedef struct _NMSettingMacsecClass NMSettingMacsecClass;
 
@@ -77,6 +78,24 @@ typedef enum {
 /* Deprecated. The CKN can be between 2 and 64 characters. */
 #define NM_SETTING_MACSEC_MKA_CKN_LENGTH 64
 
+/**
+ * NMSettingMacsecOffload:
+ * @NM_SETTING_MACSEC_OFFLOAD_DEFAULT: use the global default; disable if not defined
+ * @NM_SETTING_MACSEC_OFFLOAD_OFF: disable offload
+ * @NM_SETTING_MACSEC_OFFLOAD_PHY: request offload to the PHY
+ * @NM_SETTING_MACSEC_OFFLOAD_MAC: request offload to the MAC
+ *
+ * These flags control the MACsec offload mode.
+ *
+ * Since: 1.46
+ **/
+typedef enum {
+    NM_SETTING_MACSEC_OFFLOAD_DEFAULT = -1,
+    NM_SETTING_MACSEC_OFFLOAD_OFF     = 0,
+    NM_SETTING_MACSEC_OFFLOAD_PHY     = 1,
+    NM_SETTING_MACSEC_OFFLOAD_MAC     = 2,
+} NMSettingMacsecOffload;
+
 NM_AVAILABLE_IN_1_6
 GType nm_setting_macsec_get_type(void);
 NM_AVAILABLE_IN_1_6
@@ -100,6 +119,8 @@ NM_AVAILABLE_IN_1_6
 NMSettingMacsecValidation nm_setting_macsec_get_validation(NMSettingMacsec *setting);
 NM_AVAILABLE_IN_1_12
 gboolean nm_setting_macsec_get_send_sci(NMSettingMacsec *setting);
+NM_AVAILABLE_IN_1_46
+NMSettingMacsecOffload nm_setting_macsec_get_offload(NMSettingMacsec *setting);
 
 G_END_DECLS
 
diff --git a/src/libnm-core-public/nm-setting-sriov.h b/src/libnm-core-public/nm-setting-sriov.h
index 071b9837..affccc48 100644
--- a/src/libnm-core-public/nm-setting-sriov.h
+++ b/src/libnm-core-public/nm-setting-sriov.h
@@ -26,9 +26,12 @@ G_BEGIN_DECLS
 
 #define NM_SETTING_SRIOV_SETTING_NAME "sriov"
 
-#define NM_SETTING_SRIOV_TOTAL_VFS         "total-vfs"
-#define NM_SETTING_SRIOV_VFS               "vfs"
-#define NM_SETTING_SRIOV_AUTOPROBE_DRIVERS "autoprobe-drivers"
+#define NM_SETTING_SRIOV_TOTAL_VFS           "total-vfs"
+#define NM_SETTING_SRIOV_VFS                 "vfs"
+#define NM_SETTING_SRIOV_AUTOPROBE_DRIVERS   "autoprobe-drivers"
+#define NM_SETTING_SRIOV_ESWITCH_MODE        "eswitch-mode"
+#define NM_SETTING_SRIOV_ESWITCH_INLINE_MODE "eswitch-inline-mode"
+#define NM_SETTING_SRIOV_ESWITCH_ENCAP_MODE  "eswitch-encap-mode"
 
 #define NM_SRIOV_VF_ATTRIBUTE_MAC         "mac"
 #define NM_SRIOV_VF_ATTRIBUTE_SPOOF_CHECK "spoof-check"
@@ -53,6 +56,55 @@ typedef enum {
     NM_SRIOV_VF_VLAN_PROTOCOL_802_1AD = 1,
 } NMSriovVFVlanProtocol;
 
+/**
+ * NMSriovEswitchMode:
+ * @NM_SRIOV_ESWITCH_MODE_PRESERVE:  don't modify current eswitch mode
+ * @NM_SRIOV_ESWITCH_MODE_LEGACY:    use legacy SRIOV
+ * @NM_SRIOV_ESWITCH_MODE_SWITCHDEV: use switchdev mode
+ *
+ * Since: 1.46
+ */
+typedef enum {
+    NM_SRIOV_ESWITCH_MODE_PRESERVE  = -1,
+    NM_SRIOV_ESWITCH_MODE_UNKNOWN   = -1, /*< skip >*/
+    NM_SRIOV_ESWITCH_MODE_LEGACY    = 0,
+    NM_SRIOV_ESWITCH_MODE_SWITCHDEV = 1,
+} NMSriovEswitchMode;
+
+/**
+ * NMSriovEswitchInlineMode:
+ * @NM_SRIOV_ESWITCH_INLINE_MODE_PRESERVE:  don't modify current inline-mode
+ * @NM_SRIOV_ESWITCH_INLINE_MODE_NONE:      don't use inline mode
+ * @NM_SRIOV_ESWITCH_INLINE_MODE_LINK:      L2 mode
+ * @NM_SRIOV_ESWITCH_INLINE_MODE_NETWORK:   L3 mode
+ * @NM_SRIOV_ESWITCH_INLINE_MODE_TRANSPORT: L4 mode
+ *
+ * Since: 1.46
+ */
+typedef enum {
+    NM_SRIOV_ESWITCH_INLINE_MODE_PRESERVE  = -1,
+    NM_SRIOV_ESWITCH_INLINE_MODE_UNKNOWN   = -1, /*< skip >*/
+    NM_SRIOV_ESWITCH_INLINE_MODE_NONE      = 0,
+    NM_SRIOV_ESWITCH_INLINE_MODE_LINK      = 1,
+    NM_SRIOV_ESWITCH_INLINE_MODE_NETWORK   = 2,
+    NM_SRIOV_ESWITCH_INLINE_MODE_TRANSPORT = 3,
+} NMSriovEswitchInlineMode;
+
+/**
+ * NMSriovEswitchEncapMode:
+ * @NM_SRIOV_ESWITCH_ENCAP_MODE_PRESERVE: don't modify current encap-mode
+ * @NM_SRIOV_ESWITCH_ENCAP_MODE_NONE: disable encapsulation mode
+ * @NM_SRIOV_ESWITCH_ENCAP_MODE_BASIC: enable encapsulation mode
+ *
+ * Since: 1.46
+ */
+typedef enum {
+    NM_SRIOV_ESWITCH_ENCAP_MODE_PRESERVE = -1,
+    NM_SRIOV_ESWITCH_ENCAP_MODE_UNKNOWN  = -1, /*< skip >*/
+    NM_SRIOV_ESWITCH_ENCAP_MODE_NONE     = 0,
+    NM_SRIOV_ESWITCH_ENCAP_MODE_BASIC    = 1,
+} NMSriovEswitchEncapMode;
+
 NM_AVAILABLE_IN_1_14
 GType nm_setting_sriov_get_type(void);
 NM_AVAILABLE_IN_1_14
@@ -73,6 +125,12 @@ NM_AVAILABLE_IN_1_14
 void nm_setting_sriov_clear_vfs(NMSettingSriov *setting);
 NM_AVAILABLE_IN_1_14
 NMTernary nm_setting_sriov_get_autoprobe_drivers(NMSettingSriov *setting);
+NM_AVAILABLE_IN_1_46
+NMSriovEswitchMode nm_setting_sriov_get_eswitch_mode(NMSettingSriov *setting);
+NM_AVAILABLE_IN_1_46
+NMSriovEswitchInlineMode nm_setting_sriov_get_eswitch_inline_mode(NMSettingSriov *setting);
+NM_AVAILABLE_IN_1_46
+NMSriovEswitchEncapMode nm_setting_sriov_get_eswitch_encap_mode(NMSettingSriov *setting);
 
 NM_AVAILABLE_IN_1_14
 gboolean nm_sriov_vf_add_vlan(NMSriovVF *vf, guint vlan_id);
diff --git a/src/libnm-core-public/nm-setting.h b/src/libnm-core-public/nm-setting.h
index d525a6ad..6c6fe2bf 100644
--- a/src/libnm-core-public/nm-setting.h
+++ b/src/libnm-core-public/nm-setting.h
@@ -255,6 +255,9 @@ void nm_setting_option_clear_by_name(NMSetting *setting, NMUtilsPredicateStr pre
 const GVariantType *nm_setting_get_dbus_property_type(NMSetting  *setting,
                                                       const char *property_name);
 
+NM_AVAILABLE_IN_1_46
+GType nm_setting_get_enum_property_type(GType setting_type, const char *property_name);
+
 /*****************************************************************************/
 
 typedef struct _NMRange NMRange;
diff --git a/src/libnm-core-public/nm-version-macros.h b/src/libnm-core-public/nm-version-macros.h
index 4582e9b7..7e0b4a36 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 (45)
+#define NM_MINOR_VERSION (46)
 
 /**
  * NM_MICRO_VERSION:
@@ -30,7 +30,7 @@
  * Evaluates to the micro version number of NetworkManager which this source
  * compiled against.
  */
-#define NM_MICRO_VERSION (91)
+#define NM_MICRO_VERSION (0)
 
 /**
  * NM_CHECK_VERSION: