diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-05-19 16:38:51 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-05-19 16:38:51 +0200 |
| commit | 96642ebde58e1eea692aea6a92d33f45452fa9c0 (patch) | |
| tree | 106ddfa2180b3997e8965787b5cb122982ebab9d /src/nm-ip4-config.h | |
| parent | 8f6881ac06714ef99cc470a03e7ac0ce1af49a16 (diff) | |
| parent | d460892bbfece74fb6d3cd846bf6ef548290be41 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latestt pu
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); \ |