From 960e58efde0f11d0c1b8783c104c29dee34ee088 Mon Sep 17 00:00:00 2001 From: Paul Vinciguerra Date: Tue, 28 Jan 2020 13:00:05 -0500 Subject: [PATCH] vppapigen: update markdown documentation - Add newly added typedefs. - Update string examples. Change-Id: I1e7ee7cbf5901ba97302472521bf1f42a14765ea Type: docs Signed-off-by: Paul Vinciguerra --- src/tools/vppapigen/VPPAPI.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/tools/vppapigen/VPPAPI.md b/src/tools/vppapigen/VPPAPI.md index 9f6ef6523d0..df211d866a0 100644 --- a/src/tools/vppapigen/VPPAPI.md +++ b/src/tools/vppapigen/VPPAPI.md @@ -5,7 +5,7 @@ The VPP API language is used to define a RPC interface between VPP and its control plane. The API messages supports shared memory transport and Unix domain sockets (SOCK_STREAM). -The wire format is essentially that of a packed C struct. +The wire format is essentially that of a network formatted (big-endian) packed C struct. The VPP API compiler is located in *src/tools/vppapigen* and can currently compile to JSON or C (used by the VPP binary itself). @@ -61,10 +61,11 @@ define show_version_reply { u32 context; i32 retval; - string program [limit = 32]; - string version [limit = 32]; - string build_date [limit = 32]; - string build_directory [limit = 256]; + string program [32]; + string version [32]; + string build_date [32]; + /* The final field can be a variable length argument */ + string build_directory []; }; ``` @@ -140,7 +141,7 @@ typedef u8 ip6_address[16]; ``` Where the above defines two new types *vl_api_ip4_address_t* and -*vl_api_ip6_address_t*. These are aliases for the underlaying +*vl_api_ip6_address_t*. These are aliases for the underlying u8 array. In the other form, it is used to specify an abstract data type. @@ -270,7 +271,7 @@ receive sw_interface_event messages whenever interface states changes. ### Scalar Value Types .api type|size|C type|Python type ----------|----|------------------ +---------|----|------|----------- i8 | 1|i8 |int u8 | 1|u8 |int i16 | 2|i16 |int @@ -294,6 +295,8 @@ vl_api_ip6_address_t|16|vl_api_ip6_address_t|`` vl_api_prefix_t|21|vl_api_prefix_t|` or ` vl_api_ip4_prefix_t|5|vl_api_ip4_prefix_t|`` vl_api_ip6_prefix_t|17|vl_api_ip6_prefix_t|`` +vl_api_ip4_address_with_prefix_t|5|vl_api_ip4_address_with_prefix_t|`` +vl_api_ip6_address_with_prefix_t|17|vl_api_ip6_address_with_prefix_t|`` #### vnet/ethernet/ethernet_types.api .api type|size|C type|Python type -- 2.16.6