api: autogenerate api trace print/endian
[vpp.git] / src / examples / sample-plugin / sample / sample.api
index f99cdb3..404a837 100644 (file)
 
 /* Define a simple binary API to control the feature */
 
-define sample_macswap_enable_disable {
-    /* Client identifier, set from api_main.my_client_index */
-    u32 client_index;
+option version = "0.1.0";
+import "vnet/interface_types.api";
 
-    /* Arbitrary context, so client can match reply to request */
-    u32 context;
+autoreply define sample_macswap_enable_disable {
+  /* Client identifier, set from api_main.my_client_index */
+  u32 client_index;
 
-    /* Enable / disable the feature */
-    u8 enable_disable;
+  /* Arbitrary context, so client can match reply to request */
+  u32 context;
 
-    /* Interface handle */
-    u32 sw_if_index;
-};
-
-define sample_macswap_enable_disable_reply {
-    /* From the request */
-    u32 context;
+  /* Enable / disable the feature */
+  bool enable_disable;
 
-    /* Return value, zero means all OK */
-    i32 retval;
+  /* Interface handle */
+  vl_api_interface_index_t sw_if_index;
 };