diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver index 80f779c190..ca7a4c300e 100644 --- a/src/libnm-client-impl/libnm.ver +++ b/src/libnm-client-impl/libnm.ver @@ -2081,6 +2081,7 @@ libnm_1_56_0 { global: nm_dns_server_validate; nm_setting_gsm_get_device_uid; + nm_setting_hsr_get_interlink; nm_setting_hsr_get_protocol_version; nm_setting_hsr_protocol_version_get_type; nm_setting_connection_get_dnssec; diff --git a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in index f584ee5d2c..c83deea9c1 100644 --- a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in +++ b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in @@ -1524,6 +1524,10 @@ + protocol_version; } +/** + * nm_setting_hsr_get_interlink: + * @setting: the #NMSettingHsr + * + * Returns: the #NMSettingHsr:interlink property of the setting + * + * Since: 1.56 + **/ +const char * +nm_setting_hsr_get_interlink(NMSettingHsr *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_HSR(setting), NULL); + + return NM_SETTING_HSR_GET_PRIVATE(setting)->interlink; +} + /*****************************************************************************/ static gboolean @@ -315,6 +333,21 @@ nm_setting_hsr_class_init(NMSettingHsrClass *klass) NMSettingHsr, _priv.protocol_version); + /** + * NMSettingHsr:interlink: + * + * The optional interlink port name of the HSR interface. + * + * Since: 1.56 + **/ + _nm_setting_property_define_direct_string(properties_override, + obj_properties, + NM_SETTING_HSR_INTERLINK, + PROP_INTERLINK, + NM_SETTING_PARAM_INFERRABLE, + NMSettingHsr, + _priv.interlink); + g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties); _nm_setting_class_commit(setting_class, NM_META_SETTING_TYPE_HSR, NULL, properties_override, 0); diff --git a/src/libnm-core-public/nm-setting-hsr.h b/src/libnm-core-public/nm-setting-hsr.h index 17fccdfd56..3110bd9a09 100644 --- a/src/libnm-core-public/nm-setting-hsr.h +++ b/src/libnm-core-public/nm-setting-hsr.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS #define NM_SETTING_HSR_MULTICAST_SPEC "multicast-spec" #define NM_SETTING_HSR_PRP "prp" #define NM_SETTING_HSR_PROTOCOL_VERSION "protocol-version" +#define NM_SETTING_HSR_INTERLINK "interlink" /** * NMSettingHsrProtocolVersion: @@ -62,6 +63,8 @@ NM_AVAILABLE_IN_1_46 gboolean nm_setting_hsr_get_prp(NMSettingHsr *setting); NM_AVAILABLE_IN_1_56 NMSettingHsrProtocolVersion nm_setting_hsr_get_protocol_version(NMSettingHsr *setting); +NM_AVAILABLE_IN_1_56 +const char *nm_setting_hsr_get_interlink(NMSettingHsr *setting); G_END_DECLS diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index e1658a4701..e2ab8dfafe 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -6251,6 +6251,9 @@ static const NMMetaPropertyInfo *const property_infos_HSR[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_HSR_PROTOCOL_VERSION, .property_type = &_pt_gobject_enum, ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_HSR_INTERLINK, + .property_type = &_pt_gobject_string, + ), NULL }; diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in index 0db894d17f..e4ed5f6ba9 100644 --- a/src/libnmc-setting/settings-docs.h.in +++ b/src/libnmc-setting/settings-docs.h.in @@ -173,6 +173,7 @@ #define DESCRIBE_DOC_NM_SETTING_GSM_SIM_ID N_("The SIM card unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by \"device-id\" which contains a SIM card matching the given identifier.") #define DESCRIBE_DOC_NM_SETTING_GSM_SIM_OPERATOR_ID N_("A MCC/MNC string like \"310260\" or \"21601\" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by \"device-id\" and \"sim-id\" which contains a SIM card provisioned by the given operator.") #define DESCRIBE_DOC_NM_SETTING_GSM_USERNAME N_("The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.") +#define DESCRIBE_DOC_NM_SETTING_HSR_INTERLINK N_("The optional interlink port name of the HSR interface.") #define DESCRIBE_DOC_NM_SETTING_HSR_MULTICAST_SPEC N_("The last byte of supervision address.") #define DESCRIBE_DOC_NM_SETTING_HSR_PORT1 N_("The port1 interface name of the HSR. This property is mandatory.") #define DESCRIBE_DOC_NM_SETTING_HSR_PORT2 N_("The port2 interface name of the HSR. This property is mandatory.") diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in index 01314e622a..9f3f0ef383 100644 --- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in @@ -1246,6 +1246,9 @@ nmcli-description="Configures the protocol version to be used for the HSR/PRP interface. "default" (-1) sets the protocol version to the default version for the protocol. "hsr-2010" (0) sets the protocol version to HSRv0 (IEC 62439-3:2010). "hsr-2012" (1) sets the protocol version to HSRv1 (IEC 62439-3:2012)." format="choice (NMSettingHsrProtocolVersion)" values="default (-1), hsr-2010 (0), hsr-2012 (1)" /> +