[RFC PATCH v3 1/3] platform-linux: add support function for genl



Resolves Generic Netlink family ID by name.
---
 src/platform/nm-linux-platform.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 9bd662a18..b6537d5cb 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -475,6 +475,18 @@ _support_rta_pref_get (void)
        return _support_rta_pref >= 0;
 }
 
+/*****************************************************************************
+ * Support Generic Netlink family
+ *****************************************************************************/
+
+static int
+_support_genl_family (struct nl_sock *genlh, const char *name)
+{
+       int family_id = genl_ctrl_resolve (genlh, name);
+       _LOG2D ("kernel-support: genetlink: %s: %s", name, family_id ? "detected" : "not detected");
+       return family_id;
+}
+
 /******************************************************************
  * Various utilities
  ******************************************************************/
-- 
2.17.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]