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 = "1.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[] - match mask
42 define classify_add_del_table
55 u32 current_data_flag;
56 i32 current_data_offset;
60 /** \brief Add/Delete classification table response
61 @param context - sender context, to match reply w/ request
62 @param retval - return code for the table add/del requst
63 @param new_table_index - for add, returned index of the new table
64 @param skip_n_vectors - for add, returned value of skip_n_vectors in table
65 @param match_n_vectors -for add, returned value of match_n_vectors in table
67 define classify_add_del_table_reply
76 /** \brief Classify add / del session request
77 @param client_index - opaque cookie to identify the sender
78 @param context - sender context, to match reply w/ request
79 @param is_add - add session if non-zero, else delete
80 @param table_index - index of the table to add/del the session, required
81 @param hit_next_index - for add, hit_next_index of new session, required
82 @param opaque_index - for add, opaque_index of new session
83 @param advance -for add, advance value for session
85 0: no action (by default)
87 1: Classified IP packets will be looked up from the
88 specified ipv4 fib table (configured by metadata as VRF id).
89 Only valid for L3 input ACL node
90 2: Classified IP packets will be looked up from the
91 specified ipv6 fib table (configured by metadata as VRF id).
92 Only valid for L3 input ACL node
93 3: Classified packet will be steered to source routig policy
94 of given index (in metadata).
95 This is only valid for IPv6 packets redirected to a source
97 @param metadata - valid only if action != 0
98 VRF id if action is 1 or 2.
99 sr policy index if action is 3.
100 @param match[] - for add, match value for session, required
102 autoreply define classify_add_del_session
116 /** \brief Set/unset policer classify interface
117 @param client_index - opaque cookie to identify the sender
118 @param context - sender context, to match reply w/ request
119 @param sw_if_index - interface to set/unset policer classify
120 @param ip4_table_index - ip4 classify table index (~0 for skip)
121 @param ip6_table_index - ip6 classify table index (~0 for skip)
122 @param l2_table_index - l2 classify table index (~0 for skip)
123 @param is_add - Set if non-zero, else unset
124 Note: User is recommeneded to use just one valid table_index per call.
125 (ip4_table_index, ip6_table_index, or l2_table_index)
127 autoreply define policer_classify_set_interface
138 /** \brief Get list of policer classify interfaces and tables
139 @param client_index - opaque cookie to identify the sender
140 @param context - sender context, to match reply w/ request
141 @param type - classify table type
143 define policer_classify_dump
150 /** \brief Policer iclassify operational state response.
151 @param context - sender context, to match reply w/ request
152 @param sw_if_index - software interface index
153 @param table_index - classify table index
155 define policer_classify_details
162 /** \brief Classify get table IDs request
163 @param client_index - opaque cookie to identify the sender
164 @param context - sender context, to match reply w/ request
166 define classify_table_ids
172 /** \brief Reply for classify get table IDs request
173 @param context - sender context which was passed in the request
174 @param count - number of ids returned in response
175 @param ids - array of classify table ids
177 define classify_table_ids_reply
185 /** \brief Classify table ids by interface index request
186 @param client_index - opaque cookie to identify the sender
187 @param context - sender context, to match reply w/ request
188 @param sw_if_index - index of the interface
190 define classify_table_by_interface
197 /** \brief Reply for classify table id by interface index request
198 @param context - sender context which was passed in the request
199 @param count - number of ids returned in response
200 @param sw_if_index - index of the interface
201 @param l2_table_id - l2 classify table index
202 @param ip4_table_id - ip4 classify table index
203 @param ip6_table_id - ip6 classify table index
205 define classify_table_by_interface_reply
215 /** \brief Classify table info
216 @param client_index - opaque cookie to identify the sender
217 @param context - sender context, to match reply w/ request
218 @param table_id - classify table index
220 define classify_table_info
227 /** \brief Reply for classify table info request
228 @param context - sender context which was passed in the request
229 @param count - number of ids returned in response
230 @param table_id - classify table index
231 @param nbuckets - number of buckets when adding a table
232 @param match_n_vectors - number of match vectors
233 @param skip_n_vectors - number of skip_n_vectors
234 @param active_sessions - number of sessions (active entries)
235 @param next_table_index - index of next table
236 @param miss_next_index - index of miss table
237 @param mask[] - match mask
239 define classify_table_info_reply
248 u32 next_table_index;
251 u8 mask[mask_length];
254 /** \brief Classify sessions dump request
255 @param client_index - opaque cookie to identify the sender
256 @param context - sender context, to match reply w/ request
257 @param table_id - classify table index
259 define classify_session_dump
266 /** \brief Reply for classify table session dump request
267 @param context - sender context which was passed in the request
268 @param count - number of ids returned in response
269 @param table_id - classify table index
270 @param hit_next_index - hit_next_index of session
271 @param opaque_index - for add, opaque_index of session
272 @param advance - advance value of session
273 @param match[] - match value for session
275 define classify_session_details
284 u8 match[match_length];
287 /** \brief Set/unset flow classify interface
288 @param client_index - opaque cookie to identify the sender
289 @param context - sender context, to match reply w/ request
290 @param sw_if_index - interface to set/unset flow classify
291 @param ip4_table_index - ip4 classify table index (~0 for skip)
292 @param ip6_table_index - ip6 classify table index (~0 for skip)
293 @param l2_table_index - l2 classify table index (~0 for skip)
294 @param is_add - Set if non-zero, else unset
295 Note: User is recommeneded to use just one valid table_index per call.
296 (ip4_table_index, ip6_table_index, or l2_table_index)
298 autoreply define flow_classify_set_interface {
307 /** \brief Get list of flow classify interfaces and tables
308 @param client_index - opaque cookie to identify the sender
309 @param context - sender context, to match reply w/ request
310 @param type - classify table type
312 define flow_classify_dump {
318 /** \brief Flow classify operational state response.
319 @param context - sender context, to match reply w/ request
320 @param sw_if_index - software interface index
321 @param table_index - classify table index
323 define flow_classify_details {
329 /** \brief Set/unset the classification table for an interface request
330 @param client_index - opaque cookie to identify the sender
331 @param context - sender context, to match reply w/ request
332 @param is_ipv6 - ipv6 if non-zero, else ipv4
333 @param sw_if_index - interface to associate with the table
334 @param table_index - index of the table, if ~0 unset the table
336 autoreply define classify_set_interface_ip_table
342 u32 table_index; /* ~0 => off */
345 /** \brief Set/unset l2 classification tables for an interface request
346 @param client_index - opaque cookie to identify the sender
347 @param context - sender context, to match reply w/ request
348 @param sw_if_index - interface to set/unset tables for
349 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
350 @param ip6_table_index - ip6 index
351 @param other_table_index - other index
353 autoreply define classify_set_interface_l2_tables
361 u32 other_table_index;
365 /** \brief Set/unset input ACL interface
366 @param client_index - opaque cookie to identify the sender
367 @param context - sender context, to match reply w/ request
368 @param sw_if_index - interface to set/unset input ACL
369 @param ip4_table_index - ip4 classify table index (~0 for skip)
370 @param ip6_table_index - ip6 classify table index (~0 for skip)
371 @param l2_table_index - l2 classify table index (~0 for skip)
372 @param is_add - Set input ACL if non-zero, else unset
373 Note: User is recommeneded to use just one valid table_index per call.
374 (ip4_table_index, ip6_table_index, or l2_table_index)
376 autoreply define input_acl_set_interface
387 /** \brief Set/unset output ACL interface
388 @param client_index - opaque cookie to identify the sender
389 @param context - sender context, to match reply w/ request
390 @param sw_if_index - interface to set/unset output ACL
391 @param ip4_table_index - ip4 classify table index (~0 for skip)
392 @param ip6_table_index - ip6 classify table index (~0 for skip)
393 @param l2_table_index - l2 classify table index (~0 for skip)
394 @param is_add - Set output ACL if non-zero, else unset
395 Note: User is recommeneded to use just one valid table_index per call.
396 (ip4_table_index, ip6_table_index, or l2_table_index)
398 autoreply define output_acl_set_interface
411 * eval: (c-set-style "gnu")