diff mbox series

[1/4] helper: add odph_api.h for existing exported headers

Message ID 20170123194608.4552-2-mike.holmes@linaro.org
State New
Headers show
Series introduce odph_api.h and clean up public helper API | expand

Commit Message

Mike Holmes Jan. 23, 2017, 7:46 p.m. UTC
Rather than have all applications include a variable number of helper
api files, consolidate them into one include odph_api.h

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

---
 helper/Makefile.am                   |  1 +
 helper/include/odp/helper/odph_api.h | 35 +++++++++++++++++++++++++++++++++++
 helper/test/chksum.c                 |  4 +---
 helper/test/odpthreads.c             |  2 +-
 helper/test/parse.c                  |  3 +--
 5 files changed, 39 insertions(+), 6 deletions(-)
 create mode 100644 helper/include/odp/helper/odph_api.h

-- 
2.9.3
diff mbox series

Patch

diff --git a/helper/Makefile.am b/helper/Makefile.am
index 9b2f18a..76cad1b 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -19,6 +19,7 @@  helperinclude_HEADERS = \
 		  $(srcdir)/include/odp/helper/icmp.h\
 		  $(srcdir)/include/odp/helper/ip.h\
 		  $(srcdir)/include/odp/helper/ipsec.h\
+		  $(srcdir)/include/odp/helper/odph_api.h\
 		  $(srcdir)/include/odp/helper/strong_types.h\
 		  $(srcdir)/include/odp/helper/tcp.h\
 		  $(srcdir)/include/odp/helper/table.h\
diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h
new file mode 100644
index 0000000..ae6e77b
--- /dev/null
+++ b/helper/include/odp/helper/odph_api.h
@@ -0,0 +1,35 @@ 
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * The OpenDataPlane helper API
+ *
+ */
+
+#ifndef ODP_HELPER_H_
+#define ODP_HELPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/helper/chksum.h>
+#include <odp/helper/eth.h>
+#include <odp/helper/icmp.h>
+#include <odp/helper/ip.h>
+#include <odp/helper/ipsec.h>
+#include <odp/helper/strong_types.h>
+#include <odp/helper/tcp.h>
+#include <odp/helper/table.h>
+#include <odp/helper/threads.h>
+#include <odp/helper/udp.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/helper/test/chksum.c b/helper/test/chksum.c
index 7c572ae..1beae47 100644
--- a/helper/test/chksum.c
+++ b/helper/test/chksum.c
@@ -6,9 +6,7 @@ 
 
 #include "odph_debug.h"
 #include <odp_api.h>
-#include <odp/helper/eth.h>
-#include <odp/helper/ip.h>
-#include <odp/helper/udp.h>
+#include <odp/helper/odph_api.h>
 
 struct udata_struct {
 	uint64_t u64;
diff --git a/helper/test/odpthreads.c b/helper/test/odpthreads.c
index 4bb3c3b..219e1b6 100644
--- a/helper/test/odpthreads.c
+++ b/helper/test/odpthreads.c
@@ -15,7 +15,7 @@ 
 
 #include <odph_debug.h>
 #include <odp_api.h>
-#include <odp/helper/threads.h>
+#include <odp/helper/odph_api.h>
 
 #define NUMBER_WORKERS 16
 
diff --git a/helper/test/parse.c b/helper/test/parse.c
index 26dfc68..0429f2c 100644
--- a/helper/test/parse.c
+++ b/helper/test/parse.c
@@ -7,8 +7,7 @@ 
 #include <odph_debug.h>
 
 #include <odp_api.h>
-#include <odp/helper/eth.h>
-#include <odp/helper/ip.h>
+#include <odp/helper/odph_api.h>
 
 #include <stdio.h>
 #include <string.h>