API support for src/dst based routing policy in LISP
[vpp.git] / vpp / vpp-api / vpe.api
index 2ec4d77..3e4b933 100644 (file)
@@ -1073,6 +1073,28 @@ define control_ping_reply {
     u32 vpe_pid;
 };
 
+/** \brief Control ping from client to api server request, no print json output
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+*/
+define noprint_control_ping {
+    u32 client_index;
+    u32 context;
+};
+
+/** \brief Control ping from the client to the server response
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param retval - return code for the request
+    @param vpe_pid - the pid of the vpe, returned by the server
+*/
+define noprint_control_ping_reply {
+    u32 context;
+    i32 retval;
+    u32 client_index;
+    u32 vpe_pid;
+};
+
 /** \brief Process a vpe parser cli string request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -1859,9 +1881,10 @@ define gre_add_del_tunnel {
     u32 client_index;
     u32 context;
     u8 is_add;
-    u32 src_address;
-    u32 dst_address;
-    u32 outer_table_id;
+    u8 is_ipv6;
+    u8 src_address[16];
+    u8 dst_address[16];
+    u32 outer_fib_id;
 };
 
 define gre_add_del_tunnel_reply {
@@ -1879,9 +1902,10 @@ define gre_tunnel_dump {
 define gre_tunnel_details {
     u32 context;
     u32 sw_if_index;
-    u32 src_address;
-    u32 dst_address;
-    u32 outer_table_id;
+    u8 is_ipv6;
+    u8 src_address[16];
+    u8 dst_address[16];
+    u32 outer_fib_id;
 };
   
 /** \brief L2 interface vlan tag rewrite configure request
@@ -2155,12 +2179,16 @@ define vxlan_gpe_tunnel_details {
     @param context - sender context, to match reply w/ request
     @param is_add - add address if non-zero, else delete
     @param locator_set_name - locator name
+    @param locator_num - number of locators
+    @param locators - Lisp locator data
 */
 define lisp_add_del_locator_set {
     u32 client_index;
     u32 context;
     u8  is_add;
     u8  locator_set_name[64];
+    u32 locator_num;
+    u8  locators[locator_num];
 };
 
 /** \brief Reply for locator_set add/del
@@ -2377,6 +2405,7 @@ define lisp_pitr_set_locator_set_reply {
     @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 is_src_dst - flag indicating src/dst based routing policy
     @param del_all - if set, delete all remote mappings
     @param vni - virtual network instance
     @param action - negative map-reply action
@@ -2384,8 +2413,8 @@ define lisp_pitr_set_locator_set_reply {
       0 : ipv4
       1 : ipv6
       2 : mac
-    @param deid - destination EID
-    @param seid - source EID
+    @param deid - dst EID
+    @param seid - src EID, valid only if is_src_dst is enabled
     @param rloc_num - number of remote locators
     @param rlocs - remote locator data
 */
@@ -2393,16 +2422,17 @@ define lisp_add_del_remote_mapping {
     u32 client_index;
     u32 context;
     u8  is_add;
+    u8 is_src_dst;
     u8 del_all;
     u32 vni;
     u8 action;
     u8 eid_type;
-    u8 deid[16];
+    u8 eid[16];
+    u8 eid_len;
     u8 seid[16];
-    u8 deid_len;
     u8 seid_len;
     u32 rloc_num;
-    u8 rlocs[0];
+    u8 rlocs[rloc_num];
 };
 
 /** \brief Reply for lisp_add_del_remote_mapping
@@ -2470,11 +2500,11 @@ define lisp_add_del_map_request_itr_rlocs_reply {
     i32 retval;
 };
 
-/** \brief map/unmap vni to vrf
+/** \brief map/unmap vni/bd_index to vrf
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param is_add - add or delete mapping
-    @param vni - virtual network id
+    @param dp_table - virtual network id/bridge domain index
     @param vrf - vrf
 */
 define lisp_eid_table_add_del_map {
@@ -2482,7 +2512,8 @@ define lisp_eid_table_add_del_map {
     u32 context;
     u8 is_add;
     u32 vni;
-    u32 vrf;
+    u32 dp_table;
+    u8 is_l2;
 };
 
 /** \brief Reply for lisp_eid_table_add_del_map
@@ -2494,49 +2525,97 @@ define lisp_eid_table_add_del_map_reply {
     i32 retval;
 };
 
+/** \brief Request for map lisp locator status
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param locator_set_index - index of locator_set
+    @param filter - filter type;
+      Support value:
+        0: all locator
+        1: local locator
+        2: remote locator
+ */
+define lisp_locator_dump {
+    u32 client_index;
+    u32 context;
+    u32 locator_set_index;
+    u8  filter;
+};
+
 /** \brief LISP locator_set status
+    @param local - if is set, then locator is local
     @param locator_set_name - name of the locator_set
     @param sw_if_index - sw_if_index of the locator
     @param priority - locator priority
     @param weight - locator weight
- */
-define lisp_locator_set_details {
 */
+define lisp_locator_details {
     u32 context;
     u8  local;
-    u8  locator_set_name[64];
     u32 sw_if_index;
     u8  is_ipv6;
     u8  ip_address[16];
-    u8  prefix_len;
     u8  priority;
     u8  weight;
 };
 
+/** \brief LISP locator_set status
+    @param locator_set_name - name of the locator_set
+    @param local - if is set, then locator_set is local
+    @param locator_count - number of locator this stats block includes
+    @param locator - locator data
+ */
+define lisp_locator_set_details {
+    u32 context;
+    u8  local;
+    u32 locator_set_index;
+    u8  locator_set_name[64];
+};
+
 /** \brief Request for locator_set summary status
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
+    @param filter - filter type;
+      Support value:
+        0: all locator_set
+        1: local locator_set
+        2: remote locator_set
  */
 define lisp_locator_set_dump {
     u32 client_index;
     u32 context;
+    u8  filter;
 };
 
-/** \brief LISP local eid table status
-    @param locator_set_name - name of the locator_set
-    @param eid_type - ip4, ip6 or l2 mac address
-    @param eid - array of address bytes
-    @param eid_prefix_len - prefix len
- */
-define lisp_local_eid_table_details {
+/** \brief Dump lisp eid-table
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param locator_set_index - index of locator_set
+    @param is_local - local if non-zero, else remote
+    @param eid_type:
+      0 : ipv4
+      1 : ipv6
+      2 : mac
+    @param eid - EID can be ip4, ip6 or mac
+    @param prefix_len - prefix len
+    @param vni - virtual network instance
+    @param ttl - time to live
+    @param authoritative - authoritative
+*/
+
+define lisp_eid_table_details {
     u32 context;
-    u8  locator_set_name[64];
+    u32 locator_set_index;
+    u8  is_local;
     u8  eid_type;
     u32 vni;
     u8  eid[16];
     u8  eid_prefix_len;
+    u32 ttl;
+    u8  authoritative;
 };
 
-/** \brief Request for local eid table summary status
+/** \brief Request for eid table summary status
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param eid_set - if non-zero request info about specific mapping
@@ -2549,8 +2628,13 @@ define lisp_local_eid_table_details {
         1: EID is IPv6
         2: EID is ethernet address
     @param eid - endpoint identifier
+    @param filter - filter type;
+      Support values:
+        0: all eid
+        1: local eid
+        2: remote eid
  */
-define lisp_local_eid_table_dump {
+define lisp_eid_table_dump {
     u32 client_index;
     u32 context;
     u8  eid_set;
@@ -2558,6 +2642,7 @@ define lisp_local_eid_table_dump {
     u32 vni;
     u8  eid_type;
     u8  eid[16];
+    u8  filter;
 };
 
 /** \brief Shows relationship between vni and vrf
@@ -2625,23 +2710,25 @@ define lisp_map_resolver_dump {
     u32 context;
 };
 
-/** \brief Status of lisp-gpe protocol, enable or disable
+/** \brief Request for lisp-gpe protocol status
+    @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_enable_disable_status_details {
+define show_lisp_status{
+    u32 client_index;
     u32 context;
-    u8 feature_status;
-    u8 gpe_status;
 };
 
-/** \brief Request for lisp-gpe protocol status
-    @param client_index - opaque cookie to identify the sender
+/** \brief Status of lisp, enable or disable
     @param context - sender context, to match reply w/ request
+    @param feature_status - lisp enable if non-zero, else disable
+    @param gpe_status - lisp enable if non-zero, else disable
 */
-define lisp_enable_disable_status_dump {
-    u32 client_index;
+define show_lisp_status_reply{
     u32 context;
+    i32 retval;
+    u8 feature_status;
+    u8 gpe_status;
 };
 
 /** \brief Get LISP map request itr rlocs status
@@ -3642,6 +3729,7 @@ define af_packet_delete_reply {
     @param rate_type - rate type
     @param round_type - rounding type
     @param type - policer algorithm
+    @param color_aware - 0=color-blind, 1=color-aware
     @param conform_action_type - conform action type
     @param conform_dscp - DSCP for conform mar-and-transmit action
     @param exceed_action_type - exceed action type
@@ -3662,6 +3750,7 @@ define policer_add_del {
     u8 rate_type;
     u8 round_type;
     u8 type;
+    u8 color_aware;
     u8 conform_action_type;
     u8 conform_dscp;
     u8 exceed_action_type;
@@ -3673,10 +3762,12 @@ define policer_add_del {
 /** \brief Add/del policer response
     @param context - sender context, to match reply w/ request
     @param retval - return value for request
+    @param policer_index - for add, returned index of the new policer
 */
 define policer_add_del_reply {
     u32 context;
     i32 retval;
+    u32 policer_index;
 };
 
 /** \brief Get list of policers
@@ -3749,6 +3840,58 @@ define policer_details {
     u64 last_update_time;
 };
 
+/** \brief Set/unset policer classify interface
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param sw_if_index - interface to set/unset policer classify
+    @param ip4_table_index - ip4 classify table index (~0 for skip)
+    @param ip6_table_index - ip6 classify table index (~0 for skip)
+    @param l2_table_index  -  l2 classify table index (~0 for skip)
+    @param is_add - Set if non-zero, else unset
+    Note: User is recommeneded to use just one valid table_index per call.
+          (ip4_table_index, ip6_table_index, or l2_table_index)
+*/
+define policer_classify_set_interface {
+    u32 client_index;
+    u32 context;
+    u32 sw_if_index;
+    u32 ip4_table_index;
+    u32 ip6_table_index;
+    u32 l2_table_index;
+    u8  is_add;
+};
+
+/** \brief Set/unset policer classify interface response
+    @param context - sender context, to match reply w/ request
+    @param retval - return value for request
+*/
+define policer_classify_set_interface_reply {
+    u32 context;
+    i32 retval;
+};
+
+/** \brief Get list of policer classify interfaces and tables
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param type - classify table type
+*/
+define policer_classify_dump {
+    u32 client_index;
+    u32 context;
+    u8 type;
+};
+
+/** \brief Policer iclassify operational state response.
+    @param context - sender context, to match reply w/ request
+    @param sw_if_index - software interface index
+    @param table_index - classify table index
+*/
+define policer_classify_details {
+    u32 context;
+    u32 sw_if_index;
+    u32 table_index;
+};
+
 /** \brief Create netmap
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -4205,3 +4348,60 @@ define pg_enable_disable_reply {
     u32 context;
     i32 retval;
 };
+
+/** \brief Configure IP source and L4 port-range check
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param is_ip6 - 1 if source address type is IPv6
+    @param is_add - 1 if add, 0 if delete
+    @param mask_length - mask length for address entry
+    @param address - array of address bytes
+    @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
+    @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
+    @param vrf_id - fib table/vrf id to associate the source and port-range check with
+    @note To specify a single port set low_port and high_port entry the same
+*/
+define ip_source_and_port_range_check_add_del {
+    u32 client_index;
+    u32 context;
+    u8  is_ipv6;
+    u8  is_add;
+    u8  mask_length;
+    u8  address[16];
+    u8  number_of_ranges;
+    u16 low_ports[32];
+    u16 high_ports[32];
+    u32 vrf_id;
+};
+
+/** \brief Configure IP source and L4 port-range check reply
+    @param context - returned sender context, to match reply w/ request
+    @param retval - return code
+*/
+define ip_source_and_port_range_check_add_del_reply {
+    u32 context;
+    i32 retval;
+};
+
+/** \brief Set interface source and L4 port-range request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param interface_id - interface index
+    @param vrf_id - VRF associated with source and L4 port-range check
+*/
+define ip_source_and_port_range_check_interface_add_del {
+    u32 client_index;
+    u32 context;
+    u8  is_add;
+    u32 sw_if_index;
+    u32 vrf_id;
+};
+
+/** \brief Set interface source and L4 port-range response
+    @param context - sender context, to match reply w/ request
+    @param retval - return value for request
+*/
+define ip_source_and_port_range_check_interface_add_del_reply {
+    u32 context;
+    i32 retval;
+};