aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test/vat
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-10-31 11:59:07 -0400
committerOle Trøan <otroan@employees.org>2016-11-30 15:06:08 +0000
commitaff7077d2031545a15efd12e7f65eac723799491 (patch)
tree3a7b1c8b964d6b9008c6313f2751fd2d9506809f /vpp-api-test/vat
parent847944046c50cabd0d457d446d2c199a71abf049 (diff)
Start spliting vpe.api into logically related pieces
To reduce rebase / manual merge pain, among other things Change-Id: I3186df0479066916a2ca69c48759178b45ef035c Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'vpp-api-test/vat')
-rw-r--r--vpp-api-test/vat/api_format.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index aac7d892b6c..9b02f1e4873 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -17022,18 +17022,40 @@ vat_api_hookup (vat_main_t * vam)
}
#undef vl_api_version
-#define vl_api_version(n,v) static u32 vpe_api_version = v;
+#define vl_api_version(n,v) static u32 memory_api_version = v;
+#include <vlibmemory/vl_memory_api_h.h>
+#undef vl_api_version
+
+#undef vl_api_version
+#define vl_api_version(n,v) static u32 vnet_interface_api_version = v;
+#include <vnet/interface.api.h>
+#undef vl_api_version
+
+#undef vl_api_version
+#define vl_api_version(n,v) static u32 vpp_api_version = v;
#include <vpp-api/vpe.api.h>
#undef vl_api_version
+static u32 *api_versions[] = {
+ &memory_api_version,
+ &vnet_interface_api_version,
+ &vpp_api_version,
+};
+
void
vl_client_add_api_signatures (vl_api_memclnt_create_t * mp)
{
+ int i;
+
+ ASSERT (ARRAY_LEN (mp->api_versions) >= ARRAY_LEN (api_versions));
+
/*
- * Send the main API signature in slot 0. This bit of code must
+ * Send the API signatures. This bit of code must
* match the checks in ../vpe/api/api.c: vl_msg_api_version_check().
*/
- mp->api_versions[0] = clib_host_to_net_u32 (vpe_api_version);
+
+ for (i = 0; i < ARRAY_LEN (api_versions); i++)
+ mp->api_versions[i] = clib_host_to_net_u32 (*api_versions[i]);
}
/*