flow: mark API as production
[vpp.git] / src / vnet / flow / flow.api
index 0e0f99b..1e807b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2016 Cisco and/or its affiliates.
+ * Copyright (c) 2020 Intel and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  * limitations under the License.
  */
 
-/** \brief Configure IPFIX exporter process request
+option version = "1.0.3";
+
+import "vnet/interface_types.api";
+import "vnet/ip/ip_types.api";
+import "vnet/flow/flow_types.api";
+
+/** \brief flow add request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
-    @param collector_address - address of IPFIX collector
-    @param collector_port - port of IPFIX collector
-    @param src_address - address of IPFIX exporter
-    @param vrf_id - VRF / fib table ID
-    @param path_mtu - Path MTU between exporter and collector
-    @param template_interval - number of seconds after which to resend template
-    @param udp_checksum - UDP checksum calculation enable flag
+    @param flow - flow rule
 */
-define set_ipfix_exporter
+define flow_add
 {
-  u32 client_index;
-  u32 context;
-  u8 collector_address[16];
-  u16 collector_port;
-  u8 src_address[16];
-  u32 vrf_id;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-};
+  option deprecated;
 
-/** \brief Reply to IPFIX exporter configure request
-    @param context - sender context which was passed in the request
-*/
-define set_ipfix_exporter_reply
-{
+  u32 client_index;
   u32 context;
-  i32 retval;
+  vl_api_flow_rule_t flow;
+  option vat_help = "test flow add [src-ip <ip-addr/mask>] [dst-ip <ip-addr/mask>] [src-port <port/mask>] [dst-port <port/mask>] [proto <ip-proto>]";
 };
 
-/** \brief IPFIX exporter dump request
+/** \brief flow add request v2
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
+    @param flow - flow rule v2
 */
-define ipfix_exporter_dump
+define flow_add_v2
 {
   u32 client_index;
   u32 context;
+  vl_api_flow_rule_v2_t flow;
+  option vat_help = "test flow add [src-ip <ip-addr/mask>] [dst-ip <ip-addr/mask>] [src-port <port/mask>] [dst-port <port/mask>] [proto <ip-proto>] [spec <spec-string>] [mask <mask-string>]";
 };
 
-/** \brief Reply to IPFIX exporter dump request
-    @param context - sender context which was passed in the request
-    @param collector_address - address of IPFIX collector
-    @param collector_port - port of IPFIX collector
-    @param src_address - address of IPFIX exporter
-    @param fib_index - fib table index
-    @param path_mtu - Path MTU between exporter and collector
-    @param template_interval - number of seconds after which to resend template
-    @param udp_checksum - UDP checksum calculation enable flag
+/** \brief reply for adding flow
+    @param context - sender context, to match reply w/ request
+    @param retval - return code
+    @param flow_index - flow index, can be used for flow del/enable/disable
 */
-define ipfix_exporter_details
+define flow_add_reply
 {
-  u32 context;
-  u8 collector_address[16];
-  u16 collector_port;
-  u8 src_address[16];
-  u32 vrf_id;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-};
+  option deprecated;
 
-/** \brief IPFIX classify stream configure request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param domain_id - domain ID reported in IPFIX messages for classify stream
-    @param src_port - source port of UDP session for classify stream
-*/
-define set_ipfix_classify_stream {
-    u32 client_index;
-    u32 context;
-    u32 domain_id;
-    u16 src_port;
+  u32 context;
+  i32 retval;
+  u32 flow_index;
 };
 
-/** \brief IPFIX classify stream configure response
+/** \brief reply for adding flow v2
     @param context - sender context, to match reply w/ request
-    @param retval - return value for request
+    @param retval - return code
+    @param flow_index - flow index, can be used for flow del/enable/disable
 */
-define set_ipfix_classify_stream_reply {
-    u32 context;
-    i32 retval;
+define flow_add_v2_reply
+{
+  u32 context;
+  i32 retval;
+  u32 flow_index;
 };
 
-/** \brief IPFIX classify stream dump request
+/** \brief flow del request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
+    @param flow_index - flow index
 */
-define ipfix_classify_stream_dump {
-    u32 client_index;
-    u32 context;
-};
-
-/** \brief Reply to IPFIX classify stream dump request
-    @param context - sender context, to match reply w/ request
-    @param domain_id - domain ID reported in IPFIX messages for classify stream
-    @param src_port - source port of UDP session for classify stream
-*/
-define ipfix_classify_stream_details {
-    u32 context;
-    u32 domain_id;
-    u16 src_port;
+autoreply define flow_del
+{
+  u32 client_index;
+  u32 context;
+  u32 flow_index;
+  option vat_help = "test flow del index <index>";
 };
 
-/** \brief IPFIX add or delete classifier table request
+/** \brief flow enable request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
-    @param table_id - classifier table ID
-    @param ip_version - version of IP used in the classifier table
-    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
-*/
-define ipfix_classify_table_add_del {
-    u32 client_index;
-    u32 context;
-    u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
-    u8 is_add;
-};
-
-/** \brief IPFIX add classifier table response
-    @param context - sender context which was passed in the request
+    @param flow_index - flow index
+       @param hw_if_index - hardware interface index
 */
-define ipfix_classify_table_add_del_reply {
-    u32 context;
-    i32 retval;
+autoreply define flow_enable
+{
+  u32 client_index;
+  u32 context;
+  u32 flow_index;
+  u32 hw_if_index;
+  option vat_help = "test flow enable index <index> <interface name>";
 };
 
-/** \brief IPFIX classify tables dump request
+/** \brief flow disable request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
+    @param flow_index - flow index
+       @param hw_if_index - hardware interface index
 */
-define ipfix_classify_table_dump {
-    u32 client_index;
-    u32 context;
-};
-
-/** \brief Reply to IPFIX classify tables dump request
-    @param context - sender context, to match reply w/ request
-    @param table_id - classifier table ID
-    @param ip_version - version of IP used in the classifier table
-    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
-*/
-define ipfix_classify_table_details {
-    u32 context;
-    u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
+autoreply define flow_disable
+{
+  u32 client_index;
+  u32 context;
+  u32 flow_index;
+  u32 hw_if_index;
+  option vat_help = "test flow disable index <index> <interface name>";
 };
 
 /*