More janitorial work 79/1779/2
authorDave Barach <dave@barachs.net>
Mon, 27 Jun 2016 13:25:13 +0000 (09:25 -0400)
committerKeith Burns (alagalah) <alagalah@gmail.com>
Mon, 27 Jun 2016 13:54:32 +0000 (06:54 -0700)
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>
21 files changed:
vpp-api-test/vat/api_format.c
vpp-api/java/Makefile.am
vpp-api/java/japi/vppjni.c
vpp-api/java/jvpp/jvpp.c
vpp-api/python/Makefile.am
vpp-api/python/pneum/pneum.c
vpp-api/python/pneum/test_pneum.c
vpp/Makefile.am
vpp/api/n1k_harness.c [deleted file]
vpp/stats/stats.c
vpp/vnet/main.c
vpp/vpp-api/api.c [moved from vpp/api/api.c with 99% similarity]
vpp/vpp-api/custom_dump.c [moved from vpp/api/custom_dump.c with 99% similarity]
vpp/vpp-api/gmon.c [moved from vpp/api/gmon.c with 100% similarity]
vpp/vpp-api/summary_stats_client.c [moved from vpp/api/summary_stats_client.c with 98% similarity]
vpp/vpp-api/test_client.c [moved from vpp/api/test_client.c with 99% similarity]
vpp/vpp-api/test_ha.c [moved from vpp/api/test_ha.c with 97% similarity]
vpp/vpp-api/vpe.api [moved from vpp/api/vpe.api with 100% similarity]
vpp/vpp-api/vpe_all_api_h.h [moved from vpp/api/vpe_all_api_h.h with 96% similarity]
vpp/vpp-api/vpe_msg_enum.h [moved from vpp/api/vpe_msg_enum.h with 96% similarity]
vppapigen/node.c

index 50654aa..b00dccc 100644 (file)
@@ -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>
 #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 @@ void vat_api_hookup (vat_main_t *vam)
 
 #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) 
index cb841ee..c06caf5 100644 (file)
@@ -54,7 +54,7 @@ japi/org_openvpp_vppjapi_vppConn.h:                                   \
     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/org_openvpp_vppjapi_vppConn.h:                                   \
 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 @@ JAVAROOT = .
 
 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;                              \
index f1b8eda..2b58b36 100644 (file)
@@ -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>
 #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
index 00c50f9..37aef80 100644 (file)
@@ -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>
 #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
index b96ff3d..4d2d221 100644 (file)
@@ -33,11 +33,11 @@ libpneum_la_CPPFLAGS =
 
 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/$@
 
index 971c79b..ac51849 100644 (file)
 #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 @@ void vlib_cli_output (struct vlib_main_t * vm, char * fmt, ...)
 }
 
 #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)
index 18627b3..b313195 100644 (file)
 #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;
index 4c28fb7..5577c07 100644 (file)
@@ -30,25 +30,25 @@ vpp_SOURCES =                                       \
   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 @@ app/version.h:
        @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 @@ SUFFIXES = .api.h .api
 
 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 @@ test_ha_LDADD = -lvlibmemoryclient -lvlibapi -lsvmdb -lsvm -lvppinfra \
 
 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 (file)
index 4a5df4b..0000000
+++ /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;
-}
index 566655d..2d366fa 100644 (file)
@@ -22,23 +22,23 @@ stats_main_t stats_main;
 
 #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                               \
index a1c5427..6795407 100644 (file)
@@ -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>
similarity index 99%
rename from vpp/api/api.c
rename to vpp/vpp-api/api.c
index 302b7d4..2ea92df 100644 (file)
 
 #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 @@ void * get_unformat_vnet_sw_interface (void)
 
 #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)
similarity index 99%
rename from vpp/api/custom_dump.c
rename to vpp/vpp-api/custom_dump.c
index 123883f..ac90a56 100644 (file)
 #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__)
similarity index 100%
rename from vpp/api/gmon.c
rename to vpp/vpp-api/gmon.c
similarity index 98%
rename from vpp/api/summary_stats_client.c
rename to vpp/vpp-api/summary_stats_client.c
index 90b99f6..97e9f9d 100644 (file)
@@ -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>
 
 #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;
similarity index 99%
rename from vpp/api/test_client.c
rename to vpp/vpp-api/test_client.c
index b3bf02e..92cf453 100644 (file)
@@ -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>
 #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 @@ int main (int argc, char ** argv)
 
 #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) 
similarity index 97%
rename from vpp/api/test_ha.c
rename to vpp/vpp-api/test_ha.c
index 0c66394..b3b39fe 100644 (file)
@@ -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>
 
 #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;
similarity index 100%
rename from vpp/api/vpe.api
rename to vpp/vpp-api/vpe.api
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 (file)
@@ -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>
similarity index 96%
rename from vpp/api/vpe_msg_enum.h
rename to vpp/vpp-api/vpe_msg_enum.h
index 79616a1..fa194ee 100644 (file)
@@ -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
index 30a3b01..449540c 100644 (file)
@@ -1976,24 +1976,24 @@ void generate_jni_top_boilerplate(FILE *fp)
     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");
 }