diff options
| author | Michael Biebl <biebl@debian.org> | 2018-06-04 00:08:31 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-06-04 00:08:31 +0200 |
| commit | 0dd9df69fdbd475c48a0c8d5b0a1882550fe7321 (patch) | |
| tree | 249cf25643b1fe408e10679bb61613bc6540e894 /src/nm-ip4-config.h | |
| parent | 2e94a3b93171ab3fb95bf689aab1664d23988809 (diff) | |
| parent | 04bc9e1cd3544445d883ad29ea108c1645c8e7b7 (diff) | |
Update upstream source from tag 'upstream/1.11.4'
Update to upstream version '1.11.4' with Debian dir d0638aa2e32d5bae4e8daa021b9a66b7c4d6647e
Diffstat (limited to 'src/nm-ip4-config.h')
| -rw-r--r-- | src/nm-ip4-config.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/nm-ip4-config.h b/src/nm-ip4-config.h index 1c5222df..78aca14e 100644 --- a/src/nm-ip4-config.h +++ b/src/nm-ip4-config.h @@ -151,7 +151,6 @@ typedef struct _NMIP4ConfigClass NMIP4ConfigClass; GType nm_ip4_config_get_type (void); - NMIP4Config * nm_ip4_config_new (NMDedupMultiIndex *multi_idx, int ifindex); @@ -178,7 +177,6 @@ void nm_ip4_config_merge_setting (NMIP4Config *self, guint32 route_metric); NMSetting *nm_ip4_config_create_setting (const NMIP4Config *self); - void nm_ip4_config_merge (NMIP4Config *dst, const NMIP4Config *src, NMIPConfigMergeFlags merge_flags, @@ -290,14 +288,22 @@ gboolean nm_ip4_config_nmpobj_remove (NMIP4Config *self, void nm_ip4_config_hash (const NMIP4Config *self, GChecksum *sum, gboolean dns_only); gboolean nm_ip4_config_equal (const NMIP4Config *a, const NMIP4Config *b); +gboolean _nm_ip_config_check_and_add_domain (GPtrArray *array, const char *domain); + /*****************************************************************************/ #include "nm-ip6-config.h" static inline gboolean -NM_IS_IP_CONFIG (gconstpointer config) +NM_IS_IP_CONFIG (gconstpointer config, int addr_family) { - return NM_IS_IP4_CONFIG (config) || NM_IS_IP6_CONFIG (config); + if (addr_family == AF_UNSPEC) + return NM_IS_IP4_CONFIG (config) || NM_IS_IP6_CONFIG (config); + if (addr_family == AF_INET) + return NM_IS_IP4_CONFIG (config); + if (addr_family == AF_INET6) + return NM_IS_IP6_CONFIG (config); + g_return_val_if_reached (FALSE); } #if _NM_CC_SUPPORT_GENERIC @@ -334,7 +340,7 @@ NM_IS_IP_CONFIG (gconstpointer config) NMIP6Config * : (NM_IS_IP6_CONFIG (_config))); \ }) #else -#define _NM_IS_IP_CONFIG(typeexpr, config) NM_IS_IP_CONFIG(config) +#define _NM_IS_IP_CONFIG(typeexpr, config) NM_IS_IP_CONFIG(config, AF_UNSPEC) #endif #define NM_IP_CONFIG_CAST(config) \ @@ -501,6 +507,12 @@ nm_ip_config_get_dns_option (const NMIPConfig *self, guint i) _NM_IP_CONFIG_DISPATCH (self, nm_ip4_config_get_dns_option, nm_ip6_config_get_dns_option, i); } +static inline const NMPObject * +nm_ip_config_best_default_route_get (const NMIPConfig *self) +{ + _NM_IP_CONFIG_DISPATCH (self, nm_ip4_config_best_default_route_get, nm_ip6_config_best_default_route_get); +} + #define _NM_IP_CONFIG_DISPATCH_SET_OP(_return, dst, src, v4_func, v6_func, ...) \ G_STMT_START { \ gpointer _dst = (dst); \ |