mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 08:30:15 +01:00
libnm-core: add nm_connection_get_setting_ip_config() helper
This commit is contained in:
parent
be107c75c9
commit
02964c22a6
2 changed files with 17 additions and 0 deletions
|
|
@ -230,6 +230,18 @@ nm_connection_get_setting (NMConnection *connection, GType setting_type)
|
|||
return _connection_get_setting_check (connection, setting_type);
|
||||
}
|
||||
|
||||
NMSettingIPConfig *
|
||||
nm_connection_get_setting_ip_config (NMConnection *connection,
|
||||
int addr_family)
|
||||
{
|
||||
nm_assert_addr_family (addr_family);
|
||||
|
||||
return NM_SETTING_IP_CONFIG (_connection_get_setting (connection,
|
||||
(addr_family == AF_INET)
|
||||
? NM_TYPE_SETTING_IP4_CONFIG
|
||||
: NM_TYPE_SETTING_IP6_CONFIG));
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_connection_get_setting_by_name:
|
||||
* @connection: a #NMConnection
|
||||
|
|
|
|||
|
|
@ -449,6 +449,11 @@ gboolean _nm_utils_generate_mac_address_mask_parse (const char *value,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMSettingIPConfig *nm_connection_get_setting_ip_config (NMConnection *connection,
|
||||
int addr_family);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef enum {
|
||||
NM_BOND_OPTION_TYPE_INT,
|
||||
NM_BOND_OPTION_TYPE_STRING,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue