"autoreply" flag: autogenerate standard xxx_reply_t messages
[vpp.git] / src / vnet / lisp-gpe / lisp_gpe.api
index 3956b97..f79d18c 100644 (file)
  * limitations under the License.
  */
 
-/** \brief add or delete lisp gpe tunnel
+/** \brief GPE locator structure
+    @param is_ip4 - whether addr is IPv4 or v6
+    @param weight - locator weight
+    @param addr - IPv4/6 address
+*/
+typeonly manual_print manual_endian define gpe_locator
+{
+  u8 is_ip4;
+  u8 weight;
+  u8 addr[16];
+};
+
+/** \brief add or delete GPE tunnel
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param is_add - add address if non-zero, else delete
     @param lcl_len - local prefix len
     @param vni - virtual network identifier
     @param dp_table - vrf/bridge domain id
-    @param loc_num - number of locators
-    @param lcl_locs - array of local locators
-    @param rmt_locs - array of remote locators
     @param action - negative action when 0 locators configured
+    @param loc_num - number of locators
+    @param locs - array of remote locators
 */
-define lisp_gpe_add_del_fwd_entry
+autoreply manual_print manual_endian define gpe_add_del_fwd_entry
 {
   u32 client_index;
   u32 context;
@@ -44,50 +55,29 @@ define lisp_gpe_add_del_fwd_entry
   u8 lcl_len;
   u32 vni;
   u32 dp_table;
-  u32 loc_num;
-  u8 lcl_locs[loc_num];
-  u8 rmt_locs[loc_num];
   u8 action;
+  u32 loc_num;
+  vl_api_gpe_locator_t locs[loc_num];
 };
 
-/** \brief Reply for gpe_fwd_entry add/del
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define lisp_gpe_add_del_fwd_entry_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief enable or disable lisp-gpe protocol
+/** \brief enable or disable gpe protocol
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param is_en - enable protocol if non-zero, else disable
 */
-define lisp_gpe_enable_disable
+autoreply define gpe_enable_disable
 {
   u32 client_index;
   u32 context;
   u8 is_en;
 };
 
-/** \brief Reply for gpe enable/disable
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define lisp_gpe_enable_disable_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief add or delete gpe_iface
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param is_add - add address if non-zero, else delete
 */
-define lisp_gpe_add_del_iface
+autoreply define gpe_add_del_iface
 {
   u32 client_index;
   u32 context;
@@ -97,42 +87,80 @@ define lisp_gpe_add_del_iface
   u32 vni;
 };
 
-/** \brief Reply for gpe_iface add/del
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define lisp_gpe_add_del_iface_reply
+define gpe_fwd_entries_get
+{
+  u32 client_index;
+  u32 context;
+  u32 vni;
+};
+
+typeonly manual_print manual_endian define gpe_fwd_entry
+{
+  u32 fwd_entry_index;
+  u32 dp_table;
+  u8 eid_type;
+  u8 leid_prefix_len;
+  u8 reid_prefix_len;
+  u8 leid[16];
+  u8 reid[16];
+};
+
+manual_print manual_endian define gpe_fwd_entries_get_reply
 {
   u32 context;
   i32 retval;
+  u32 count;
+  vl_api_gpe_fwd_entry_t entries[count];
+};
+
+define gpe_fwd_entry_path_dump
+{
+  u32 client_index;
+  u32 context;
+  u32 fwd_entry_index;
 };
 
-define lisp_gpe_tunnel_details
+manual_endian manual_print define gpe_fwd_entry_path_details
 {
+  u32 client_index;
   u32 context;
-  u32 tunnels;
-  u8 is_ipv6;
-  u8 source_ip[16];
-  u8 destination_ip[16];
-  u32 encap_fib_id;
-  u32 decap_fib_id;
-  u32 dcap_next;
-  u8 lisp_ver;
-  u8 next_protocol;
-  u8 flags;
-  u8 ver_res;
-  u8 res;
-  u32 iid;
+  vl_api_gpe_locator_t lcl_loc;
+  vl_api_gpe_locator_t rmt_loc;
 };
 
-/** \brief Request for gpe tunnel summary status
+/** \brief Set GPE encapsulation mode
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
- */
-define lisp_gpe_tunnel_dump
+    @param mode - LISP (value 0) or VXLAN (value 1)
+*/
+autoreply define gpe_set_encap_mode
 {
   u32 client_index;
   u32 context;
+  u8 mode;
+};
+
+/** \brief get GPE encapsulation mode
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param mode - LISP (value 0) or VXLAN (value 1)
+*/
+define gpe_get_encap_mode
+{
+  u32 client_index;
+  u32 context;
+};
+
+/** \brief Reply for set_encap_mode
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+    @param encap_mode - GPE encapsulation mode
+*/
+define gpe_get_encap_mode_reply
+{
+  u32 context;
+  i32 retval;
+  u8 encap_mode;
 };
 
 /*
@@ -140,4 +168,4 @@ define lisp_gpe_tunnel_dump
  * eval: (c-set-style "gnu")
  * End:
  */
\ No newline at end of file