aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-11-02 09:14:01 -0700
committerDamjan Marion <dmarion@me.com>2018-11-05 12:29:53 +0000
commit86327be9751ad54cb24d16c161cacb001dc20772 (patch)
treee9afa974edc516244805f1d0296909920dc8d49f /src/vat
parent871bca9aa7a850c66228ce7124d459a6e6f21e72 (diff)
Genric API types format/unformat support for VAT and custom dump
Change-Id: I8bc3a991f0ede0605d78b51ba609fbe5889513f2 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/CMakeLists.txt1
-rw-r--r--src/vat/api_format.c11
l---------src/vat/types.c1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/vat/CMakeLists.txt b/src/vat/CMakeLists.txt
index 2ff907026db..e7f26d4491e 100644
--- a/src/vat/CMakeLists.txt
+++ b/src/vat/CMakeLists.txt
@@ -28,6 +28,7 @@ add_vpp_executable(vpp_api_test ENABLE_EXPORTS
main.c
plugin.c
json_format.c
+ types.c
LINK_LIBRARIES
vlibmemoryclient
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index efd116dd7a7..8b8d0c9fdc0 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -18,6 +18,7 @@
*/
#include <vat/vat.h>
+#include <vpp/api/types.h>
#include <vppinfra/socket.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
@@ -53,6 +54,8 @@
#include <vnet/bonding/node.h>
#include <vnet/qos/qos_types.h>
#include "vat/json_format.h"
+#include <vnet/ip/ip_types_api.h>
+#include <vnet/ethernet/ethernet_types_api.h>
#include <inttypes.h>
#include <sys/stat.h>
@@ -79,6 +82,14 @@
#if VPP_API_TEST_BUILTIN == 0
#include <netdb.h>
+/* *INDENT-OFF* */
+const mac_address_t ZERO_MAC_ADDRESS = {
+ .bytes = {
+ 0, 0, 0, 0, 0, 0,
+ },
+};
+/* *INDENT-ON* */
+
u32
vl (void *p)
{
diff --git a/src/vat/types.c b/src/vat/types.c
new file mode 120000
index 00000000000..8bcab8874ef
--- /dev/null
+++ b/src/vat/types.c
@@ -0,0 +1 @@
+../vpp/api/types.c \ No newline at end of file