summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-01-14 14:43:34 +0100
committerThomas Haller <thaller@redhat.com>2018-01-15 20:29:26 +0100
commit9562d886336ff07f07ce4a9445da08e677d18b5c (patch)
tree73df7dc7b7397e466f3335da836001277465374c
parentd2292cc649ac81a88e0b324d36c47caab30d9ba9 (diff)
downloadNetworkManager-9562d886336ff07f07ce4a9445da08e677d18b5c.tar.gz
platform: add nm-netlink.h for netlink related helper functions
Especially useful, because we don't link against libnl-genl-3.so but re-implement generic netlink support. Such code should go there so it can be used by various components.
-rw-r--r--Makefile.am3
-rw-r--r--src/meson.build1
-rw-r--r--src/platform/nm-netlink.c25
-rw-r--r--src/platform/nm-netlink.h24
4 files changed, 53 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6b3bc3ad9e..5fd761f8e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1374,6 +1374,9 @@ src_libNetworkManagerBase_la_SOURCES = \
src/NetworkManagerUtils.c \
src/NetworkManagerUtils.h \
\
+ src/platform/nm-netlink.c \
+ src/platform/nm-netlink.h \
+ \
src/platform/nmp-netns.c \
src/platform/nmp-netns.h \
src/platform/nmp-object.c \
diff --git a/src/meson.build b/src/meson.build
index db17bf1555..981a4794e4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -54,6 +54,7 @@ sources = files(
'dhcp/nm-dhcp-utils.c',
'ndisc/nm-lndp-ndisc.c',
'ndisc/nm-ndisc.c',
+ 'platform/nm-netlink.c',
'platform/wifi/wifi-utils-nl80211.c',
'platform/wifi/wifi-utils.c',
'platform/nm-linux-platform.c',
diff --git a/src/platform/nm-netlink.c b/src/platform/nm-netlink.c
new file mode 100644
index 0000000000..34128e54c7
--- /dev/null
+++ b/src/platform/nm-netlink.c
@@ -0,0 +1,25 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* nm-platform.c - Handle runtime kernel networking configuration
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2018 Red Hat, Inc.
+ */
+
+#include "nm-default.h"
+
+#include "nm-netlink.h"
+
+/*****************************************************************************/
diff --git a/src/platform/nm-netlink.h b/src/platform/nm-netlink.h
new file mode 100644
index 0000000000..e001c5fdaa
--- /dev/null
+++ b/src/platform/nm-netlink.h
@@ -0,0 +1,24 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* nm-platform.c - Handle runtime kernel networking configuration
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2018 Red Hat, Inc.
+ */
+
+#ifndef __NM_NETLINK_H__
+#define __NM_NETLINK_H__
+
+#endif /* __NM_NETLINK_H__ */