/*
- * 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.
*/
-vl_api_version 1.0.0
+option version = "0.0.2";
-/** \brief Configure IPFIX exporter process 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
-*/
-autoreply define set_ipfix_exporter
-{
- 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;
-};
+import "vnet/interface_types.api";
+import "vnet/ip/ip_types.api";
+import "vnet/flow/flow_types.api";
-/** \brief IPFIX exporter dump request
+/** \brief flow add request
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
+ @param flow - flow rule
*/
-define ipfix_exporter_dump
+define flow_add
{
u32 client_index;
u32 context;
+ 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 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;
+ i32 retval;
+ u32 flow_index;
};
-/** \brief IPFIX classify stream configure request
+/** \brief flow del 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
-*/
-autoreply define set_ipfix_classify_stream {
- u32 client_index;
- u32 context;
- u32 domain_id;
- u16 src_port;
-};
-
-/** \brief IPFIX classify stream dump request
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
-*/
-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
+ @param flow_index - flow index
*/
-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
+ @param flow_index - flow index
+ @param hw_if_index - hardware interface index
*/
-autoreply define ipfix_classify_table_add_del {
- u32 client_index;
- u32 context;
- u32 table_id;
- u8 ip_version;
- u8 transport_protocol;
- u8 is_add;
+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>";
};
/*