1 /* Define a simple enable-disable binary API to control the feature */
4 This file defines the vpp control-plane API messages
5 used to control the flowprobe plugin
8 option version = "2.1.0";
10 import "vnet/interface_types.api";
12 enum flowprobe_which_flags : u8
14 FLOWPROBE_WHICH_FLAG_IP4 = 0x1,
15 FLOWPROBE_WHICH_FLAG_L2 = 0x2,
16 FLOWPROBE_WHICH_FLAG_IP6 = 0x4,
19 enum flowprobe_which : u8
21 FLOWPROBE_WHICH_IP4 = 0,
26 enum flowprobe_record_flags : u8
28 FLOWPROBE_RECORD_FLAG_L2 = 0x1,
29 FLOWPROBE_RECORD_FLAG_L3 = 0x2,
30 FLOWPROBE_RECORD_FLAG_L4 = 0x4,
33 enum flowprobe_direction : u8
35 FLOWPROBE_DIRECTION_RX = 0,
36 FLOWPROBE_DIRECTION_TX,
37 FLOWPROBE_DIRECTION_BOTH,
40 /** \brief Enable / disable per-packet IPFIX recording on an interface
41 @param client_index - opaque cookie to identify the sender
42 @param context - sender context, to match reply w/ request
43 @param is_add - add address if non-zero, else delete
44 @param which - flags indicating forwarding path
45 @param sw_if_index - index of the interface
47 autoreply define flowprobe_tx_interface_add_del
49 option replaced_by="flowprobe_interface_add_del";
51 /* Client identifier, set from api_main.my_client_index */
54 /* Arbitrary context, so client can match reply to request */
57 /* Enable / disable the feature */
59 vl_api_flowprobe_which_flags_t which;
61 /* Interface handle */
62 vl_api_interface_index_t sw_if_index;
63 option vat_help = "<intfc> [disable]";
66 /** \brief Enable or disable IPFIX flow record generation on an interface
67 @param client_index - opaque cookie to identify the sender
68 @param context - sender context, to match reply w/ request
69 @param is_add - add interface if non-zero, else delete
70 @param which - datapath on which to record flows
71 @param direction - direction of recorded flows
72 @param sw_if_index - index of the interface
74 autoreply define flowprobe_interface_add_del
80 vl_api_flowprobe_which_t which;
81 vl_api_flowprobe_direction_t direction;
82 vl_api_interface_index_t sw_if_index;
83 option vat_help = "(<intfc> | sw_if_index <if-idx>) [(ip4|ip6|l2)] [(rx|tx|both)] [disable]";
86 /** \brief Dump interfaces for which IPFIX flow record generation is enabled
87 @param client_index - opaque cookie to identify the sender
88 @param context - sender context, to match reply w/ request
89 @param sw_if_index - interface index to use as filter (0xffffffff is "all")
91 define flowprobe_interface_dump
96 vl_api_interface_index_t sw_if_index [default=0xffffffff];
97 option vat_help = "[<if-idx>]";
100 /** \brief Details about IPFIX flow record generation enabled on interface
101 @param context - sender context which was passed in the request
102 @param which - datapath on which to record flows
103 @param direction - direction of recorded flows
104 @param sw_if_index - index of the interface
106 define flowprobe_interface_details
110 vl_api_flowprobe_which_t which;
111 vl_api_flowprobe_direction_t direction;
112 vl_api_interface_index_t sw_if_index;
115 autoreply define flowprobe_params
117 option replaced_by="flowprobe_set_params";
121 vl_api_flowprobe_record_flags_t record_flags;
122 u32 active_timer; /* ~0 is off, 0 is default */
123 u32 passive_timer; /* ~0 is off, 0 is default */
124 option vat_help = "record <[l2] [l3] [l4]> [active <timer> passive <timer>]";
127 /** \brief Set IPFIX flow record generation parameters
128 @param client_index - opaque cookie to identify the sender
129 @param context - sender context, to match reply w/ request
130 @param record_flags - flags indicating what data to record
131 @param active_timer - time in seconds after which active flow records are
132 to be exported (0 is "off", 0xffffffff is "use default value")
133 @param passive_timer - time in seconds after which passive flow records are
134 to be deleted (0 is "off", 0xffffffff is "use default value")
136 autoreply define flowprobe_set_params
141 vl_api_flowprobe_record_flags_t record_flags;
142 u32 active_timer [default=0xffffffff];
143 u32 passive_timer [default=0xffffffff];
144 option vat_help = "record [l2] [l3] [l4] [active <timer>] [passive <timer>]";
147 /** \brief Get IPFIX flow record generation parameters
148 @param client_index - opaque cookie to identify the sender
149 @param context - sender context, to match reply w/ request
151 define flowprobe_get_params
158 /** \brief Reply to get IPFIX flow record generation parameters
159 @param context - sender context, to match reply w/ request
160 @param retval - error (0 is "no error")
161 @param record_flags - flags indicating what data to record
162 @param active_timer - time in seconds after which active flow records are
163 to be exported (0 is "off")
164 @param passive_timer - time in seconds after which passive flow records are
165 to be deleted (0 is "off")
167 define flowprobe_get_params_reply
172 vl_api_flowprobe_record_flags_t record_flags;