summaryrefslogtreecommitdiff
path: root/src/NetworkManagerUtils.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-12-06 16:17:46 +0100
committerThomas Haller <thaller@redhat.com>2020-12-06 16:17:48 +0100
commit507c7c2b8abc12ad0729b2c1c7489207f56c6f9a (patch)
treeb7ee6dbcff8c7d507038d1ee82ad99e3bc4e7d31 /src/NetworkManagerUtils.h
parent6f32c5c10736d194322c760b108ce7d5de44d4a0 (diff)
parentae5ea7fa62201dc0809842c091edcc688702d1f5 (diff)
downloadNetworkManager-507c7c2b8abc12ad0729b2c1c7489207f56c6f9a.tar.gz
release: bump version to 1.29.5 (development)1.29.5-dev
Diffstat (limited to 'src/NetworkManagerUtils.h')
-rw-r--r--src/NetworkManagerUtils.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h
index e961c785a1..5373f9cea8 100644
--- a/src/NetworkManagerUtils.h
+++ b/src/NetworkManagerUtils.h
@@ -224,4 +224,31 @@ 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_utils_share_rules_add_all_rules(NMUtilsShareRules *self,
+ const char * ip_iface,
+ in_addr_t addr,
+ guint plen);
+
+void nm_utils_share_rules_apply(NMUtilsShareRules *self, gboolean shared);
+
+/*****************************************************************************/
+
#endif /* __NETWORKMANAGER_UTILS_H__ */