mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 23:00:07 +01:00
shared: move nm_setting_ip_config_get_addr_family() to "shared/nm-libnm-core-utils.h"
This commit is contained in:
parent
05080816f0
commit
c4be9db005
2 changed files with 14 additions and 12 deletions
|
|
@ -547,18 +547,6 @@ gboolean _nm_utils_team_config_set (char **conf,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline int
|
||||
nm_setting_ip_config_get_addr_family (NMSettingIPConfig *s_ip)
|
||||
{
|
||||
if (NM_IS_SETTING_IP4_CONFIG (s_ip))
|
||||
return AF_INET;
|
||||
if (NM_IS_SETTING_IP6_CONFIG (s_ip))
|
||||
return AF_INET6;
|
||||
g_return_val_if_reached (AF_UNSPEC);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
guint32 _nm_utils_parse_tc_handle (const char *str,
|
||||
GError **error);
|
||||
void _nm_utils_string_append_tc_parent (GString *string,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "nm-setting-connection.h"
|
||||
#include "nm-setting-ip-config.h"
|
||||
#include "nm-setting-ip4-config.h"
|
||||
#include "nm-setting-ip6-config.h"
|
||||
#include "nm-setting-sriov.h"
|
||||
#include "nm-setting-team.h"
|
||||
#include "nm-setting-vlan.h"
|
||||
|
|
@ -80,4 +82,16 @@ nm_setting_connection_remove_permission_user (NMSettingConnection *setting,
|
|||
nm_setting_connection_remove_permission_by_value (setting, "user", user, NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline int
|
||||
nm_setting_ip_config_get_addr_family (NMSettingIPConfig *s_ip)
|
||||
{
|
||||
if (NM_IS_SETTING_IP4_CONFIG (s_ip))
|
||||
return AF_INET;
|
||||
if (NM_IS_SETTING_IP6_CONFIG (s_ip))
|
||||
return AF_INET6;
|
||||
g_return_val_if_reached (AF_UNSPEC);
|
||||
}
|
||||
|
||||
#endif /* __NM_LIBNM_SHARED_UTILS_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue