stn: use explicit types in api
[vpp.git] / src / plugins / stn / stn.api
index a3753a9..613d180 100644 (file)
  *
  */
 
-option version = "1.0.0";
+option version = "2.0.0";
+import "vnet/interface_types.api";
+import "vnet/ip/ip_types.api";
 
 /** \brief Add/del STN rules
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
-    @param is_ip4 - 1 if address type is IPv4
     @param ip_address - STN rule IP address
     @param sw_if_index - Interface index
     @param is_add - 1 if add, 0 if delete
@@ -32,10 +33,9 @@ option version = "1.0.0";
 autoreply manual_print define stn_add_del_rule {
   u32 client_index;
   u32 context;
-  u8 is_ip4;
-  u8 ip_address[16];
-  u32 sw_if_index;
-  u8 is_add;
+  vl_api_address_t ip_address;
+  vl_api_interface_index_t sw_if_index;
+  bool is_add;
 };
 
 /** \brief Dump STN rules
@@ -55,8 +55,7 @@ define stn_rules_dump {
 */
 define stn_rules_details {
   u32 context;
-  u8 is_ip4;
-  u8 ip_address[16];
-  u32 sw_if_index;
+  vl_api_address_t ip_address;
+  vl_api_interface_index_t sw_if_index;
 };