summary refs log tree commit diff
path: root/src/core/NetworkManagerUtils.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-01-13 22:30:39 +0100
committerMichael Biebl <biebl@debian.org>2022-01-13 22:30:39 +0100
commit88c227d90a6b7b388c5c85d72802a0ca8f05ed5c (patch)
tree71f32df6617802270e8a78574bd8e1637dc532f4 /src/core/NetworkManagerUtils.h
parente74c568b07b50b97873fb4ee1d776dedefbd54d6 (diff)
New upstream version 1.34.0 upstream/1.34.0
Diffstat (limited to 'src/core/NetworkManagerUtils.h')
-rw-r--r--src/core/NetworkManagerUtils.h64
1 files changed, 55 insertions, 9 deletions
diff --git a/src/core/NetworkManagerUtils.h b/src/core/NetworkManagerUtils.h
index 1c86387c..a2ac732e 100644
--- a/src/core/NetworkManagerUtils.h
+++ b/src/core/NetworkManagerUtils.h
@@ -19,15 +19,60 @@ const char *nm_utils_get_ip_config_method(NMConnection *connection, int addr_fam
 
 const char *nm_utils_get_shared_wifi_permission(NMConnection *connection);
 
-void nm_utils_complete_generic(NMPlatform *         platform,
-                               NMConnection *       connection,
-                               const char *         ctype,
-                               NMConnection *const *existing_connections,
-                               const char *         preferred_id,
-                               const char *         fallback_id_prefix,
-                               const char *         ifname_prefix,
-                               const char *         ifname,
-                               gboolean             default_enable_ipv6);
+void _nm_utils_complete_generic_with_params(NMPlatform *         platform,
+                                            NMConnection *       connection,
+                                            const char *         ctype,
+                                            NMConnection *const *existing_connections,
+                                            const char *         preferred_id,
+                                            const char *         fallback_id_prefix,
+                                            const char *         ifname_prefix,
+                                            const char *         ifname,
+                                            ...) G_GNUC_NULL_TERMINATED;
+
+#define nm_utils_complete_generic_with_params(platform,             \
+                                              connection,           \
+                                              ctype,                \
+                                              existing_connections, \
+                                              preferred_id,         \
+                                              fallback_id_prefix,   \
+                                              ifname_prefix,        \
+                                              ifname,               \
+                                              ...)                  \
+    _nm_utils_complete_generic_with_params(platform,                \
+                                           connection,              \
+                                           ctype,                   \
+                                           existing_connections,    \
+                                           preferred_id,            \
+                                           fallback_id_prefix,      \
+                                           ifname_prefix,           \
+                                           ifname,                  \
+                                           ##__VA_ARGS__,           \
+                                           NULL)
+
+static inline void
+nm_utils_complete_generic(NMPlatform *         platform,
+                          NMConnection *       connection,
+                          const char *         ctype,
+                          NMConnection *const *existing_connections,
+                          const char *         preferred_id,
+                          const char *         fallback_id_prefix,
+                          const char *         ifname_prefix,
+                          const char *         ifname,
+                          gboolean             default_enable_ipv6)
+{
+    nm_utils_complete_generic_with_params(platform,
+                                          connection,
+                                          ctype,
+                                          existing_connections,
+                                          preferred_id,
+                                          fallback_id_prefix,
+                                          ifname_prefix,
+                                          ifname,
+                                          NM_CONNECTION_NORMALIZE_PARAM_IP6_CONFIG_METHOD,
+                                          default_enable_ipv6
+                                              ? NM_SETTING_IP6_CONFIG_METHOD_AUTO
+                                              : NM_SETTING_IP6_CONFIG_METHOD_IGNORE);
+}
 
 typedef gboolean(NMUtilsMatchFilterFunc)(NMConnection *connection, gpointer user_data);
 
@@ -232,6 +277,7 @@ NMPlatform *nm_platform_get(void);
 #define NM_PLATFORM_GET (nm_platform_get())
 
 void nm_linux_platform_setup(void);
+void nm_linux_platform_setup_with_tc_cache(void);
 
 /*****************************************************************************/