ipfix-export: support creating multiple exporters
[vpp.git] / src / vnet / ipfix-export / ipfix_export.api
index 9bd3790..2b1da36 100644 (file)
@@ -13,7 +13,9 @@
  * limitations under the License.
  */
 
-option version = "1.0.0";
+option version = "2.0.3";
+
+import "vnet/ip/ip_types.api";
 
 /** \brief Configure IPFIX exporter process request
     @param client_index - opaque cookie to identify the sender
@@ -30,13 +32,13 @@ autoreply define set_ipfix_exporter
 {
   u32 client_index;
   u32 context;
-  u8 collector_address[16];
+  vl_api_address_t collector_address;
   u16 collector_port;
-  u8 src_address[16];
+  vl_api_address_t src_address;
   u32 vrf_id;
   u32 path_mtu;
   u32 template_interval;
-  u8 udp_checksum;
+  bool udp_checksum;
 };
 
 /** \brief IPFIX exporter dump request
@@ -62,13 +64,53 @@ define ipfix_exporter_dump
 define ipfix_exporter_details
 {
   u32 context;
-  u8 collector_address[16];
+  vl_api_address_t collector_address;
   u16 collector_port;
-  u8 src_address[16];
+  vl_api_address_t src_address;
   u32 vrf_id;
   u32 path_mtu;
   u32 template_interval;
-  u8 udp_checksum;
+  bool udp_checksum;
+};
+
+
+/** Configure IPFIX exporter within the exporting process.
+    The exporting process can contain multiple independent exporters,
+    each of which have their own state.  The collector_address is the key
+    field that identifies a unique exporter. The already existing API
+    'set_ipfix_exporter' is used to modify a single exporter (which will
+    always have stat index 0).  If more than one exporter is required then
+    they can be created and deleted using this API.
+
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param is_create - True for create, False for delete
+    @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
+*/
+
+define ipfix_exporter_create_delete {
+  u32 client_index;
+  u32 context;
+  bool is_create;
+  vl_api_address_t collector_address;
+  u16 collector_port;
+  vl_api_address_t src_address;
+  u32 vrf_id;
+  u32 path_mtu;
+  u32 template_interval;
+  bool udp_checksum;
+};
+
+define ipfix_exporter_create_delete_reply {
+  u32 context;
+  i32 retval;
+  u32 stat_index;
 };
 
 /** \brief IPFIX classify stream configure request
@@ -115,9 +157,9 @@ autoreply define ipfix_classify_table_add_del {
     u32 client_index;
     u32 context;
     u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
-    u8 is_add;
+    vl_api_address_family_t ip_version;
+    vl_api_ip_proto_t transport_protocol;
+    bool is_add;
 };
 
 /** \brief IPFIX classify tables dump request
@@ -138,8 +180,13 @@ define ipfix_classify_table_dump {
 define ipfix_classify_table_details {
     u32 context;
     u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
+    vl_api_address_family_t ip_version;
+    vl_api_ip_proto_t transport_protocol;
+};
+
+autoreply define ipfix_flush {
+    u32 client_index;
+    u32 context;
 };
 
 /*