diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-07-05 20:36:07 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-07-05 20:36:07 +0200 |
| commit | 5d67593e4f1329fc32a36adc5dbc445e7c606bd1 (patch) | |
| tree | 5f470f020ca8f1240ddc29b11912fee174f5d68c /src/core/NetworkManagerUtils.h | |
| parent | 9996e637dc976a77c36f07c6debb737f9a5df0b7 (diff) | |
| parent | 35779c6675728fa6f0fd0a21cefb904408509c23 (diff) | |
Update upstream source from tag 'upstream/1.32.2'
Update to upstream version '1.32.2' with Debian dir db5d9d9657d75d750d835860e38c6af24cc54472
Diffstat (limited to 'src/core/NetworkManagerUtils.h')
| -rw-r--r-- | src/core/NetworkManagerUtils.h | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/src/core/NetworkManagerUtils.h b/src/core/NetworkManagerUtils.h index 2afb5a3e..1c86387c 100644 --- a/src/core/NetworkManagerUtils.h +++ b/src/core/NetworkManagerUtils.h @@ -8,10 +8,10 @@ #define __NETWORKMANAGER_UTILS_H__ #include "nm-core-utils.h" -#include "nm-glib-aux/nm-dedup-multi.h" +#include "libnm-glib-aux/nm-dedup-multi.h" #include "nm-setting-ip-config.h" #include "nm-setting-ip6-config.h" -#include "platform/nm-platform.h" +#include "libnm-platform/nm-platform.h" /*****************************************************************************/ @@ -197,18 +197,20 @@ nm_dhcp_lease_get_options(NMDhcpLease *lease) return (GHashTable *) lease; } -static inline void +static inline NMDhcpLease * nm_dhcp_lease_ref(NMDhcpLease *lease) { if (lease) g_hash_table_ref((GHashTable *) lease); + return lease; } -static inline void +static inline NMDhcpLease * nm_dhcp_lease_unref(NMDhcpLease *lease) { if (lease) g_hash_table_unref((GHashTable *) lease); + return NULL; } static inline const char * @@ -224,30 +226,12 @@ NM_AUTO_DEFINE_FCN(NMDhcpLease *, _nm_auto_unref_dhcplease, nm_dhcp_lease_unref) /*****************************************************************************/ -typedef struct _NMUtilsShareRules NMUtilsShareRules; - -NMUtilsShareRules *nm_utils_share_rules_new(void); - -void nm_utils_share_rules_free(NMUtilsShareRules *self); - -void -nm_utils_share_rules_add_rule_take(NMUtilsShareRules *self, const char *table, char *rule_take); - -static inline void -nm_utils_share_rules_add_rule(NMUtilsShareRules *self, const char *table, const char *rule) -{ - nm_utils_share_rules_add_rule_take(self, table, g_strdup(rule)); -} - -#define nm_utils_share_rules_add_rule_v(self, table, ...) \ - nm_utils_share_rules_add_rule_take((self), (table), g_strdup_printf(__VA_ARGS__)) +void nm_platform_setup(NMPlatform *instance); +NMPlatform *nm_platform_get(void); -void nm_utils_share_rules_add_all_rules(NMUtilsShareRules *self, - const char * ip_iface, - in_addr_t addr, - guint plen); +#define NM_PLATFORM_GET (nm_platform_get()) -void nm_utils_share_rules_apply(NMUtilsShareRules *self, gboolean shared); +void nm_linux_platform_setup(void); /*****************************************************************************/ |