diff options
Diffstat (limited to 'src/libnm-core-public')
| -rw-r--r-- | src/libnm-core-public/meson.build | 1 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-core-types.h | 1 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-dbus-interface.h | 10 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-ip-config.h | 24 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-ovs-dpdk.h | 28 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-prefix-delegation.h | 41 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-sriov.h | 19 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-version-macros.h.in | 1 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-version.h | 14 |
9 files changed, 133 insertions, 6 deletions
diff --git a/src/libnm-core-public/meson.build b/src/libnm-core-public/meson.build index 97888467..086801d9 100644 --- a/src/libnm-core-public/meson.build +++ b/src/libnm-core-public/meson.build @@ -46,6 +46,7 @@ libnm_core_headers = files( 'nm-setting-ovs-port.h', 'nm-setting-ppp.h', 'nm-setting-pppoe.h', + 'nm-setting-prefix-delegation.h', 'nm-setting-proxy.h', 'nm-setting-serial.h', 'nm-setting-sriov.h', diff --git a/src/libnm-core-public/nm-core-types.h b/src/libnm-core-public/nm-core-types.h index a0d6bc82..617d6b74 100644 --- a/src/libnm-core-public/nm-core-types.h +++ b/src/libnm-core-public/nm-core-types.h @@ -52,6 +52,7 @@ typedef struct _NMSettingOvsPatch NMSettingOvsPatch; typedef struct _NMSettingOvsPort NMSettingOvsPort; typedef struct _NMSettingPpp NMSettingPpp; typedef struct _NMSettingPppoe NMSettingPppoe; +typedef struct _NMSettingPrefixDelegation NMSettingPrefixDelegation; typedef struct _NMSettingProxy NMSettingProxy; typedef struct _NMSettingSerial NMSettingSerial; typedef struct _NMSettingSriov NMSettingSriov; diff --git a/src/libnm-core-public/nm-dbus-interface.h b/src/libnm-core-public/nm-dbus-interface.h index d6267610..78241193 100644 --- a/src/libnm-core-public/nm-dbus-interface.h +++ b/src/libnm-core-public/nm-dbus-interface.h @@ -99,6 +99,10 @@ * on connection down. * https://issues.redhat.com/browse/RHEL-66262 * https://issues.redhat.com/browse/RHEL-67324 + * @NM_VERSION_INFO_CAPABILITY_IP4_FORWARDING: Indicates that NetworkManager supports + * configuring per-device IPv4 sysctl forwarding setting. Since: 1.54. + * @NM_VERSION_INFO_CAPABILITY_SRIOV_PRESERVE_ON_DOWN: NetworkManager supports the + * "sriov.preserve-on-down" property. Since: 1.54 * * The numeric values represent the bit index of the capability. These capabilities * can be queried in the "VersionInfo" D-Bus property. @@ -106,7 +110,9 @@ * Since: 1.42 */ typedef enum { - NM_VERSION_INFO_CAPABILITY_SYNC_ROUTE_WITH_TABLE = 0, + NM_VERSION_INFO_CAPABILITY_SYNC_ROUTE_WITH_TABLE = 0, + NM_VERSION_INFO_CAPABILITY_IP4_FORWARDING = 1, + NM_VERSION_INFO_CAPABILITY_SRIOV_PRESERVE_ON_DOWN = 2, } NMVersionInfoCapability; /** @@ -1014,7 +1020,7 @@ typedef enum { * 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, + * allows one 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 diff --git a/src/libnm-core-public/nm-setting-ip-config.h b/src/libnm-core-public/nm-setting-ip-config.h index f0a29f14..625b941f 100644 --- a/src/libnm-core-public/nm-setting-ip-config.h +++ b/src/libnm-core-public/nm-setting-ip-config.h @@ -53,6 +53,27 @@ typedef enum { NM_SETTING_IP_CONFIG_ROUTED_DNS_YES = 1, } NMSettingIPConfigRoutedDns; +/** + * NMSettingIPConfigForwarding: + * @NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT: use the global default value + * @NM_SETTING_IP_CONFIG_FORWARDING_NO: disable forwarding + * @NM_SETTING_IP_CONFIG_FORWARDING_YES: enable forwarding + * @NM_SETTING_IP_CONFIG_FORWARDING_AUTO: enable forwarding if any shared + * connection is active, use kernel default otherwise + * + * #NMSettingIPConfigForwarding indicates whether to configure sysctl + * interface-specific forwarding. When enabled, the interface will act + * as a router to forward the packet from one interface to another. + * + * Since: 1.54 + */ +typedef enum { + NM_SETTING_IP_CONFIG_FORWARDING_DEFAULT = -1, + NM_SETTING_IP_CONFIG_FORWARDING_NO = 0, + NM_SETTING_IP_CONFIG_FORWARDING_YES = 1, + NM_SETTING_IP_CONFIG_FORWARDING_AUTO = 2, +} NMSettingIPConfigForwarding; + typedef struct NMIPAddress NMIPAddress; GType nm_ip_address_get_type(void); @@ -364,6 +385,7 @@ char *nm_ip_routing_rule_to_string(const NMIPRoutingRule *self, #define NM_SETTING_IP_CONFIG_ROUTED_DNS "routed-dns" #define NM_SETTING_IP_CONFIG_SHARED_DHCP_RANGE "shared-dhcp-range" #define NM_SETTING_IP_CONFIG_SHARED_DHCP_LEASE_TIME "shared-dhcp-lease-time" +#define NM_SETTING_IP_CONFIG_FORWARDING "forwarding" /* these are not real GObject properties. */ #define NM_SETTING_IP_CONFIG_ROUTING_RULES "routing-rules" @@ -542,6 +564,8 @@ NM_AVAILABLE_IN_1_52 const char *nm_setting_ip_config_get_shared_dhcp_range(NMSettingIPConfig *setting); NM_AVAILABLE_IN_1_52 int nm_setting_ip_config_get_shared_dhcp_lease_time(NMSettingIPConfig *setting); +NM_AVAILABLE_IN_1_54 +NMSettingIPConfigForwarding nm_setting_ip_config_get_forwarding(NMSettingIPConfig *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-ovs-dpdk.h b/src/libnm-core-public/nm-setting-ovs-dpdk.h index 0578ab2c..0883dced 100644 --- a/src/libnm-core-public/nm-setting-ovs-dpdk.h +++ b/src/libnm-core-public/nm-setting-ovs-dpdk.h @@ -27,13 +27,31 @@ G_BEGIN_DECLS #define NM_SETTING_OVS_DPDK_SETTING_NAME "ovs-dpdk" -#define NM_SETTING_OVS_DPDK_DEVARGS "devargs" -#define NM_SETTING_OVS_DPDK_N_RXQ "n-rxq" -#define NM_SETTING_OVS_DPDK_N_RXQ_DESC "n-rxq-desc" -#define NM_SETTING_OVS_DPDK_N_TXQ_DESC "n-txq-desc" +#define NM_SETTING_OVS_DPDK_DEVARGS "devargs" +#define NM_SETTING_OVS_DPDK_N_RXQ "n-rxq" +#define NM_SETTING_OVS_DPDK_N_RXQ_DESC "n-rxq-desc" +#define NM_SETTING_OVS_DPDK_N_TXQ_DESC "n-txq-desc" +#define NM_SETTING_OVS_DPDK_LSC_INTERRUPT "lsc-interrupt" typedef struct _NMSettingOvsDpdkClass NMSettingOvsDpdkClass; +/** + * NMSettingOvsDpdkLscInterrupt: + * @NM_SETTING_OVS_DPDK_LSC_INTERRUPT_IGNORE: leave the value set to Open vSwitch default + * @NM_SETTING_OVS_DPDK_LSC_INTERRUPT_DISABLED: interrupt disabled (poll mode) + * @NM_SETTING_OVS_DPDK_LSC_INTERRUPT_ENABLED: interrupt enabled + * + * #NMSettingOvsDpdkLscInterrupt indicates whether the interface uses interrupts + * or poll mode for Link State Change (LSC) detection on the OVS DPDK interface. + * + * Since: 1.54 + */ +typedef enum { + NM_SETTING_OVS_DPDK_LSC_INTERRUPT_IGNORE = -1, + NM_SETTING_OVS_DPDK_LSC_INTERRUPT_DISABLED = 0, + NM_SETTING_OVS_DPDK_LSC_INTERRUPT_ENABLED = 1, +} NMSettingOvsDpdkLscInterrupt; + NM_AVAILABLE_IN_1_20 GType nm_setting_ovs_dpdk_get_type(void); NM_AVAILABLE_IN_1_20 @@ -47,6 +65,8 @@ NM_AVAILABLE_IN_1_42 guint32 nm_setting_ovs_dpdk_get_n_rxq_desc(NMSettingOvsDpdk *self); NM_AVAILABLE_IN_1_42 guint32 nm_setting_ovs_dpdk_get_n_txq_desc(NMSettingOvsDpdk *self); +NM_AVAILABLE_IN_1_54 +NMSettingOvsDpdkLscInterrupt nm_setting_ovs_dpdk_get_lsc_interrupt(NMSettingOvsDpdk *self); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-prefix-delegation.h b/src/libnm-core-public/nm-setting-prefix-delegation.h new file mode 100644 index 00000000..5361d7c6 --- /dev/null +++ b/src/libnm-core-public/nm-setting-prefix-delegation.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#ifndef __NM_SETTING_PREFIX_DELEGATION_H__ +#define __NM_SETTING_PREFIX_DELEGATION_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_PREFIX_DELEGATION (nm_setting_prefix_delegation_get_type()) +#define NM_SETTING_PREFIX_DELEGATION(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_PREFIX_DELEGATION, NMSettingVrf)) +#define NM_SETTING_PREFIX_DELEGATION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_PREFIX_DELEGATIONCONFIG, NMSettingVrfClass)) +#define NM_IS_SETTING_PREFIX_DELEGATION(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_PREFIX_DELEGATION)) +#define NM_IS_SETTING_PREFIX_DELEGATION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_PREFIX_DELEGATION)) +#define NM_SETTING_PREFIX_DELEGATION_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_PREFIX_DELEGATION, NMSettingVrfClass)) + +#define NM_SETTING_PREFIX_DELEGATION_SETTING_NAME "prefix-delegation" + +#define NM_SETTING_PREFIX_DELEGATION_SUBNET_ID "subnet-id" + +typedef struct _NMSettingPrefixDelegationClass NMSettingPrefixDelegationClass; + +NM_AVAILABLE_IN_1_54 +GType nm_setting_prefix_delegation_get_type(void); +NM_AVAILABLE_IN_1_54 +NMSetting *nm_setting_prefix_delegation_new(void); +NM_AVAILABLE_IN_1_54 +gint64 nm_setting_prefix_delegation_get_subnet_id(NMSettingPrefixDelegation *setting); + +G_END_DECLS + +#endif /* __NM_SETTING_PREFIX_DELEGATION_H__ */ diff --git a/src/libnm-core-public/nm-setting-sriov.h b/src/libnm-core-public/nm-setting-sriov.h index affccc48..60c5005c 100644 --- a/src/libnm-core-public/nm-setting-sriov.h +++ b/src/libnm-core-public/nm-setting-sriov.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS #define NM_SETTING_SRIOV_TOTAL_VFS "total-vfs" #define NM_SETTING_SRIOV_VFS "vfs" +#define NM_SETTING_SRIOV_PRESERVE_ON_DOWN "preserve-on-down" #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" @@ -57,6 +58,22 @@ typedef enum { } NMSriovVFVlanProtocol; /** + * NMSriovPreserveOnDown: + * @NM_SRIOV_PRESERVE_ON_DOWN_DEFAULT: use the default value + * @NM_SRIOV_PRESERVE_ON_DOWN_NO: reset the SR-IOV parameters when the + * connection is deactivated + * @NM_SRIOV_PRESERVE_ON_DOWN_YES: preserve the SR-IOV parameters set on + * the device when the connection is deactivated + * + * Since: 1.54 + */ +typedef enum { + NM_SRIOV_PRESERVE_ON_DOWN_DEFAULT = -1, + NM_SRIOV_PRESERVE_ON_DOWN_NO = 0, + NM_SRIOV_PRESERVE_ON_DOWN_YES = 1, +} NMSriovPreserveOnDown; + +/** * NMSriovEswitchMode: * @NM_SRIOV_ESWITCH_MODE_PRESERVE: don't modify current eswitch mode * @NM_SRIOV_ESWITCH_MODE_LEGACY: use legacy SRIOV @@ -123,6 +140,8 @@ NM_AVAILABLE_IN_1_14 gboolean nm_setting_sriov_remove_vf_by_index(NMSettingSriov *setting, guint index); NM_AVAILABLE_IN_1_14 void nm_setting_sriov_clear_vfs(NMSettingSriov *setting); +NM_AVAILABLE_IN_1_54 +NMSriovPreserveOnDown nm_setting_sriov_get_preserve_on_down(NMSettingSriov *setting); NM_AVAILABLE_IN_1_14 NMTernary nm_setting_sriov_get_autoprobe_drivers(NMSettingSriov *setting); NM_AVAILABLE_IN_1_46 diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index d204c4df..4c4772d2 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -77,6 +77,7 @@ #define NM_VERSION_1_48 (NM_ENCODE_VERSION(1, 48, 0)) #define NM_VERSION_1_50 (NM_ENCODE_VERSION(1, 50, 0)) #define NM_VERSION_1_52 (NM_ENCODE_VERSION(1, 52, 0)) +#define NM_VERSION_1_54 (NM_ENCODE_VERSION(1, 54, 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 6f7e42f3..33daf65f 100644 --- a/src/libnm-core-public/nm-version.h +++ b/src/libnm-core-public/nm-version.h @@ -425,6 +425,20 @@ #define NM_AVAILABLE_IN_1_52 #endif +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_54 +#define NM_DEPRECATED_IN_1_54 G_DEPRECATED +#define NM_DEPRECATED_IN_1_54_FOR(f) G_DEPRECATED_FOR(f) +#else +#define NM_DEPRECATED_IN_1_54 +#define NM_DEPRECATED_IN_1_54_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_54 +#define NM_AVAILABLE_IN_1_54 G_UNAVAILABLE(1, 54) +#else +#define NM_AVAILABLE_IN_1_54 +#endif + /* * Synchronous API for calling D-Bus in libnm is deprecated. See * https://networkmanager.dev/docs/libnm/latest/usage.html#sync-api |