summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-04-14 22:34:01 +0200
committerThomas Haller <thaller@redhat.com>2015-06-17 11:23:51 +0200
commit359fe9f8c1a0d2d04a5adce55ab39a67de2c0a8b (patch)
tree1442e35e9aa69045a0f55296526676c6ba3ec7f4
parentf99723eda5512bdf7f45cb583c21fc1e9ebf3e79 (diff)
downloadNetworkManager-359fe9f8c1a0d2d04a5adce55ab39a67de2c0a8b.tar.gz
platform: add nmp-object.h file
-rw-r--r--src/Makefile.am4
-rw-r--r--src/platform/nmp-object.c23
-rw-r--r--src/platform/nmp-object.h29
-rw-r--r--src/platform/tests/.gitignore2
-rw-r--r--src/platform/tests/Makefile.am7
-rw-r--r--src/platform/tests/test-nmp-object.c43
6 files changed, 108 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 388c6b3b66..3aa8b5f4f9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -227,6 +227,8 @@ nm_sources = \
platform/nm-platform.h \
platform/nm-platform-utils.c \
platform/nm-platform-utils.h \
+ platform/nmp-object.c \
+ platform/nmp-object.h \
platform/wifi/wifi-utils-nl80211.c \
platform/wifi/wifi-utils-nl80211.h \
platform/wifi/wifi-utils-private.h \
@@ -475,6 +477,8 @@ libnm_iface_helper_la_SOURCES = \
platform/nm-platform.h \
platform/nm-platform-utils.c \
platform/nm-platform-utils.h \
+ platform/nmp-object.c \
+ platform/nmp-object.h \
platform/wifi/wifi-utils-nl80211.c \
platform/wifi/wifi-utils-nl80211.h \
platform/wifi/wifi-utils-private.h \
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
new file mode 100644
index 0000000000..8c90deaec0
--- /dev/null
+++ b/src/platform/nmp-object.c
@@ -0,0 +1,23 @@
+/* -*- 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) 2015 Red Hat, Inc.
+ */
+
+#include "nmp-object.h"
+
+
diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h
new file mode 100644
index 0000000000..e1bb9ed7a8
--- /dev/null
+++ b/src/platform/nmp-object.h
@@ -0,0 +1,29 @@
+/* -*- 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) 2015 Red Hat, Inc.
+ */
+
+#ifndef __NMP_OBJECT_H__
+#define __NMP_OBJECT_H__
+
+#include "config.h"
+
+#include "nm-platform.h"
+
+
+#endif /* __NMP_OBJECT_H__ */
diff --git a/src/platform/tests/.gitignore b/src/platform/tests/.gitignore
index cdd8a51f83..536f012fbd 100644
--- a/src/platform/tests/.gitignore
+++ b/src/platform/tests/.gitignore
@@ -8,5 +8,7 @@
/test-general
/test-link-fake
/test-link-linux
+/test-nmp-object
/test-route-fake
/test-route-linux
+
diff --git a/src/platform/tests/Makefile.am b/src/platform/tests/Makefile.am
index 76b40f7ca3..54844ec14a 100644
--- a/src/platform/tests/Makefile.am
+++ b/src/platform/tests/Makefile.am
@@ -38,6 +38,7 @@ noinst_PROGRAMS = \
test-address-fake \
test-address-linux \
test-general \
+ test-nmp-object \
test-route-fake \
test-route-linux \
test-cleanup-fake \
@@ -110,6 +111,11 @@ test_cleanup_linux_CPPFLAGS = \
-DKERNEL_HACKS=1
test_cleanup_linux_LDADD = $(PLATFORM_LDADD)
+test_nmp_object_SOURCES = \
+ test-nmp-object.c
+test_nmp_object_LDADD = \
+ $(top_builddir)/src/libNetworkManager.la
+
test_general_SOURCES = \
test-general.c
test_general_LDADD = \
@@ -125,6 +131,7 @@ TESTS = \
test-general \
test-link-fake \
test-link-linux \
+ test-nmp-object \
test-route-fake \
test-route-linux
diff --git a/src/platform/tests/test-nmp-object.c b/src/platform/tests/test-nmp-object.c
new file mode 100644
index 0000000000..7c01d9850c
--- /dev/null
+++ b/src/platform/tests/test-nmp-object.c
@@ -0,0 +1,43 @@
+/* -*- 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) 2015 Red Hat, Inc.
+ */
+
+#include "nmp-object.h"
+
+#include "nm-logging.h"
+
+#include "nm-test-utils.h"
+
+
+/******************************************************************/
+
+NMTST_DEFINE ();
+
+int
+main (int argc, char **argv)
+{
+ int result;
+
+ nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
+
+ result = g_test_run ();
+
+ return result;
+}
+