diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-02-26 16:32:44 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-02-26 16:32:44 +0100 |
| commit | 447eb1ee6c50e2cac4009e66add3c1d449822589 (patch) | |
| tree | 7bc7db8f5d7e12137e758ea03ebe5c1eb8b07a23 /shared/nm-glib-aux/nm-shared-utils.h | |
| parent | 0b818c504ebbb9454b501c532be8603bf383e37a (diff) | |
| parent | 3cbb3d6ecfef1076fc757632ee8327935250afee (diff) | |
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'shared/nm-glib-aux/nm-shared-utils.h')
| -rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h index 3bd1afae..740e61d0 100644 --- a/shared/nm-glib-aux/nm-shared-utils.h +++ b/shared/nm-glib-aux/nm-shared-utils.h @@ -973,6 +973,14 @@ NM_AUTO_DEFINE_FCN0 (GSource *, _nm_auto_destroy_and_unref_gsource, nm_g_source_ NM_AUTO_DEFINE_FCN0 (GMainContext *, _nm_auto_pop_gmaincontext, g_main_context_pop_thread_default) #define nm_auto_pop_gmaincontext nm_auto (_nm_auto_pop_gmaincontext) +static inline gboolean +nm_source_func_unref_gobject (gpointer user_data) +{ + nm_assert (G_IS_OBJECT (user_data)); + g_object_unref (user_data); + return G_SOURCE_REMOVE; +} + GSource *nm_g_idle_source_new (int priority, GSourceFunc func, gpointer user_data, @@ -1432,4 +1440,17 @@ guint nm_utils_parse_debug_string (const char *string, const GDebugKey *keys, guint nkeys); +/*****************************************************************************/ + +typedef enum { + NMU_IFACE_KERNEL = 0, + NMU_IFACE_OVS, +} NMUtilsIfaceType; + +gboolean nm_utils_ifname_valid_kernel (const char *name, GError **error); + +gboolean nm_utils_ifname_valid (const char* name, + NMUtilsIfaceType type, + GError **error); + #endif /* __NM_SHARED_UTILS_H__ */ |