aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples/sample-plugin
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-05-29 12:34:20 +0200
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-05-30 11:17:30 +0000
commit78d91cf9a514cb25f6ea9c901bb7d6c398f5cdc7 (patch)
treea0a2ad476027595a29f94944931efff4067971ff /src/examples/sample-plugin
parent288e093624515e31a8bc0f0f870e5a9c7fa2dbaa (diff)
sample-plugin: refactor .api to use explicit types
Use explicit types in .api definition. Change-Id: Ib4c3c4ab6282a6d443e3d19af029dc091b462dac Type: refactor Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/examples/sample-plugin')
-rw-r--r--src/examples/sample-plugin/sample/sample.api17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/examples/sample-plugin/sample/sample.api b/src/examples/sample-plugin/sample/sample.api
index ffee7b15aeb..00472493e72 100644
--- a/src/examples/sample-plugin/sample/sample.api
+++ b/src/examples/sample-plugin/sample/sample.api
@@ -17,17 +17,18 @@
/* Define a simple binary API to control the feature */
option version = "0.1.0";
+import "../../vnet/interface_types.api";
autoreply define sample_macswap_enable_disable {
- /* Client identifier, set from api_main.my_client_index */
- u32 client_index;
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
- /* Arbitrary context, so client can match reply to request */
- u32 context;
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
- /* Enable / disable the feature */
- u8 enable_disable;
+ /* Enable / disable the feature */
+ bool enable_disable;
- /* Interface handle */
- u32 sw_if_index;
+ /* Interface handle */
+ vl_api_interface_index_t sw_if_index;
};