More janitorial work

Install vpp api header files in /usr/include/vpp-api, instead of
/usr/include/api. Someone will eventually complain if we continue with
the status quo.

Generate /usr/bin/vpp_plugin_configure, to correctly configure
standalone plugin compilation against header files installed from the
dev package.

If a plugin's CFLAGS don't precisely match the installed vpp engine
binary, subtle misbehavior can and will occur. Example: the ip4/ip6
main_t structure size / member offsets depend on DPDK=[0|1]. Screw
that one up, and your brand-new configurable ip feature will
mysteriously fail to appear, even though the plugin loads perfectly.

Change-Id: I20c97fe1042808a79935863209d995c31953b98c
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index 50654aa..b00dccc 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -30,7 +30,7 @@
 #include <vnet/vxlan-gpe/vxlan_gpe.h>
 #include <vnet/lisp-gpe/lisp_gpe.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 #include <vnet/l2/l2_classify.h> 
 #include <vnet/l2/l2_vtr.h>
 #include <vnet/classify/input_acl.h>
@@ -49,19 +49,19 @@
 #include "vat/json_format.h"
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 /* declare message handlers for each api */
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...)
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 uword unformat_sw_if_index (unformat_input_t * input, va_list * args)
@@ -12188,7 +12188,7 @@
 
 #undef vl_api_version
 #define vl_api_version(n,v) static u32 vpe_api_version = v;
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
 #undef vl_api_version
 
 void vl_client_add_api_signatures (vl_api_memclnt_create_t *mp) 
diff --git a/vpp-api/java/Makefile.am b/vpp-api/java/Makefile.am
index cb841ee..c06caf5 100644
--- a/vpp-api/java/Makefile.am
+++ b/vpp-api/java/Makefile.am
@@ -54,7 +54,7 @@
     japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java 		\
     japi/org/openvpp/vppjapi/vppConn.java 				\
     japi/org/openvpp/vppjapi/vppApiCallbacks.java 			\
-    ../../vpp/api/vpe.api.h
+    ../../vpp/vpp-api/vpe.api.h
 	$(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppVersion.java ;				\
 	$(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppVersion ;						\
 	$(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppInterfaceDetails.java ;			\
@@ -79,8 +79,8 @@
 japi/vppapi.c: japi/org_openvpp_vppjapi_vppConn.h
 	pushd .. ; dir=`pwd` ; popd ;								\
 	instdir=`echo $${dir} | sed -e 's:build-root/build:build-root/install:'` ;		\
-	vppapigen --input $${instdir}/../vpp/api/vpe.api --jni  japi/vppapi.c --app vpe ;	\
-	vppapigen --input $${instdir}/../vpp/api/vpe.api --java japi/vppApi.java --app vpe ;	\
+	vppapigen --input $${instdir}/../vpp/vpp-api/vpe.api --jni  japi/vppapi.c --app vpe ;	\
+	vppapigen --input $${instdir}/../vpp/vpp-api/vpe.api --java japi/vppApi.java --app vpe ;	\
 	$(JAVAC) -classpath . -d . japi/vppApi.java ;						\
 	$(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppApi ;				\
 	$(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppApiCallbacks.java ;	\
@@ -112,7 +112,7 @@
 
 BUILT_SOURCES += jvpp/org_openvpp_jvpp_VppJNIConnection.h jvpp/jvpp.c
 
-jvpp/org_openvpp_jvpp_VppJNIConnection.h: $(prefix)/../vpp/api/vpe.api
+jvpp/org_openvpp_jvpp_VppJNIConnection.h: $(prefix)/../vpp/vpp-api/vpe.api
 	@echo "  jVpp API";				\
 	cp -rf @srcdir@/jvpp/* -t jvpp/;			\
 	mkdir -p jvpp/gen/target/org/openvpp/jvpp;				\
diff --git a/vpp-api/java/japi/vppjni.c b/vpp-api/java/japi/vppjni.c
index f1b8eda..2b58b36 100644
--- a/vpp-api/java/japi/vppjni.c
+++ b/vpp-api/java/japi/vppjni.c
@@ -16,7 +16,7 @@
 #include <vnet/vnet.h>
 
 #define vl_api_version(n,v) static u32 vpe_api_version = (v);
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
 #undef vl_api_version
 
 #include <jni.h>
@@ -26,19 +26,19 @@
 #include <japi/org_openvpp_vppjapi_vppConn.h>
 #include <japi/org_openvpp_vppjapi_vppApi.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_typedefs
 
 #define vl_endianfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...)
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 #ifndef VPPJNI_DEBUG
diff --git a/vpp-api/java/jvpp/jvpp.c b/vpp-api/java/jvpp/jvpp.c
index 00c50f9..37aef80 100644
--- a/vpp-api/java/jvpp/jvpp.c
+++ b/vpp-api/java/jvpp/jvpp.c
@@ -16,7 +16,7 @@
 #include <vnet/vnet.h>
 
 #define vl_api_version(n,v) static u32 vpe_api_version = (v);
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
 #undef vl_api_version
 
 #include <jni.h>
@@ -24,19 +24,19 @@
 #include <jvpp/org_openvpp_jvpp_VppJNIConnection.h>
 #include <jvpp/org_openvpp_jvpp_JVppImpl.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_typedefs
 
 #define vl_endianfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...)
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 #ifndef VPPJNI_DEBUG
diff --git a/vpp-api/python/Makefile.am b/vpp-api/python/Makefile.am
index b96ff3d..4d2d221 100644
--- a/vpp-api/python/Makefile.am
+++ b/vpp-api/python/Makefile.am
@@ -33,11 +33,11 @@
 
 BUILT_SOURCES += vpp_papi.py
 
-vpp_papi.py: $(prefix)/../vpp/api/vpe.api pneum/api-gen.py
+vpp_papi.py: $(prefix)/../vpp/vpp-api/vpe.api pneum/api-gen.py
 	@echo "  PYTHON API";                                            	  \
 	$(CC) $(CPPFLAGS) -E -P -C -x c $<			                  \
 	| vppapigen --input - --python defs_$@;                                   \
-	echo "#include <api/vpe_msg_enum.h>"                                      \
+	echo "#include <vpp-api/vpe_msg_enum.h>"                                      \
 	| $(CC) $(CPPFLAGS) -E -P -x c - | grep VL_API                            \
 	| @srcdir@/pneum/api-gen.py -i defs_$@ > @srcdir@/vpp_papi/$@
 
diff --git a/vpp-api/python/pneum/pneum.c b/vpp-api/python/pneum/pneum.c
index 971c79b..ac51849 100644
--- a/vpp-api/python/pneum/pneum.c
+++ b/vpp-api/python/pneum/pneum.c
@@ -31,16 +31,16 @@
 #include <vlibapi/api.h>
 #include <vlibmemory/api.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #include "pneum.h"
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 typedef struct {
@@ -63,7 +63,7 @@
 }
 
 #define vl_api_version(n,v) static u32 vpe_api_version = v;
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
 #undef vl_api_version
 void
 vl_client_add_api_signatures (vl_api_memclnt_create_t *mp)
diff --git a/vpp-api/python/pneum/test_pneum.c b/vpp-api/python/pneum/test_pneum.c
index 18627b3..b313195 100644
--- a/vpp-api/python/pneum/test_pneum.c
+++ b/vpp-api/python/pneum/test_pneum.c
@@ -36,13 +36,13 @@
 #include <vlibmemory/api.h>
 #include <vnet/ip/ip.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 #include <signal.h>
 #include <setjmp.h>
 #include "pneum.h"
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 volatile int sigterm_received = 0;
diff --git a/vpp/Makefile.am b/vpp/Makefile.am
index 4c28fb7..5577c07 100644
--- a/vpp/Makefile.am
+++ b/vpp/Makefile.am
@@ -30,25 +30,25 @@
   stats/stats.c
 
 vpp_SOURCES +=					\
-  api/api.c					\
-  api/custom_dump.c
+  vpp-api/api.c					\
+  vpp-api/custom_dump.c
 
 # comment out to disable stats upload to gmond 
 
 vpp_SOURCES +=					\
-  api/gmon.c	
+  vpp-api/gmon.c	
 
 nobase_include_HEADERS =			\
-  api/vpe_all_api_h.h				\
-  api/vpe_msg_enum.h				\
-  api/vpe.api.h
+  vpp-api/vpe_all_api_h.h			\
+  vpp-api/vpe_msg_enum.h			\
+  vpp-api/vpe.api.h
 
 # install the API definition, so we can produce java bindings, etc.
 
-apidir = $(prefix)/api
-api_DATA = api/vpe.api
+apidir = $(prefix)/vpp-api
+api_DATA = vpp-api/vpe.api
 
-BUILT_SOURCES += api/vpe.api.h app/version.h
+BUILT_SOURCES += vpp-api/vpe.api.h app/version.h
 
 app/version.o:	app/version.h
 
@@ -62,6 +62,32 @@
 	@echo "#define VPP_BUILD_TOPDIR \"$$(git rev-parse --show-toplevel)\"" 	>> $@
 	@echo "#define VPP_BUILD_VER \"$$(../../scripts/version)\"" >> $@
 
+# Generate a plugin configuration script. Misconfiguring a
+# plugin can cause very subtle problems.
+
+bin_SCRIPTS = vpp_plugin_configure
+
+BUILT_SOURCES += vpp_plugin_configure
+
+.PHONY: vpp_plugin_configure
+
+vpp_plugin_configure:
+	@echo "PLUGIN CONFIGURE " $@ 
+	@echo "#!/bin/bash" > $@
+	@echo " " >> $@
+	@echo "set +eu" >> $@
+	@echo " " >> $@
+	@echo "if [ -f ./configure ] ; then" >> $@
+	@echo "    CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ./configure --with-plugin-toolkit" >> $@
+	@echo "else" >> $@
+	@echo "    if [ -f ../configure ] ; then" >> $@
+	@echo "        CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ../configure --with-plugin-toolkit" >> $@
+	@echo "    else" >> $@
+	@echo "        echo Couldnt find ./configure or ../configure " >> $@
+	@echo "        exit 1" >> $@
+	@echo "    fi" >> $@
+	@echo "fi" >> $@
+
 vpp_LDADD = -lvlibapi -lvlibmemory  -lvlib_unix -lvlib
 
 vpp_LDADD += -lvnet
@@ -97,13 +123,13 @@
 
 noinst_PROGRAMS += test_client
 
-test_client_SOURCES = api/test_client.c
+test_client_SOURCES = vpp-api/test_client.c
 test_client_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
 	-lpthread -lm -lrt
 
 noinst_PROGRAMS += test_client test_ha
 
-test_ha_SOURCES = api/test_ha.c
+test_ha_SOURCES = vpp-api/test_ha.c
 test_ha_LDADD = -lvlibmemoryclient -lvlibapi -lsvmdb -lsvm -lvppinfra \
 		-lpthread -lm -lrt
 
@@ -111,6 +137,6 @@
 
 noinst_PROGRAMS += summary_stats_client
 
-summary_stats_client_SOURCES = api/summary_stats_client.c
+summary_stats_client_SOURCES = vpp-api/summary_stats_client.c
 summary_stats_client_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
 	-lpthread -lm -lrt
diff --git a/vpp/api/n1k_harness.c b/vpp/api/n1k_harness.c
deleted file mode 100644
index 4a5df4b..0000000
--- a/vpp/api/n1k_harness.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <dlfcn.h>
-#include <vppinfra/format.h>
-
-void vlib_cli_output (void * vm, char * fmt, ...)
-{ clib_warning ("%s", fmt); }
-
-/* 
- * build system finesse hack 
- * since we can't build everything in one build system, this
- * hack exists to make sure that the invoked program runs against
- * the right libraries.
- */
-
-int main (int argc, char ** argv)
-{
-  void *handle, *main_handle;
-  int (*fp)(int argc, char **argv);
-  int rv;
-  
-  /* n1k_harness <plugin-name> <plugin args> */
-
-  if (argc < 2) {
-      fformat (stderr, "usage: %s <plugin-name> [<plugin-args>...]\n",
-               argv[0]);
-      exit (1);
-  }
-
-  handle = dlopen (argv[1], RTLD_LAZY);
-
-  /* 
-   * Note: this can happen if the plugin has an undefined symbol reference,
-   * so print a warning. Otherwise, the poor slob won't know what happened.
-   * Ask me how I know that...
-   */
-  if (handle == 0)
-    {
-      clib_warning ("%s", dlerror());
-      exit(1);
-    }
-  
-  main_handle = dlsym (handle, "plugin_main");
-  if (main_handle == 0) {
-      clib_warning ("plugin_main(int argc, char **argv) missing...\n");
-      exit(1);
-  }
-
-  fp = main_handle;
-
-  rv = (*fp)(argc-2, argv+2);
-
-  return rv;
-}
diff --git a/vpp/stats/stats.c b/vpp/stats/stats.c
index 566655d..2d366fa 100644
--- a/vpp/stats/stats.c
+++ b/vpp/stats/stats.c
@@ -22,23 +22,23 @@
 
 #include <vnet/ip/ip.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #define f64_endian(a)
 #define f64_print(a,b)
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 #define foreach_stats_msg                               \
diff --git a/vpp/vnet/main.c b/vpp/vnet/main.c
index a1c5427..6795407 100644
--- a/vpp/vnet/main.c
+++ b/vpp/vnet/main.c
@@ -19,7 +19,7 @@
 #include <vnet/plugin/plugin.h>
 #include <vnet/ethernet/ethernet.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #if DPDK
 #include <vnet/devices/dpdk/dpdk.h>
diff --git a/vpp/api/api.c b/vpp/vpp-api/api.c
similarity index 99%
rename from vpp/api/api.c
rename to vpp/vpp-api/api.c
index 302b7d4..2ea92df 100644
--- a/vpp/api/api.c
+++ b/vpp/vpp-api/api.c
@@ -101,23 +101,23 @@
 
 #include <vnet/l2/l2_fib.h>
 #include <vnet/l2/l2_bd.h>
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #define f64_endian(a)
 #define f64_print(a,b)
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 #define REPLY_MACRO(t)                                          \
@@ -7059,7 +7059,7 @@
 
 #undef vl_api_version
 #define vl_api_version(n,v) static u32 vpe_api_version = v;
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
 #undef vl_api_version
 
 int vl_msg_api_version_check (vl_api_memclnt_create_t * mp)
diff --git a/vpp/api/custom_dump.c b/vpp/vpp-api/custom_dump.c
similarity index 99%
rename from vpp/api/custom_dump.c
rename to vpp/vpp-api/custom_dump.c
index 123883f..ac90a56 100644
--- a/vpp/api/custom_dump.c
+++ b/vpp/vpp-api/custom_dump.c
@@ -38,14 +38,14 @@
 #include <vnet/ethernet/ethernet.h>
 #include <vnet/l2/l2_vtr.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
diff --git a/vpp/api/gmon.c b/vpp/vpp-api/gmon.c
similarity index 100%
rename from vpp/api/gmon.c
rename to vpp/vpp-api/gmon.c
diff --git a/vpp/api/summary_stats_client.c b/vpp/vpp-api/summary_stats_client.c
similarity index 97%
rename from vpp/api/summary_stats_client.c
rename to vpp/vpp-api/summary_stats_client.c
index 90b99f6..97e9f9d 100644
--- a/vpp/api/summary_stats_client.c
+++ b/vpp/vpp-api/summary_stats_client.c
@@ -49,7 +49,7 @@
 #include <vlibapi/api.h>
 #include <vlibmemory/api.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #include <vnet/ip/ip.h>
 
@@ -57,17 +57,17 @@
 #define f64_print(a,b)
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...) 
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 vl_shmem_hdr_t *shmem_hdr;
diff --git a/vpp/api/test_client.c b/vpp/vpp-api/test_client.c
similarity index 99%
rename from vpp/api/test_client.c
rename to vpp/vpp-api/test_client.c
index b3bf02e..92cf453 100644
--- a/vpp/api/test_client.c
+++ b/vpp/vpp-api/test_client.c
@@ -47,7 +47,7 @@
 #include <vlibapi/api.h>
 #include <vlibmemory/api.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #include <vnet/ip/ip.h>
 #include <vnet/interface.h>
@@ -56,17 +56,17 @@
 #define f64_print(a,b)
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...) 
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 vl_shmem_hdr_t *shmem_hdr;
@@ -1523,7 +1523,7 @@
 
 #undef vl_api_version
 #define vl_api_version(n,v) static u32 vpe_api_version = v;
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
 #undef vl_api_version
 
 void vl_client_add_api_signatures (vl_api_memclnt_create_t *mp) 
diff --git a/vpp/api/test_ha.c b/vpp/vpp-api/test_ha.c
similarity index 97%
rename from vpp/api/test_ha.c
rename to vpp/vpp-api/test_ha.c
index 0c66394..b3b39fe 100644
--- a/vpp/api/test_ha.c
+++ b/vpp/vpp-api/test_ha.c
@@ -49,7 +49,7 @@
 #include <svm.h>
 #include <svmdb.h>
 
-#include <api/vpe_msg_enum.h>
+#include <vpp-api/vpe_msg_enum.h>
 
 #include <vnet/ip/ip.h>
 
@@ -57,17 +57,17 @@
 #define f64_print(a,b)
 
 #define vl_typedefs             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_typedefs
 
 #define vl_endianfun             /* define message structures */
-#include <api/vpe_all_api_h.h> 
+#include <vpp-api/vpe_all_api_h.h> 
 #undef vl_endianfun
 
 /* instantiate all the print functions we know about */
 #define vl_print(handle, ...) 
 #define vl_printfun
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
 #undef vl_printfun
 
 vl_shmem_hdr_t *shmem_hdr;
diff --git a/vpp/api/vpe.api b/vpp/vpp-api/vpe.api
similarity index 100%
rename from vpp/api/vpe.api
rename to vpp/vpp-api/vpe.api
diff --git a/vpp/api/vpe_all_api_h.h b/vpp/vpp-api/vpe_all_api_h.h
similarity index 96%
rename from vpp/api/vpe_all_api_h.h
rename to vpp/vpp-api/vpe_all_api_h.h
index a5be7b5..ca6776c 100644
--- a/vpp/api/vpe_all_api_h.h
+++ b/vpp/vpp-api/vpe_all_api_h.h
@@ -21,4 +21,4 @@
 #include <vlibmemory/vl_memory_api_h.h>
 
 /* Here are the vpe forwarder specific API definitions */
-#include <api/vpe.api.h>
+#include <vpp-api/vpe.api.h>
diff --git a/vpp/api/vpe_msg_enum.h b/vpp/vpp-api/vpe_msg_enum.h
similarity index 95%
rename from vpp/api/vpe_msg_enum.h
rename to vpp/vpp-api/vpe_msg_enum.h
index 79616a1..fa194ee 100644
--- a/vpp/api/vpe_msg_enum.h
+++ b/vpp/vpp-api/vpe_msg_enum.h
@@ -20,7 +20,7 @@
 #define vl_msg_id(n,h) n,
 typedef enum {
     VL_ILLEGAL_MESSAGE_ID=0,
-#include <api/vpe_all_api_h.h>
+#include <vpp-api/vpe_all_api_h.h>
     VL_MSG_FIRST_AVAILABLE,
 } vl_msg_id_t;
 #undef vl_msg_id
diff --git a/vppapigen/node.c b/vppapigen/node.c
index 30a3b01..449540c 100644
--- a/vppapigen/node.c
+++ b/vppapigen/node.c
@@ -1976,24 +1976,24 @@
     fprintf (fp, 
              "#define vl_api_version(n,v) static u32 %s_api_version %s = v;\n",
 	     vlib_app_name, "__attribute__((unused))");
-    fprintf (fp, "#include <api/%s.api.h>\n", vlib_app_name);
+    fprintf (fp, "#include <vpp-api/%s.api.h>\n", vlib_app_name);
     fprintf (fp, "#undef vl_api_version\n\n");
 
     fprintf (fp, "#include <japi/org_openvpp_vppjapi_vppConn.h>\n");
     fprintf (fp, "#include <japi/org_openvpp_vppjapi_%s.h>\n\n", java_class);
 
-    fprintf (fp, "#include <api/%s_msg_enum.h>\n", vlib_app_name);
+    fprintf (fp, "#include <vpp-api/%s_msg_enum.h>\n", vlib_app_name);
     fprintf (fp, "#define vl_typedefs /* define message structures */\n");
-    fprintf (fp, "#include <api/%s_all_api_h.h> \n", vlib_app_name);
+    fprintf (fp, "#include <vpp-api/%s_all_api_h.h> \n", vlib_app_name);
     fprintf (fp, "#undef vl_typedefs\n\n");
 
     fprintf (fp, "#define vl_endianfun \n");
-    fprintf (fp, "#include <api/%s_all_api_h.h> \n", vlib_app_name);
+    fprintf (fp, "#include <vpp-api/%s_all_api_h.h> \n", vlib_app_name);
     fprintf (fp, "#undef vl_endianfun\n\n");
 
     fprintf (fp, "#define vl_print(handle, ...)\n");
     fprintf (fp, "#define vl_printfun\n");
-    fprintf (fp, "#include <api/%s_all_api_h.h>\n", vlib_app_name);
+    fprintf (fp, "#include <vpp-api/%s_all_api_h.h>\n", vlib_app_name);
     fprintf (fp, "#undef vl_printfun\n\n");
 }