VPP-226 - adding UDP TCP to port-range
[vpp.git] / vpp / vpp-api / vpe.api
index ebadda8..4b8aa81 100644 (file)
@@ -630,7 +630,7 @@ define vnet_interface_counters {
     u8 is_combined;
     u32 first_sw_if_index;
     u32 count;
-    u8 data[0];
+    u8 data[count];
 };
 
 typeonly manual_print manual_endian define ip4_fib_counter {
@@ -2261,27 +2261,38 @@ define lisp_add_del_local_eid_reply {
     i32 retval;
 };
 
-/** \brief add or delete lisp gpe maptunel
+/** \brief add or delete lisp 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 eid_is_ipv6 - if non-zero the address is ipv6, else ipv4
-    @param eid_ip_address - array of address bytes
-    @param eid_prefix_len - prefix len
-    @param address_is_ipv6 - if non-zero the address is ipv6, else ipv4
-    @param source_ip_address - array of address bytes
-    @param destination_ip_address - array of address bytes
+    @param eid_type -
+      0 : ipv4
+      1 : ipv6
+      2 : mac
+    @param rmt_eid - remote eid
+    @param lcl_eid - local eid
+    @param rmt_len - remote prefix len
+    @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
 */
 define lisp_gpe_add_del_fwd_entry {
     u32 client_index;
     u32 context;
     u8  is_add;
-    u8  eid_is_ipv6;
-    u8  eid_ip_address[16];
-    u8  eid_prefix_len;
-    u8  address_is_ipv6;
-    u8  source_ip_address[16];
-    u8  destination_ip_address[16];
+    u8  eid_type;
+    u8  rmt_eid[16];
+    u8  lcl_eid[16];
+    u8  rmt_len;
+    u8  lcl_len;    
+    u32 vni;
+    u32 dp_table;
+    u32 loc_num;
+    u8  lcl_locs[loc_num];
+    u8  rmt_locs[loc_num];
 };
 
 /** \brief Reply for gpe_fwd_entry add/del
@@ -2366,7 +2377,8 @@ define lisp_gpe_add_del_iface {
     u32 client_index;
     u32 context;
     u8  is_add;
-    u32 table_id;
+    u8  is_l2;
+    u32 dp_table;
     u32 vni;
 };
 
@@ -2405,6 +2417,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
@@ -2412,7 +2425,8 @@ define lisp_pitr_set_locator_set_reply {
       0 : ipv4
       1 : ipv6
       2 : mac
-    @param eid - 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
 */
@@ -2420,14 +2434,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 eid[16];
     u8 eid_len;
+    u8 seid[16];
+    u8 seid_len;
     u32 rloc_num;
-    u8 rlocs[0];
+    u8 rlocs[rloc_num];
 };
 
 /** \brief Reply for lisp_add_del_remote_mapping
@@ -3974,7 +3991,7 @@ define mpls_gre_tunnel_details {
     u32 tunnel_dst;
     u32 outer_fib_index;
     u32 nlabels;
-    u32 labels[0];
+    u32 labels[nlabels];
 };
 
 /** \brief Dump mpls eth tunnel table
@@ -4012,7 +4029,7 @@ define mpls_eth_tunnel_details {
     u8  tunnel_dst_mac[6];
     u32 tx_sw_if_index;
     u32 nlabels;
-    u32 labels[0];
+    u32 labels[nlabels];
 };
 
 /** \brief Dump mpls fib table
@@ -4040,7 +4057,7 @@ define mpls_fib_encap_details {
     u32 dest;
     u32 s_bit;
     u32 nlabels;
-    u32 labels[0];
+    u32 labels[nlabels];
 };
 
 /** \brief Dump mpls fib decap table
@@ -4325,7 +4342,7 @@ define pg_capture_reply {
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param is_enabled - 1 if enabling streams, 0 if disabling
-    @param stream - stream name to be enable/disabled, if not specified handle all streams 
+    @param stream - stream name to be enable/disabled, if not specified handle all streams
 */
 define pg_enable_disable {
     u32 client_index;
@@ -4343,3 +4360,65 @@ 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 number_of_ranges - length of low_port and high_port arrays (must match)
+    @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 tcp_vrf_id - VRF associated with source and TCP port-range check
+    @param udp_vrf_id - VRF associated with source and TCP 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 tcp_in_vrf_id;
+    u32 tcp_out_vrf_id;
+    u32 udp_in_vrf_id;
+    u32 udp_out_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;
+};