diff options
Diffstat (limited to 'src/libnm-core-public')
30 files changed, 341 insertions, 113 deletions
diff --git a/src/libnm-core-public/meson.build b/src/libnm-core-public/meson.build index f1da4d02..c5407130 100644 --- a/src/libnm-core-public/meson.build +++ b/src/libnm-core-public/meson.build @@ -29,6 +29,7 @@ libnm_core_headers = files( 'nm-setting-ip-tunnel.h', 'nm-setting-ip4-config.h', 'nm-setting-ip6-config.h', + 'nm-setting-loopback.h', 'nm-setting-macsec.h', 'nm-setting-macvlan.h', 'nm-setting-match.h', @@ -37,6 +38,7 @@ libnm_core_headers = files( 'nm-setting-ovs-dpdk.h', 'nm-setting-ovs-external-ids.h', 'nm-setting-ovs-interface.h', + 'nm-setting-ovs-other-config.h', 'nm-setting-ovs-patch.h', 'nm-setting-ovs-port.h', 'nm-setting-ppp.h', diff --git a/src/libnm-core-public/nm-connection.h b/src/libnm-core-public/nm-connection.h index 47004ce8..ff3e0f92 100644 --- a/src/libnm-core-public/nm-connection.h +++ b/src/libnm-core-public/nm-connection.h @@ -13,7 +13,6 @@ #include "nm-core-types.h" #include "nm-setting.h" -#include "nm-errors.h" G_BEGIN_DECLS diff --git a/src/libnm-core-public/nm-core-types.h b/src/libnm-core-public/nm-core-types.h index c86c28fa..f285a0f6 100644 --- a/src/libnm-core-public/nm-core-types.h +++ b/src/libnm-core-public/nm-core-types.h @@ -35,12 +35,14 @@ typedef struct _NMSettingIP6Config NMSettingIP6Config; typedef struct _NMSettingIPConfig NMSettingIPConfig; typedef struct _NMSettingIPTunnel NMSettingIPTunnel; typedef struct _NMSettingInfiniband NMSettingInfiniband; +typedef struct _NMSettingLoopback NMSettingLoopback; typedef struct _NMSettingMacsec NMSettingMacsec; typedef struct _NMSettingMacvlan NMSettingMacvlan; typedef struct _NMSettingMatch NMSettingMatch; typedef struct _NMSettingOlpcMesh NMSettingOlpcMesh; typedef struct _NMSettingOvsBridge NMSettingOvsBridge; typedef struct _NMSettingOvsDpdk NMSettingOvsDpdk; +typedef struct _NMSettingOvsOtherConfig NMSettingOvsOtherConfig; typedef struct _NMSettingOvsExternalIDs NMSettingOvsExternalIDs; typedef struct _NMSettingOvsInterface NMSettingOvsInterface; typedef struct _NMSettingOvsPatch NMSettingOvsPatch; diff --git a/src/libnm-core-public/nm-dbus-interface.h b/src/libnm-core-public/nm-dbus-interface.h index 3e79d4c6..9f64f75f 100644 --- a/src/libnm-core-public/nm-dbus-interface.h +++ b/src/libnm-core-public/nm-dbus-interface.h @@ -39,6 +39,7 @@ #define NM_DBUS_INTERFACE_DEVICE_GRE NM_DBUS_INTERFACE_DEVICE ".Gre" #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" #define NM_DBUS_INTERFACE_DEVICE_MACSEC NM_DBUS_INTERFACE_DEVICE ".Macsec" #define NM_DBUS_INTERFACE_DEVICE_MACVLAN NM_DBUS_INTERFACE_DEVICE ".Macvlan" #define NM_DBUS_INTERFACE_DEVICE_MODEM NM_DBUS_INTERFACE_DEVICE ".Modem" @@ -90,6 +91,20 @@ #define NM_DBUS_PATH_DNS_MANAGER "/org/freedesktop/NetworkManager/DnsManager" /** + * NMVersionInfoCapability: + * %_NM_VERSION_INFO_CAPABILITY_UNUSED: a dummy capability. It has no meaning, + * don't use it. + * + * Currently no enum values are defined. These capabilities are exposed + * on D-Bus in the "VersionInfo" bit field. + * + * Since: 1.42 + */ +typedef enum { + _NM_VERSION_INFO_CAPABILITY_UNUSED = 0x7FFFFFFFu, +} NMVersionInfoCapability; + +/** * NMCapability: * @NM_CAPABILITY_TEAM: Teams can be managed. This means the team device plugin * is loaded. @@ -218,6 +233,7 @@ typedef enum { * @NM_DEVICE_TYPE_WIREGUARD: a WireGuard interface * @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. * * #NMDeviceType values indicate the type of hardware represented by a * device object. @@ -255,6 +271,7 @@ typedef enum { NM_DEVICE_TYPE_WIREGUARD = 29, NM_DEVICE_TYPE_WIFI_P2P = 30, NM_DEVICE_TYPE_VRF = 31, + NM_DEVICE_TYPE_LOOPBACK = 32, } NMDeviceType; /** @@ -1153,11 +1170,9 @@ typedef enum /*< flags >*/ { * Flags for the Reapply() D-Bus call of a device and * nm_device_reapply_async(). * - * Since: 1.42, 1.40.10 - * - * On 1.40.10+, no GFlags type is created. + * Since: 1.42 */ -typedef enum /*< skip >*/ { +typedef enum /*< flags >*/ { NM_DEVICE_REAPPLY_FLAGS_NONE = 0, NM_DEVICE_REAPPLY_FLAGS_PRESERVE_EXTERNAL_IP = 0x1, } NMDeviceReapplyFlags; diff --git a/src/libnm-core-public/nm-dbus-types.xml b/src/libnm-core-public/nm-dbus-types.xml index d8de9002..db5d8a8b 100644 --- a/src/libnm-core-public/nm-dbus-types.xml +++ b/src/libnm-core-public/nm-dbus-types.xml @@ -13,6 +13,26 @@ <refpurpose></refpurpose> </refnamediv> + <refsect2 id="NMVersionInfoCapability" role="enum"> + <title>enum NMVersionInfoCapability</title> + <indexterm zone="NMVersionInfoCapability"> + <primary>NMVersionInfoCapability</primary> + </indexterm> + <para><para>%_NM_VERSION_INFO_CAPABILITY_UNUSED: a dummy capability. It has no meaning, don't use it.</para><para>Currently no enum values are defined. These capabilities are exposed on D-Bus in the "VersionInfo" bit field.</para><para>Since: 1.42</para><para></para></para> + <refsect3 role="enum_members"> + <title>Values</title> + <informaltable role="enum_members_table" pgwide="1" frame="none"> + <tgroup cols="4"> + <colspec colname="enum_members_name" colwidth="300px" /> + <colspec colname="enum_members_value" colwidth="100px"/> + <colspec colname="enum_members_description" /> + <tbody> + </tbody> + </tgroup> + </informaltable> + </refsect3> + </refsect2> + <refsect2 id="NMCapability" role="enum"> <title>enum NMCapability</title> <indexterm zone="NMCapability"> @@ -322,6 +342,11 @@ <entry role="enum_member_value"><para>= <literal>31</literal></para><para></para></entry> <entry role="enum_member_description"><para>A VRF (Virtual Routing and Forwarding) interface. Since: 1.24.</para><para></para></entry> </row> + <row role="constant"> + <entry role="enum_member_name"><para>NM_DEVICE_TYPE_LOOPBACK</para><para></para></entry> + <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> </tbody> </tgroup> </informaltable> @@ -1913,7 +1938,7 @@ <indexterm zone="NMDeviceReapplyFlags"> <primary>NMDeviceReapplyFlags</primary> </indexterm> - <para><para>Flags for the Reapply() D-Bus call of a device and nm_device_reapply_async().</para><para>Since: 1.42, 1.40.10</para><para>On 1.40.10+, no GFlags type is created.</para><para></para></para> + <para><para>Flags for the Reapply() D-Bus call of a device and nm_device_reapply_async().</para><para>Since: 1.42</para><para></para></para> <refsect3 role="enum_members"> <title>Values</title> <informaltable role="enum_members_table" pgwide="1" frame="none"> diff --git a/src/libnm-core-public/nm-setting-6lowpan.h b/src/libnm-core-public/nm-setting-6lowpan.h index ab2f7b44..41c35478 100644 --- a/src/libnm-core-public/nm-setting-6lowpan.h +++ b/src/libnm-core-public/nm-setting-6lowpan.h @@ -33,10 +33,10 @@ typedef struct _NMSetting6LowpanClass NMSetting6LowpanClass; NM_AVAILABLE_IN_1_14 GType nm_setting_6lowpan_get_type(void); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 NMSetting *nm_setting_6lowpan_new(void); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 const char *nm_setting_6lowpan_get_parent(NMSetting6Lowpan *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-8021x.h b/src/libnm-core-public/nm-setting-8021x.h index 93c78fa3..d91850f7 100644 --- a/src/libnm-core-public/nm-setting-8021x.h +++ b/src/libnm-core-public/nm-setting-8021x.h @@ -63,8 +63,14 @@ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_scheme >*/ * NMSetting8021xAuthFlags: * @NM_SETTING_802_1X_AUTH_FLAGS_NONE: No flags * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE: Disable TLSv1.0 + * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_ENABLE: Enable TLSv1.0. Since 1.42. * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE: Disable TLSv1.1 + * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_ENABLE: Enable TLSv1.1. Since 1.42. * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE: Disable TLSv1.2 + * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_ENABLE: Enable TLSv1.2. Since 1.42. + * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_DISABLE: Disable TLSv1.3. Since 1.42. + * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_ENABLE: Enable TLSv1.3. Since 1.42. + * @NM_SETTING_802_1X_AUTH_FLAGS_TLS_DISABLE_TIME_CHECKS: Disable TLS time checks. Since 1.42. * @NM_SETTING_802_1X_AUTH_FLAGS_ALL: All supported flags * * #NMSetting8021xAuthFlags values indicate which authentication settings @@ -76,12 +82,18 @@ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_scheme >*/ * Since: 1.8 */ typedef enum /*< underscore_name=nm_setting_802_1x_auth_flags, flags >*/ { - NM_SETTING_802_1X_AUTH_FLAGS_NONE = 0, - NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE = 0x1, - NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE = 0x2, - NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE = 0x4, - - NM_SETTING_802_1X_AUTH_FLAGS_ALL = 0x7, + NM_SETTING_802_1X_AUTH_FLAGS_NONE = 0, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE = 0x1, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE = 0x2, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE = 0x4, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_DISABLE_TIME_CHECKS = 0x8, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_DISABLE = 0x10, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_ENABLE = 0x20, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_ENABLE = 0x40, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_ENABLE = 0x80, + NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_ENABLE = 0x100, + + NM_SETTING_802_1X_AUTH_FLAGS_ALL = 0x1FF, } NMSetting8021xAuthFlags; #define NM_TYPE_SETTING_802_1X (nm_setting_802_1x_get_type()) diff --git a/src/libnm-core-public/nm-setting-bond.h b/src/libnm-core-public/nm-setting-bond.h index ed44abbf..10d703bc 100644 --- a/src/libnm-core-public/nm-setting-bond.h +++ b/src/libnm-core-public/nm-setting-bond.h @@ -37,6 +37,7 @@ G_BEGIN_DECLS #define NM_SETTING_BOND_OPTION_ARP_IP_TARGET "arp_ip_target" #define NM_SETTING_BOND_OPTION_ARP_VALIDATE "arp_validate" #define NM_SETTING_BOND_OPTION_PRIMARY "primary" +#define NM_SETTING_BOND_OPTION_BALANCE_SLB "balance-slb" #define NM_SETTING_BOND_OPTION_PRIMARY_RESELECT "primary_reselect" #define NM_SETTING_BOND_OPTION_FAIL_OVER_MAC "fail_over_mac" #define NM_SETTING_BOND_OPTION_USE_CARRIER "use_carrier" diff --git a/src/libnm-core-public/nm-setting-connection.h b/src/libnm-core-public/nm-setting-connection.h index 4f6653bf..875307bd 100644 --- a/src/libnm-core-public/nm-setting-connection.h +++ b/src/libnm-core-public/nm-setting-connection.h @@ -221,7 +221,7 @@ NMSettingConnectionLlmnr nm_setting_connection_get_llmnr(NMSettingConnection *se NM_AVAILABLE_IN_1_34 NMSettingConnectionDnsOverTls nm_setting_connection_get_dns_over_tls(NMSettingConnection *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 NMMptcpFlags nm_setting_connection_get_mptcp_flags(NMSettingConnection *setting); NM_AVAILABLE_IN_1_20 diff --git a/src/libnm-core-public/nm-setting-hostname.h b/src/libnm-core-public/nm-setting-hostname.h index 3fb71197..99b221ca 100644 --- a/src/libnm-core-public/nm-setting-hostname.h +++ b/src/libnm-core-public/nm-setting-hostname.h @@ -36,7 +36,7 @@ typedef struct _NMSettingHostnameClass NMSettingHostnameClass; NM_AVAILABLE_IN_1_30 GType nm_setting_hostname_get_type(void); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 NMSetting *nm_setting_hostname_new(void); NM_AVAILABLE_IN_1_30 diff --git a/src/libnm-core-public/nm-setting-ip-config.h b/src/libnm-core-public/nm-setting-ip-config.h index acbdec0f..d52cf147 100644 --- a/src/libnm-core-public/nm-setting-ip-config.h +++ b/src/libnm-core-public/nm-setting-ip-config.h @@ -144,6 +144,7 @@ gboolean nm_ip_route_attribute_validate(const char *name, #define NM_IP_ROUTE_ATTRIBUTE_TOS "tos" #define NM_IP_ROUTE_ATTRIBUTE_TYPE "type" #define NM_IP_ROUTE_ATTRIBUTE_WINDOW "window" +#define NM_IP_ROUTE_ATTRIBUTE_WEIGHT "weight" /*****************************************************************************/ @@ -338,6 +339,7 @@ char *nm_ip_routing_rule_to_string(const NMIPRoutingRule *self, #define NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT "required-timeout" #define NM_SETTING_IP_CONFIG_DHCP_IAID "dhcp-iaid" #define NM_SETTING_IP_CONFIG_DHCP_REJECT_SERVERS "dhcp-reject-servers" +#define NM_SETTING_IP_CONFIG_AUTO_ROUTE_EXT_GW "auto-route-ext-gw" /* these are not real GObject properties. */ #define NM_SETTING_IP_CONFIG_ROUTING_RULES "routing-rules" @@ -480,7 +482,7 @@ NM_AVAILABLE_IN_1_2 int nm_setting_ip_config_get_dhcp_timeout(NMSettingIPConfig *setting); NM_AVAILABLE_IN_1_34 int nm_setting_ip_config_get_required_timeout(NMSettingIPConfig *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 const char *nm_setting_ip_config_get_dhcp_iaid(NMSettingIPConfig *setting); NM_AVAILABLE_IN_1_22 @@ -495,6 +497,8 @@ NM_AVAILABLE_IN_1_28 void nm_setting_ip_config_remove_dhcp_reject_server(NMSettingIPConfig *setting, guint idx); NM_AVAILABLE_IN_1_28 void nm_setting_ip_config_clear_dhcp_reject_servers(NMSettingIPConfig *setting); +NM_AVAILABLE_IN_1_42 +NMTernary nm_setting_ip_config_get_auto_route_ext_gw(NMSettingIPConfig *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-ip-tunnel.h b/src/libnm-core-public/nm-setting-ip-tunnel.h index 62472f11..bcb3eab6 100644 --- a/src/libnm-core-public/nm-setting-ip-tunnel.h +++ b/src/libnm-core-public/nm-setting-ip-tunnel.h @@ -38,6 +38,7 @@ G_BEGIN_DECLS #define NM_SETTING_IP_TUNNEL_OUTPUT_KEY "output-key" #define NM_SETTING_IP_TUNNEL_ENCAPSULATION_LIMIT "encapsulation-limit" #define NM_SETTING_IP_TUNNEL_FLOW_LABEL "flow-label" +#define NM_SETTING_IP_TUNNEL_FWMARK "fwmark" #define NM_SETTING_IP_TUNNEL_MTU "mtu" #define NM_SETTING_IP_TUNNEL_FLAGS "flags" @@ -94,10 +95,12 @@ NM_AVAILABLE_IN_1_2 const char *nm_setting_ip_tunnel_get_input_key(NMSettingIPTunnel *setting); NM_AVAILABLE_IN_1_2 const char *nm_setting_ip_tunnel_get_output_key(NMSettingIPTunnel *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 guint nm_setting_ip_tunnel_get_encapsulation_limit(NMSettingIPTunnel *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 guint nm_setting_ip_tunnel_get_flow_label(NMSettingIPTunnel *setting); +NM_AVAILABLE_IN_1_42 +guint32 nm_setting_ip_tunnel_get_fwmark(NMSettingIPTunnel *setting); NM_AVAILABLE_IN_1_2 guint nm_setting_ip_tunnel_get_mtu(NMSettingIPTunnel *setting); NM_AVAILABLE_IN_1_12 diff --git a/src/libnm-core-public/nm-setting-ip4-config.h b/src/libnm-core-public/nm-setting-ip4-config.h index 66c457b9..323fe14d 100644 --- a/src/libnm-core-public/nm-setting-ip4-config.h +++ b/src/libnm-core-public/nm-setting-ip4-config.h @@ -113,7 +113,7 @@ const char *nm_setting_ip4_config_get_dhcp_fqdn(NMSettingIP4Config *setting); NM_AVAILABLE_IN_1_28 const char *nm_setting_ip4_config_get_dhcp_vendor_class_identifier(NMSettingIP4Config *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 NMSettingIP4LinkLocal nm_setting_ip4_config_get_link_local(NMSettingIP4Config *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-loopback.h b/src/libnm-core-public/nm-setting-loopback.h new file mode 100644 index 00000000..96b9c6d8 --- /dev/null +++ b/src/libnm-core-public/nm-setting-loopback.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2022 Red Hat, Inc. + */ + +#ifndef __NM_SETTING_LOOPBACK_H__ +#define __NM_SETTING_LOOPBACK_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_LOOPBACK (nm_setting_loopback_get_type()) +#define NM_SETTING_LOOPBACK(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_LOOPBACK, NMSettingLoopback)) +#define NM_SETTING_LOOPBACK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_LOOPBACKCONFIG, NMSettingLoopbackClass)) +#define NM_IS_SETTING_LOOPBACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_LOOPBACK)) +#define NM_IS_SETTING_LOOPBACK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_LOOPBACK)) +#define NM_SETTING_LOOPBACK_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_LOOPBACK, NMSettingLoopbackClass)) + +#define NM_SETTING_LOOPBACK_SETTING_NAME "loopback" + +#define NM_SETTING_LOOPBACK_MTU "mtu" + +typedef struct _NMSettingLoopbackClass NMSettingLoopbackClass; + +NM_AVAILABLE_IN_1_42 +GType nm_setting_loopback_get_type(void); +NM_AVAILABLE_IN_1_42 +NMSetting *nm_setting_loopback_new(void); + +NM_AVAILABLE_IN_1_42 +guint32 nm_setting_loopback_get_mtu(NMSettingLoopback *setting); + +G_END_DECLS + +#endif /* __NM_SETTING_LOOPBACK_H__ */ diff --git a/src/libnm-core-public/nm-setting-ovs-bridge.h b/src/libnm-core-public/nm-setting-ovs-bridge.h index bc7d7e9b..0f1a8724 100644 --- a/src/libnm-core-public/nm-setting-ovs-bridge.h +++ b/src/libnm-core-public/nm-setting-ovs-bridge.h @@ -49,7 +49,7 @@ NM_AVAILABLE_IN_1_10 gboolean nm_setting_ovs_bridge_get_rstp_enable(NMSettingOvsBridge *self); NM_AVAILABLE_IN_1_10 gboolean nm_setting_ovs_bridge_get_stp_enable(NMSettingOvsBridge *self); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 const char *nm_setting_ovs_bridge_get_datapath_type(NMSettingOvsBridge *self); 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 2e2d11b9..0578ab2c 100644 --- a/src/libnm-core-public/nm-setting-ovs-dpdk.h +++ b/src/libnm-core-public/nm-setting-ovs-dpdk.h @@ -27,8 +27,10 @@ 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_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" typedef struct _NMSettingOvsDpdkClass NMSettingOvsDpdkClass; @@ -41,6 +43,10 @@ NM_AVAILABLE_IN_1_20 const char *nm_setting_ovs_dpdk_get_devargs(NMSettingOvsDpdk *self); NM_AVAILABLE_IN_1_36 guint32 nm_setting_ovs_dpdk_get_n_rxq(NMSettingOvsDpdk *self); +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); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-ovs-interface.h b/src/libnm-core-public/nm-setting-ovs-interface.h index a36a1a53..8c6beec2 100644 --- a/src/libnm-core-public/nm-setting-ovs-interface.h +++ b/src/libnm-core-public/nm-setting-ovs-interface.h @@ -32,6 +32,8 @@ G_BEGIN_DECLS #define NM_SETTING_OVS_INTERFACE_TYPE "type" +#define NM_SETTING_OVS_INTERFACE_OFPORT_REQUEST "ofport-request" + typedef struct _NMSettingOvsInterfaceClass NMSettingOvsInterfaceClass; NM_AVAILABLE_IN_1_10 @@ -42,6 +44,9 @@ NMSetting *nm_setting_ovs_interface_new(void); NM_AVAILABLE_IN_1_10 const char *nm_setting_ovs_interface_get_interface_type(NMSettingOvsInterface *self); +NM_AVAILABLE_IN_1_42 +guint32 nm_setting_ovs_interface_get_ofport_request(NMSettingOvsInterface *self); + G_END_DECLS #endif /* __NM_SETTING_OVS_INTERFACE_H__ */ diff --git a/src/libnm-core-public/nm-setting-ovs-other-config.h b/src/libnm-core-public/nm-setting-ovs-other-config.h new file mode 100644 index 00000000..35de8ab2 --- /dev/null +++ b/src/libnm-core-public/nm-setting-ovs-other-config.h @@ -0,0 +1,63 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017 - 2020, 2022 Red Hat, Inc. + */ + +#ifndef __NM_SETTING_OVS_OTHER_CONFIG_H__ +#define __NM_SETTING_OVS_OTHER_CONFIG_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_OVS_OTHER_CONFIG (nm_setting_ovs_other_config_get_type()) +#define NM_SETTING_OVS_OTHER_CONFIG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_OVS_OTHER_CONFIG, NMSettingOvsOtherConfig)) +#define NM_SETTING_OVS_OTHER_CONFIG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), \ + NM_TYPE_SETTING_OVS_OTHER_CONFIG, \ + NMSettingOvsOtherConfigClass)) +#define NM_IS_SETTING_OVS_OTHER_CONFIG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_OVS_OTHER_CONFIG)) +#define NM_IS_SETTING_OVS_OTHER_CONFIG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_OVS_OTHER_CONFIG)) +#define NM_SETTING_OVS_OTHER_CONFIG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), \ + NM_TYPE_SETTING_OVS_OTHER_CONFIG, \ + NMSettingOvsOtherConfigClass)) + +#define NM_SETTING_OVS_OTHER_CONFIG_SETTING_NAME "ovs-other-config" + +#define NM_SETTING_OVS_OTHER_CONFIG_DATA "data" + +typedef struct _NMSettingOvsOtherConfigClass NMSettingOvsOtherConfigClass; + +NM_AVAILABLE_IN_1_42 +GType nm_setting_ovs_other_config_get_type(void); + +NM_AVAILABLE_IN_1_42 +NMSetting *nm_setting_ovs_other_config_new(void); + +/*****************************************************************************/ + +NM_AVAILABLE_IN_1_42 +const char *const *nm_setting_ovs_other_config_get_data_keys(NMSettingOvsOtherConfig *setting, + guint *out_len); + +NM_AVAILABLE_IN_1_42 +const char *nm_setting_ovs_other_config_get_data(NMSettingOvsOtherConfig *setting, const char *key); + +NM_AVAILABLE_IN_1_42 +void nm_setting_ovs_other_config_set_data(NMSettingOvsOtherConfig *setting, + const char *key, + const char *val); + +/*****************************************************************************/ + +G_END_DECLS + +#endif /* __NM_SETTING_OVS_OTHER_CONFIG_H__ */ diff --git a/src/libnm-core-public/nm-setting-ovs-port.h b/src/libnm-core-public/nm-setting-ovs-port.h index eda23d3e..4a452c0c 100644 --- a/src/libnm-core-public/nm-setting-ovs-port.h +++ b/src/libnm-core-public/nm-setting-ovs-port.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS #define NM_SETTING_OVS_PORT_VLAN_MODE "vlan-mode" #define NM_SETTING_OVS_PORT_TAG "tag" +#define NM_SETTING_OVS_PORT_TRUNKS "trunks" #define NM_SETTING_OVS_PORT_LACP "lacp" #define NM_SETTING_OVS_PORT_BOND_MODE "bond-mode" #define NM_SETTING_OVS_PORT_BOND_UPDELAY "bond-updelay" @@ -54,6 +55,20 @@ guint nm_setting_ovs_port_get_bond_updelay(NMSettingOvsPort *self); NM_AVAILABLE_IN_1_10 guint nm_setting_ovs_port_get_bond_downdelay(NMSettingOvsPort *self); +NM_AVAILABLE_IN_1_42 +void nm_setting_ovs_port_add_trunk(NMSettingOvsPort *setting, NMRange *trunk); +NM_AVAILABLE_IN_1_42 +guint nm_setting_ovs_port_get_num_trunks(NMSettingOvsPort *setting); +NM_AVAILABLE_IN_1_42 +NMRange *nm_setting_ovs_port_get_trunk(NMSettingOvsPort *setting, guint idx); +NM_AVAILABLE_IN_1_42 +void nm_setting_ovs_port_remove_trunk(NMSettingOvsPort *setting, guint idx); +NM_AVAILABLE_IN_1_42 +gboolean +nm_setting_ovs_port_remove_trunk_by_value(NMSettingOvsPort *setting, guint start, guint end); +NM_AVAILABLE_IN_1_42 +void nm_setting_ovs_port_clear_trunks(NMSettingOvsPort *setting); + G_END_DECLS #endif /* __NM_SETTING_OVS_PORT_H__ */ diff --git a/src/libnm-core-public/nm-setting-sriov.h b/src/libnm-core-public/nm-setting-sriov.h index 0438e800..071b9837 100644 --- a/src/libnm-core-public/nm-setting-sriov.h +++ b/src/libnm-core-public/nm-setting-sriov.h @@ -109,7 +109,7 @@ NM_AVAILABLE_IN_1_14 const char **nm_sriov_vf_get_attribute_names(const NMSriovVF *vf); NM_AVAILABLE_IN_1_14 GVariant *nm_sriov_vf_get_attribute(const NMSriovVF *vf, const char *name); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 gboolean nm_sriov_vf_attribute_validate(const char *name, GVariant *value, gboolean *known, GError **error); diff --git a/src/libnm-core-public/nm-setting-tc-config.h b/src/libnm-core-public/nm-setting-tc-config.h index ab1a9909..54871a4a 100644 --- a/src/libnm-core-public/nm-setting-tc-config.h +++ b/src/libnm-core-public/nm-setting-tc-config.h @@ -102,9 +102,9 @@ NM_AVAILABLE_IN_1_12 void nm_tc_tfilter_set_handle(NMTCTfilter *tfilter, guint32 handle); NM_AVAILABLE_IN_1_12 guint32 nm_tc_tfilter_get_parent(NMTCTfilter *tfilter); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 NMTCAction *nm_tc_tfilter_get_action(NMTCTfilter *tfilter); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 void nm_tc_tfilter_set_action(NMTCTfilter *tfilter, NMTCAction *action); #define NM_TYPE_SETTING_TC_CONFIG (nm_setting_tc_config_get_type()) diff --git a/src/libnm-core-public/nm-setting-vlan.h b/src/libnm-core-public/nm-setting-vlan.h index a99d7256..7fa79e35 100644 --- a/src/libnm-core-public/nm-setting-vlan.h +++ b/src/libnm-core-public/nm-setting-vlan.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS #define NM_SETTING_VLAN_PARENT "parent" #define NM_SETTING_VLAN_ID "id" #define NM_SETTING_VLAN_FLAGS "flags" +#define NM_SETTING_VLAN_PROTOCOL "protocol" #define NM_SETTING_VLAN_INGRESS_PRIORITY_MAP "ingress-priority-map" #define NM_SETTING_VLAN_EGRESS_PRIORITY_MAP "egress-priority-map" @@ -84,6 +85,8 @@ NMSetting *nm_setting_vlan_new(void); const char *nm_setting_vlan_get_parent(NMSettingVlan *setting); guint32 nm_setting_vlan_get_id(NMSettingVlan *setting); guint32 nm_setting_vlan_get_flags(NMSettingVlan *setting); +NM_AVAILABLE_IN_1_42 +const char *nm_setting_vlan_get_protocol(NMSettingVlan *setting); gint32 nm_setting_vlan_get_num_priorities(NMSettingVlan *setting, NMVlanPriorityMap map); diff --git a/src/libnm-core-public/nm-setting-vpn.h b/src/libnm-core-public/nm-setting-vpn.h index a00fa975..6f55f87f 100644 --- a/src/libnm-core-public/nm-setting-vpn.h +++ b/src/libnm-core-public/nm-setting-vpn.h @@ -50,7 +50,7 @@ NMSetting *nm_setting_vpn_new(void); const char *nm_setting_vpn_get_service_type(NMSettingVpn *setting); const char *nm_setting_vpn_get_user_name(NMSettingVpn *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 gboolean nm_setting_vpn_get_persistent(NMSettingVpn *setting); guint32 nm_setting_vpn_get_num_data_items(NMSettingVpn *setting); diff --git a/src/libnm-core-public/nm-setting-wpan.h b/src/libnm-core-public/nm-setting-wpan.h index 934ab196..fb552c34 100644 --- a/src/libnm-core-public/nm-setting-wpan.h +++ b/src/libnm-core-public/nm-setting-wpan.h @@ -38,18 +38,18 @@ typedef struct _NMSettingWpanClass NMSettingWpanClass; NM_AVAILABLE_IN_1_14 GType nm_setting_wpan_get_type(void); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 NMSetting *nm_setting_wpan_new(void); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 const char *nm_setting_wpan_get_mac_address(NMSettingWpan *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 guint16 nm_setting_wpan_get_pan_id(NMSettingWpan *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 guint16 nm_setting_wpan_get_short_address(NMSettingWpan *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 gint16 nm_setting_wpan_get_page(NMSettingWpan *setting); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 gint16 nm_setting_wpan_get_channel(NMSettingWpan *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting.h b/src/libnm-core-public/nm-setting.h index ae898458..737cf883 100644 --- a/src/libnm-core-public/nm-setting.h +++ b/src/libnm-core-public/nm-setting.h @@ -260,6 +260,25 @@ const GVariantType *nm_setting_get_dbus_property_type(NMSetting *setting, /*****************************************************************************/ +typedef struct _NMRange NMRange; + +NM_AVAILABLE_IN_1_42 +GType nm_range_get_type(void); +NM_AVAILABLE_IN_1_42 +NMRange *nm_range_new(guint64 start, guint64 end); +NM_AVAILABLE_IN_1_42 +NMRange *nm_range_ref(const NMRange *range); +NM_AVAILABLE_IN_1_42 +void nm_range_unref(const NMRange *range); +NM_AVAILABLE_IN_1_42 +int nm_range_cmp(const NMRange *a, const NMRange *b); +NM_AVAILABLE_IN_1_42 +gboolean nm_range_get_range(const NMRange *range, guint64 *start, guint64 *end); +NM_AVAILABLE_IN_1_42 +char *nm_range_to_str(const NMRange *range); +NM_AVAILABLE_IN_1_42 +NMRange *nm_range_from_str(const char *str, GError **error); + G_END_DECLS #endif /* __NM_SETTING_H__ */ diff --git a/src/libnm-core-public/nm-utils.h b/src/libnm-core-public/nm-utils.h index dc89f234..ca399c4c 100644 --- a/src/libnm-core-public/nm-utils.h +++ b/src/libnm-core-public/nm-utils.h @@ -104,13 +104,13 @@ GPtrArray *nm_utils_ip6_addresses_from_variant(GVariant *value, char **out_gatew GVariant *nm_utils_ip6_routes_to_variant(GPtrArray *routes); GPtrArray *nm_utils_ip6_routes_from_variant(GVariant *value); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 GVariant *nm_utils_ip_addresses_to_variant(GPtrArray *addresses); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 GPtrArray *nm_utils_ip_addresses_from_variant(GVariant *value, int family); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 GVariant *nm_utils_ip_routes_to_variant(GPtrArray *routes); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 GPtrArray *nm_utils_ip_routes_from_variant(GVariant *value, int family); char *nm_utils_uuid_generate(void); @@ -172,6 +172,7 @@ gboolean nm_utils_iface_valid_name(const char *name); NM_AVAILABLE_IN_1_6 gboolean nm_utils_is_valid_iface_name(const char *name, GError **error); +NM_DEPRECATED_IN_1_32 gboolean nm_utils_is_uuid(const char *str); /** @@ -254,6 +255,9 @@ NM_AVAILABLE_IN_1_16 gboolean nm_utils_base64secret_decode(const char *base64_key, gsize required_key_len, guint8 *out_key); +NM_AVAILABLE_IN_1_42 +void nm_utils_ensure_gtypes(void); + G_END_DECLS #endif /* __NM_UTILS_H__ */ diff --git a/src/libnm-core-public/nm-version-macros.h b/src/libnm-core-public/nm-version-macros.h index f3d50252..bbdeb2f3 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 (40) +#define NM_MINOR_VERSION (42) /** * NM_MICRO_VERSION: @@ -30,7 +30,7 @@ * Evaluates to the micro version number of NetworkManager which this source * compiled against. */ -#define NM_MICRO_VERSION (12) +#define NM_MICRO_VERSION (0) /** * NM_CHECK_VERSION: @@ -41,38 +41,37 @@ * Returns: %TRUE if the version of the NetworkManager header files * is the same as or newer than the passed-in version. */ -#define NM_CHECK_VERSION(major,minor,micro) \ - (NM_MAJOR_VERSION > (major) || \ - (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \ +#define NM_CHECK_VERSION(major, minor, micro) \ + (NM_MAJOR_VERSION > (major) || \ + (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \ (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro))) +#define NM_ENCODE_VERSION(major, minor, micro) ((major) << 16 | (minor) << 8 | (micro)) -#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro)) - -#define NM_VERSION_0_9_8 (NM_ENCODE_VERSION (0, 9, 8)) -#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10)) -#define NM_VERSION_1_0 (NM_ENCODE_VERSION (1, 0, 0)) -#define NM_VERSION_1_2 (NM_ENCODE_VERSION (1, 2, 0)) -#define NM_VERSION_1_4 (NM_ENCODE_VERSION (1, 4, 0)) -#define NM_VERSION_1_6 (NM_ENCODE_VERSION (1, 6, 0)) -#define NM_VERSION_1_8 (NM_ENCODE_VERSION (1, 8, 0)) -#define NM_VERSION_1_10 (NM_ENCODE_VERSION (1, 10, 0)) -#define NM_VERSION_1_12 (NM_ENCODE_VERSION (1, 12, 0)) -#define NM_VERSION_1_14 (NM_ENCODE_VERSION (1, 14, 0)) -#define NM_VERSION_1_16 (NM_ENCODE_VERSION (1, 16, 0)) -#define NM_VERSION_1_18 (NM_ENCODE_VERSION (1, 18, 0)) -#define NM_VERSION_1_20 (NM_ENCODE_VERSION (1, 20, 0)) -#define NM_VERSION_1_22 (NM_ENCODE_VERSION (1, 22, 0)) -#define NM_VERSION_1_24 (NM_ENCODE_VERSION (1, 24, 0)) -#define NM_VERSION_1_26 (NM_ENCODE_VERSION (1, 26, 0)) -#define NM_VERSION_1_28 (NM_ENCODE_VERSION (1, 28, 0)) -#define NM_VERSION_1_30 (NM_ENCODE_VERSION (1, 30, 0)) -#define NM_VERSION_1_32 (NM_ENCODE_VERSION (1, 32, 0)) -#define NM_VERSION_1_34 (NM_ENCODE_VERSION (1, 34, 0)) -#define NM_VERSION_1_36 (NM_ENCODE_VERSION (1, 36, 0)) -#define NM_VERSION_1_38 (NM_ENCODE_VERSION (1, 38, 0)) -#define NM_VERSION_1_40 (NM_ENCODE_VERSION (1, 40, 0)) -#define NM_VERSION_1_40_4 (NM_ENCODE_VERSION (1, 40, 4)) +#define NM_VERSION_0_9_8 (NM_ENCODE_VERSION(0, 9, 8)) +#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION(0, 9, 10)) +#define NM_VERSION_1_0 (NM_ENCODE_VERSION(1, 0, 0)) +#define NM_VERSION_1_2 (NM_ENCODE_VERSION(1, 2, 0)) +#define NM_VERSION_1_4 (NM_ENCODE_VERSION(1, 4, 0)) +#define NM_VERSION_1_6 (NM_ENCODE_VERSION(1, 6, 0)) +#define NM_VERSION_1_8 (NM_ENCODE_VERSION(1, 8, 0)) +#define NM_VERSION_1_10 (NM_ENCODE_VERSION(1, 10, 0)) +#define NM_VERSION_1_12 (NM_ENCODE_VERSION(1, 12, 0)) +#define NM_VERSION_1_14 (NM_ENCODE_VERSION(1, 14, 0)) +#define NM_VERSION_1_16 (NM_ENCODE_VERSION(1, 16, 0)) +#define NM_VERSION_1_18 (NM_ENCODE_VERSION(1, 18, 0)) +#define NM_VERSION_1_20 (NM_ENCODE_VERSION(1, 20, 0)) +#define NM_VERSION_1_22 (NM_ENCODE_VERSION(1, 22, 0)) +#define NM_VERSION_1_24 (NM_ENCODE_VERSION(1, 24, 0)) +#define NM_VERSION_1_26 (NM_ENCODE_VERSION(1, 26, 0)) +#define NM_VERSION_1_28 (NM_ENCODE_VERSION(1, 28, 0)) +#define NM_VERSION_1_30 (NM_ENCODE_VERSION(1, 30, 0)) +#define NM_VERSION_1_32 (NM_ENCODE_VERSION(1, 32, 0)) +#define NM_VERSION_1_34 (NM_ENCODE_VERSION(1, 34, 0)) +#define NM_VERSION_1_36 (NM_ENCODE_VERSION(1, 36, 0)) +#define NM_VERSION_1_38 (NM_ENCODE_VERSION(1, 38, 0)) +#define NM_VERSION_1_40 (NM_ENCODE_VERSION(1, 40, 0)) +#define NM_VERSION_1_42 (NM_ENCODE_VERSION(1, 42, 0)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * @@ -81,17 +80,17 @@ * version, you are already using the future API, even if * it is not yet released. Hence, the currently used API * version is the future one. */ -#define NM_API_VERSION \ - (((NM_MINOR_VERSION % 2) == 1) \ - ? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \ +#define NM_API_VERSION \ + (((NM_MINOR_VERSION % 2) == 1) \ + ? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \ : NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION , ((NM_MICRO_VERSION + 1) / 2) * 2)) /* deprecated. */ -#define NM_VERSION_CUR_STABLE NM_API_VERSION +#define NM_VERSION_CUR_STABLE NM_API_VERSION /* deprecated. */ #define NM_VERSION_NEXT_STABLE NM_API_VERSION -#define NM_VERSION NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION) +#define NM_VERSION NM_ENCODE_VERSION(NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION) -#endif /* __NM_VERSION_MACROS_H__ */ +#endif /* __NM_VERSION_MACROS_H__ */ diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index fc854aef..543edcf0 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -41,38 +41,37 @@ * Returns: %TRUE if the version of the NetworkManager header files * is the same as or newer than the passed-in version. */ -#define NM_CHECK_VERSION(major,minor,micro) \ - (NM_MAJOR_VERSION > (major) || \ - (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \ +#define NM_CHECK_VERSION(major, minor, micro) \ + (NM_MAJOR_VERSION > (major) || \ + (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \ (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro))) +#define NM_ENCODE_VERSION(major, minor, micro) ((major) << 16 | (minor) << 8 | (micro)) -#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro)) - -#define NM_VERSION_0_9_8 (NM_ENCODE_VERSION (0, 9, 8)) -#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10)) -#define NM_VERSION_1_0 (NM_ENCODE_VERSION (1, 0, 0)) -#define NM_VERSION_1_2 (NM_ENCODE_VERSION (1, 2, 0)) -#define NM_VERSION_1_4 (NM_ENCODE_VERSION (1, 4, 0)) -#define NM_VERSION_1_6 (NM_ENCODE_VERSION (1, 6, 0)) -#define NM_VERSION_1_8 (NM_ENCODE_VERSION (1, 8, 0)) -#define NM_VERSION_1_10 (NM_ENCODE_VERSION (1, 10, 0)) -#define NM_VERSION_1_12 (NM_ENCODE_VERSION (1, 12, 0)) -#define NM_VERSION_1_14 (NM_ENCODE_VERSION (1, 14, 0)) -#define NM_VERSION_1_16 (NM_ENCODE_VERSION (1, 16, 0)) -#define NM_VERSION_1_18 (NM_ENCODE_VERSION (1, 18, 0)) -#define NM_VERSION_1_20 (NM_ENCODE_VERSION (1, 20, 0)) -#define NM_VERSION_1_22 (NM_ENCODE_VERSION (1, 22, 0)) -#define NM_VERSION_1_24 (NM_ENCODE_VERSION (1, 24, 0)) -#define NM_VERSION_1_26 (NM_ENCODE_VERSION (1, 26, 0)) -#define NM_VERSION_1_28 (NM_ENCODE_VERSION (1, 28, 0)) -#define NM_VERSION_1_30 (NM_ENCODE_VERSION (1, 30, 0)) -#define NM_VERSION_1_32 (NM_ENCODE_VERSION (1, 32, 0)) -#define NM_VERSION_1_34 (NM_ENCODE_VERSION (1, 34, 0)) -#define NM_VERSION_1_36 (NM_ENCODE_VERSION (1, 36, 0)) -#define NM_VERSION_1_38 (NM_ENCODE_VERSION (1, 38, 0)) -#define NM_VERSION_1_40 (NM_ENCODE_VERSION (1, 40, 0)) -#define NM_VERSION_1_40_4 (NM_ENCODE_VERSION (1, 40, 4)) +#define NM_VERSION_0_9_8 (NM_ENCODE_VERSION(0, 9, 8)) +#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION(0, 9, 10)) +#define NM_VERSION_1_0 (NM_ENCODE_VERSION(1, 0, 0)) +#define NM_VERSION_1_2 (NM_ENCODE_VERSION(1, 2, 0)) +#define NM_VERSION_1_4 (NM_ENCODE_VERSION(1, 4, 0)) +#define NM_VERSION_1_6 (NM_ENCODE_VERSION(1, 6, 0)) +#define NM_VERSION_1_8 (NM_ENCODE_VERSION(1, 8, 0)) +#define NM_VERSION_1_10 (NM_ENCODE_VERSION(1, 10, 0)) +#define NM_VERSION_1_12 (NM_ENCODE_VERSION(1, 12, 0)) +#define NM_VERSION_1_14 (NM_ENCODE_VERSION(1, 14, 0)) +#define NM_VERSION_1_16 (NM_ENCODE_VERSION(1, 16, 0)) +#define NM_VERSION_1_18 (NM_ENCODE_VERSION(1, 18, 0)) +#define NM_VERSION_1_20 (NM_ENCODE_VERSION(1, 20, 0)) +#define NM_VERSION_1_22 (NM_ENCODE_VERSION(1, 22, 0)) +#define NM_VERSION_1_24 (NM_ENCODE_VERSION(1, 24, 0)) +#define NM_VERSION_1_26 (NM_ENCODE_VERSION(1, 26, 0)) +#define NM_VERSION_1_28 (NM_ENCODE_VERSION(1, 28, 0)) +#define NM_VERSION_1_30 (NM_ENCODE_VERSION(1, 30, 0)) +#define NM_VERSION_1_32 (NM_ENCODE_VERSION(1, 32, 0)) +#define NM_VERSION_1_34 (NM_ENCODE_VERSION(1, 34, 0)) +#define NM_VERSION_1_36 (NM_ENCODE_VERSION(1, 36, 0)) +#define NM_VERSION_1_38 (NM_ENCODE_VERSION(1, 38, 0)) +#define NM_VERSION_1_40 (NM_ENCODE_VERSION(1, 40, 0)) +#define NM_VERSION_1_42 (NM_ENCODE_VERSION(1, 42, 0)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * @@ -81,17 +80,17 @@ * version, you are already using the future API, even if * it is not yet released. Hence, the currently used API * version is the future one. */ -#define NM_API_VERSION \ - (((NM_MINOR_VERSION % 2) == 1) \ - ? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \ +#define NM_API_VERSION \ + (((NM_MINOR_VERSION % 2) == 1) \ + ? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \ : NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION , ((NM_MICRO_VERSION + 1) / 2) * 2)) /* deprecated. */ -#define NM_VERSION_CUR_STABLE NM_API_VERSION +#define NM_VERSION_CUR_STABLE NM_API_VERSION /* deprecated. */ #define NM_VERSION_NEXT_STABLE NM_API_VERSION -#define NM_VERSION NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION) +#define NM_VERSION NM_ENCODE_VERSION(NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION) -#endif /* __NM_VERSION_MACROS_H__ */ +#endif /* __NM_VERSION_MACROS_H__ */ diff --git a/src/libnm-core-public/nm-version.h b/src/libnm-core-public/nm-version.h index d9f9a121..0b2e6103 100644 --- a/src/libnm-core-public/nm-version.h +++ b/src/libnm-core-public/nm-version.h @@ -341,10 +341,18 @@ #define NM_AVAILABLE_IN_1_40 #endif -#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_40_4 -#define NM_AVAILABLE_IN_1_40_4 G_UNAVAILABLE(1, 40.4) +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_42 +#define NM_DEPRECATED_IN_1_42 G_DEPRECATED +#define NM_DEPRECATED_IN_1_42_FOR(f) G_DEPRECATED_FOR(f) #else -#define NM_AVAILABLE_IN_1_40_4 +#define NM_DEPRECATED_IN_1_42 +#define NM_DEPRECATED_IN_1_42_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_42 +#define NM_AVAILABLE_IN_1_42 G_UNAVAILABLE(1, 42) +#else +#define NM_AVAILABLE_IN_1_42 #endif /* diff --git a/src/libnm-core-public/nm-vpn-plugin-info.h b/src/libnm-core-public/nm-vpn-plugin-info.h index 167af52c..c045daa0 100644 --- a/src/libnm-core-public/nm-vpn-plugin-info.h +++ b/src/libnm-core-public/nm-vpn-plugin-info.h @@ -62,7 +62,7 @@ NM_AVAILABLE_IN_1_4 const char *nm_vpn_plugin_info_get_auth_dialog(NMVpnPluginInfo *self); NM_AVAILABLE_IN_1_4 gboolean nm_vpn_plugin_info_supports_hints(NMVpnPluginInfo *self); -NM_AVAILABLE_IN_1_40_4 +NM_AVAILABLE_IN_1_42 gboolean nm_vpn_plugin_info_supports_multiple(NMVpnPluginInfo *self); NM_AVAILABLE_IN_1_4 const char *const *nm_vpn_plugin_info_get_aliases(NMVpnPluginInfo *self); |