2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 option version = "2.0.0";
18 /** \brief Add/Delete classification table request
19 @param client_index - opaque cookie to identify the sender
20 @param context - sender context, to match reply w/ request
21 @param is_add- if non-zero add the table, else delete it
22 @param del_chain - if non-zero delete the whole chain of tables
23 @param table_index - if add, reuturns index of the created table, else specifies the table to delete
24 @param nbuckets - number of buckets when adding a table
25 @param memory_size - memory size when adding a table
26 @param match_n_vectors - number of match vectors
27 @param next_table_index - index of next table
28 @param miss_next_index - index of miss table
29 @param current_data_flag - option to use current node's packet payload
30 as the starting point from where packets are classified,
31 This option is only valid for L2/L3 input ACL for now.
32 0: by default, classify data from the buffer's start location
33 1: classify packets from VPP node’s current data pointer
34 @param current_data_offset - a signed value to shift the start location of
35 the packet to be classified
36 For example, if input IP ACL node is used, L2 header’s first byte
37 can be accessible by configuring current_data_offset to -14
38 if there is no vlan tag.
39 This is valid only if current_data_flag is set to 1.
40 @param mask_len - length of match mask, should be equal to match_n_vectors * sizeof (u32x4)
41 @param mask - match mask
43 define classify_add_del_table
56 u32 current_data_flag;
57 i32 current_data_offset;
62 /** \brief Add/Delete classification table response
63 @param context - sender context, to match reply w/ request
64 @param retval - return code for the table add/del requst
65 @param new_table_index - for add, returned index of the new table
66 @param skip_n_vectors - for add, returned value of skip_n_vectors in table
67 @param match_n_vectors -for add, returned value of match_n_vectors in table
69 define classify_add_del_table_reply
78 /** \brief Classify add / del session request
79 @param client_index - opaque cookie to identify the sender
80 @param context - sender context, to match reply w/ request
81 @param is_add - add session if non-zero, else delete
82 @param table_index - index of the table to add/del the session, required
83 @param hit_next_index - for add, hit_next_index of new session, required
84 @param opaque_index - for add, opaque_index of new session
85 @param advance -for add, advance value for session
87 0: no action (by default)
89 1: Classified IP packets will be looked up from the
90 specified ipv4 fib table (configured by metadata as VRF id).
91 Only valid for L3 input ACL node
92 2: Classified IP packets will be looked up from the
93 specified ipv6 fib table (configured by metadata as VRF id).
94 Only valid for L3 input ACL node
95 3: Classified packet will be steered to source routig policy
96 of given index (in metadata).
97 This is only valid for IPv6 packets redirected to a source
99 @param metadata - valid only if action != 0
100 VRF id if action is 1 or 2.
101 sr policy index if action is 3.
102 @param match_len - length of match, should be equal to skip_n_vectors plus match_n_vectors
103 of target table times sizeof (u32x4)
104 @param match - for add, match value for session, required
106 autoreply define classify_add_del_session
121 /** \brief Set/unset policer classify interface
122 @param client_index - opaque cookie to identify the sender
123 @param context - sender context, to match reply w/ request
124 @param sw_if_index - interface to set/unset policer classify
125 @param ip4_table_index - ip4 classify table index (~0 for skip)
126 @param ip6_table_index - ip6 classify table index (~0 for skip)
127 @param l2_table_index - l2 classify table index (~0 for skip)
128 @param is_add - Set if non-zero, else unset
129 Note: User is recommeneded to use just one valid table_index per call.
130 (ip4_table_index, ip6_table_index, or l2_table_index)
132 autoreply define policer_classify_set_interface
143 /** \brief Get list of policer classify interfaces and tables
144 @param client_index - opaque cookie to identify the sender
145 @param context - sender context, to match reply w/ request
146 @param type - classify table type
148 define policer_classify_dump
155 /** \brief Policer iclassify operational state response.
156 @param context - sender context, to match reply w/ request
157 @param sw_if_index - software interface index
158 @param table_index - classify table index
160 define policer_classify_details
167 /** \brief Classify get table IDs request
168 @param client_index - opaque cookie to identify the sender
169 @param context - sender context, to match reply w/ request
171 define classify_table_ids
177 /** \brief Reply for classify get table IDs request
178 @param context - sender context which was passed in the request
179 @param count - number of ids returned in response
180 @param ids - array of classify table ids
182 define classify_table_ids_reply
190 /** \brief Classify table ids by interface index request
191 @param client_index - opaque cookie to identify the sender
192 @param context - sender context, to match reply w/ request
193 @param sw_if_index - index of the interface
195 define classify_table_by_interface
202 /** \brief Reply for classify table id by interface index request
203 @param context - sender context which was passed in the request
204 @param count - number of ids returned in response
205 @param sw_if_index - index of the interface
206 @param l2_table_id - l2 classify table index
207 @param ip4_table_id - ip4 classify table index
208 @param ip6_table_id - ip6 classify table index
210 define classify_table_by_interface_reply
220 /** \brief Classify table info
221 @param client_index - opaque cookie to identify the sender
222 @param context - sender context, to match reply w/ request
223 @param table_id - classify table index
225 define classify_table_info
232 /** \brief Reply for classify table info request
233 @param context - sender context which was passed in the request
234 @param count - number of ids returned in response
235 @param table_id - classify table index
236 @param nbuckets - number of buckets when adding a table
237 @param match_n_vectors - number of match vectors
238 @param skip_n_vectors - number of skip_n_vectors
239 @param active_sessions - number of sessions (active entries)
240 @param next_table_index - index of next table
241 @param miss_next_index - index of miss table
242 @param mask[] - match mask
244 define classify_table_info_reply
253 u32 next_table_index;
256 u8 mask[mask_length];
259 /** \brief Classify sessions dump request
260 @param client_index - opaque cookie to identify the sender
261 @param context - sender context, to match reply w/ request
262 @param table_id - classify table index
264 define classify_session_dump
271 /** \brief Reply for classify table session dump request
272 @param context - sender context which was passed in the request
273 @param count - number of ids returned in response
274 @param table_id - classify table index
275 @param hit_next_index - hit_next_index of session
276 @param opaque_index - for add, opaque_index of session
277 @param advance - advance value of session
278 @param match[] - match value for session
280 define classify_session_details
289 u8 match[match_length];
292 /** \brief Set/unset flow classify interface
293 @param client_index - opaque cookie to identify the sender
294 @param context - sender context, to match reply w/ request
295 @param sw_if_index - interface to set/unset flow classify
296 @param ip4_table_index - ip4 classify table index (~0 for skip)
297 @param ip6_table_index - ip6 classify table index (~0 for skip)
298 @param l2_table_index - l2 classify table index (~0 for skip)
299 @param is_add - Set if non-zero, else unset
300 Note: User is recommeneded to use just one valid table_index per call.
301 (ip4_table_index, ip6_table_index, or l2_table_index)
303 autoreply define flow_classify_set_interface {
312 /** \brief Get list of flow classify interfaces and tables
313 @param client_index - opaque cookie to identify the sender
314 @param context - sender context, to match reply w/ request
315 @param type - classify table type
317 define flow_classify_dump {
323 /** \brief Flow classify operational state response.
324 @param context - sender context, to match reply w/ request
325 @param sw_if_index - software interface index
326 @param table_index - classify table index
328 define flow_classify_details {
334 /** \brief Set/unset the classification table for an interface request
335 @param client_index - opaque cookie to identify the sender
336 @param context - sender context, to match reply w/ request
337 @param is_ipv6 - ipv6 if non-zero, else ipv4
338 @param sw_if_index - interface to associate with the table
339 @param table_index - index of the table, if ~0 unset the table
341 autoreply define classify_set_interface_ip_table
347 u32 table_index; /* ~0 => off */
350 /** \brief Set/unset l2 classification tables for an interface request
351 @param client_index - opaque cookie to identify the sender
352 @param context - sender context, to match reply w/ request
353 @param sw_if_index - interface to set/unset tables for
354 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
355 @param ip6_table_index - ip6 index
356 @param other_table_index - other index
358 autoreply define classify_set_interface_l2_tables
366 u32 other_table_index;
370 /** \brief Set/unset input ACL interface
371 @param client_index - opaque cookie to identify the sender
372 @param context - sender context, to match reply w/ request
373 @param sw_if_index - interface to set/unset input ACL
374 @param ip4_table_index - ip4 classify table index (~0 for skip)
375 @param ip6_table_index - ip6 classify table index (~0 for skip)
376 @param l2_table_index - l2 classify table index (~0 for skip)
377 @param is_add - Set input ACL if non-zero, else unset
378 Note: User is recommeneded to use just one valid table_index per call.
379 (ip4_table_index, ip6_table_index, or l2_table_index)
381 autoreply define input_acl_set_interface
392 /** \brief Set/unset output ACL interface
393 @param client_index - opaque cookie to identify the sender
394 @param context - sender context, to match reply w/ request
395 @param sw_if_index - interface to set/unset output ACL
396 @param ip4_table_index - ip4 classify table index (~0 for skip)
397 @param ip6_table_index - ip6 classify table index (~0 for skip)
398 @param l2_table_index - l2 classify table index (~0 for skip)
399 @param is_add - Set output ACL if non-zero, else unset
400 Note: User is recommeneded to use just one valid table_index per call.
401 (ip4_table_index, ip6_table_index, or l2_table_index)
403 autoreply define output_acl_set_interface
416 * eval: (c-set-style "gnu")