diff options
| author | Michael Biebl <biebl@debian.org> | 2021-10-01 23:06:08 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-10-01 23:06:08 +0200 |
| commit | a3349a04ac4c38885cddefec8515c979d03f9327 (patch) | |
| tree | d3bbee695aa048cb4ec252e7d63515c8376f9006 /src/core/NetworkManagerUtils.h | |
| parent | 2d5b58e374d67f60880c7689e80c7745aeef3f62 (diff) | |
| parent | e74c568b07b50b97873fb4ee1d776dedefbd54d6 (diff) | |
Update upstream source from tag 'upstream/1.32.12'
Update to upstream version '1.32.12' with Debian dir 6fabefa95c7dcf83371a78eb2c47013a81ff8d86
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); /*****************************************************************************/ |