diff options
| author | Michael Biebl <biebl@debian.org> | 2020-05-08 21:40:53 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-05-08 21:40:53 +0200 |
| commit | d460892bbfece74fb6d3cd846bf6ef548290be41 (patch) | |
| tree | 0474e5be0b5e5fac0d2f3a1e554382e8d1aa6397 /src/nm-ip4-config.h | |
| parent | 1e5977b62f896e844b548c3007ace9e1dfa7f9ed (diff) | |
New upstream version 1.24.0 upstream/1.24.0
Diffstat (limited to 'src/nm-ip4-config.h')
| -rw-r--r-- | src/nm-ip4-config.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nm-ip4-config.h b/src/nm-ip4-config.h index 01a42e54..d4694d93 100644 --- a/src/nm-ip4-config.h +++ b/src/nm-ip4-config.h @@ -15,6 +15,14 @@ /*****************************************************************************/ +typedef enum _NMIPConfigFlags { + NM_IP_CONFIG_FLAG_NONE = 0, + + /* if set, then the merge flag NM_IP_CONFIG_MERGE_NO_DEFAULT_ROUTES gets + * ignored during merge. */ + NM_IP_CONFIG_FLAGS_IGNORE_MERGE_NO_DEFAULT_ROUTES = (1ull << 0), +} NMIPConfigFlags; + typedef struct { NMDedupMultiIdxType parent; NMPObjectType obj_type; @@ -196,6 +204,9 @@ NMSettingConnectionLlmnr nm_ip4_config_llmnr_get (const NMIP4Config *self); void nm_ip4_config_llmnr_set (NMIP4Config *self, NMSettingConnectionLlmnr llmnr); +void nm_ip4_config_set_config_flags (NMIP4Config *self, NMIPConfigFlags flags, NMIPConfigFlags mask); +NMIPConfigFlags nm_ip4_config_get_config_flags (const NMIP4Config *self); + const NMDedupMultiHeadEntry *nm_ip4_config_lookup_addresses (const NMIP4Config *self); void nm_ip4_config_reset_addresses (NMIP4Config *self); void nm_ip4_config_add_address (NMIP4Config *self, const NMPlatformIP4Address *address); @@ -513,6 +524,18 @@ 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); } +static inline NMIPConfigFlags +nm_ip_config_get_config_flags (const NMIPConfig *self) +{ + _NM_IP_CONFIG_DISPATCH (self, nm_ip4_config_get_config_flags, nm_ip6_config_get_config_flags); +} + +static inline void +nm_ip_config_set_config_flags (NMIPConfig *self, NMIPConfigFlags flags, NMIPConfigFlags mask) +{ + _NM_IP_CONFIG_DISPATCH_VOID (self, nm_ip4_config_set_config_flags, nm_ip6_config_set_config_flags, flags, mask); +} + #define _NM_IP_CONFIG_DISPATCH_SET_OP(_return, dst, src, v4_func, v6_func, ...) \ G_STMT_START { \ gpointer _dst = (dst); \ |