blob: 00963f6fb6a5d459ee547f7d519572ea83c28008 [file] [log] [blame]
Pavel Kotucekd2c97d92017-01-24 10:58:12 +01001/*
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:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 */
15
Jon Loeliger5c1e48c2020-10-15 14:41:36 -040016option version = "3.1.0";
Jakub Grajciar692bfc82019-08-27 10:16:44 +020017
18import "vnet/interface_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040019
Pavel Kotucekd2c97d92017-01-24 10:58:12 +010020/** \brief Add/Delete classification table request
21 @param client_index - opaque cookie to identify the sender
22 @param context - sender context, to match reply w/ request
23 @param is_add- if non-zero add the table, else delete it
24 @param del_chain - if non-zero delete the whole chain of tables
Jakub Grajciar692bfc82019-08-27 10:16:44 +020025 @param table_index - if add, returns index of the created table, else specifies the table to delete
Pavel Kotucekd2c97d92017-01-24 10:58:12 +010026 @param nbuckets - number of buckets when adding a table
27 @param memory_size - memory size when adding a table
28 @param match_n_vectors - number of match vectors
29 @param next_table_index - index of next table
30 @param miss_next_index - index of miss table
31 @param current_data_flag - option to use current node's packet payload
32 as the starting point from where packets are classified,
33 This option is only valid for L2/L3 input ACL for now.
34 0: by default, classify data from the buffer's start location
35 1: classify packets from VPP node’s current data pointer
36 @param current_data_offset - a signed value to shift the start location of
37 the packet to be classified
38 For example, if input IP ACL node is used, L2 header’s first byte
39 can be accessible by configuring current_data_offset to -14
40 if there is no vlan tag.
41 This is valid only if current_data_flag is set to 1.
Juraj Sloboda75282452018-06-12 14:20:49 +020042 @param mask_len - length of match mask, should be equal to match_n_vectors * sizeof (u32x4)
43 @param mask - match mask
Pavel Kotucekd2c97d92017-01-24 10:58:12 +010044*/
45define classify_add_del_table
46{
47 u32 client_index;
48 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +020049 bool is_add;
50 bool del_chain;
51 u32 table_index [default=0xffffffff];
52 u32 nbuckets [default=2];
53 u32 memory_size [default=2097152];
54 u32 skip_n_vectors [default=0];
55 u32 match_n_vectors [default=1];
56 u32 next_table_index [default=0xffffffff];
57 u32 miss_next_index [default=0xffffffff];
58 u8 current_data_flag [default=0];
59 i16 current_data_offset [default=0];
Juraj Sloboda75282452018-06-12 14:20:49 +020060 u32 mask_len;
61 u8 mask[mask_len];
Pavel Kotucekd2c97d92017-01-24 10:58:12 +010062};
63
64/** \brief Add/Delete classification table response
65 @param context - sender context, to match reply w/ request
Jakub Grajciar692bfc82019-08-27 10:16:44 +020066 @param retval - return code for the table add/del request
Pavel Kotucekd2c97d92017-01-24 10:58:12 +010067 @param new_table_index - for add, returned index of the new table
68 @param skip_n_vectors - for add, returned value of skip_n_vectors in table
69 @param match_n_vectors -for add, returned value of match_n_vectors in table
70*/
71define classify_add_del_table_reply
72{
73 u32 context;
74 i32 retval;
75 u32 new_table_index;
76 u32 skip_n_vectors;
77 u32 match_n_vectors;
78};
79
Jakub Grajciar692bfc82019-08-27 10:16:44 +020080enum classify_action : u8
81{
82 CLASSIFY_API_ACTION_NONE = 0,
83 CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX = 1,
84 CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX = 2,
85 CLASSIFY_API_ACTION_SET_METADATA = 3,
86};
87
Pavel Kotucekd2c97d92017-01-24 10:58:12 +010088/** \brief Classify add / del session request
89 @param client_index - opaque cookie to identify the sender
90 @param context - sender context, to match reply w/ request
91 @param is_add - add session if non-zero, else delete
92 @param table_index - index of the table to add/del the session, required
93 @param hit_next_index - for add, hit_next_index of new session, required
94 @param opaque_index - for add, opaque_index of new session
95 @param advance -for add, advance value for session
96 @param action -
97 0: no action (by default)
98 metadata is not used.
99 1: Classified IP packets will be looked up from the
100 specified ipv4 fib table (configured by metadata as VRF id).
101 Only valid for L3 input ACL node
102 2: Classified IP packets will be looked up from the
103 specified ipv6 fib table (configured by metadata as VRF id).
104 Only valid for L3 input ACL node
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200105 3: Classified packet will be steered to source routing policy
Gabriel Ganne8527f122017-10-02 11:41:24 +0200106 of given index (in metadata).
107 This is only valid for IPv6 packets redirected to a source
108 routing node.
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100109 @param metadata - valid only if action != 0
110 VRF id if action is 1 or 2.
Gabriel Ganne8527f122017-10-02 11:41:24 +0200111 sr policy index if action is 3.
Juraj Sloboda75282452018-06-12 14:20:49 +0200112 @param match_len - length of match, should be equal to skip_n_vectors plus match_n_vectors
113 of target table times sizeof (u32x4)
Juraj Sloboda34eb5d42018-08-10 21:23:02 +0200114 @param match - for add, match value for session, required,
115 needs to include bytes in front
116 with length of skip_n_vectors of target table times sizeof (u32x4)
117 (values of those bytes will be ignored)
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100118*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400119autoreply define classify_add_del_session
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100120{
121 u32 client_index;
122 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200123 bool is_add;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100124 u32 table_index;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200125 u32 hit_next_index [default=0xffffffff];
126 u32 opaque_index [default=0xffffffff];
127 i32 advance [default=0];
128 vl_api_classify_action_t action [default=0];
129 u32 metadata [default=0];
Juraj Sloboda75282452018-06-12 14:20:49 +0200130 u32 match_len;
131 u8 match[match_len];
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100132};
133
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100134/** \brief Set/unset policer classify interface
135 @param client_index - opaque cookie to identify the sender
136 @param context - sender context, to match reply w/ request
137 @param sw_if_index - interface to set/unset policer classify
138 @param ip4_table_index - ip4 classify table index (~0 for skip)
139 @param ip6_table_index - ip6 classify table index (~0 for skip)
140 @param l2_table_index - l2 classify table index (~0 for skip)
141 @param is_add - Set if non-zero, else unset
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200142 Note: User is recommended to use just one valid table_index per call.
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100143 (ip4_table_index, ip6_table_index, or l2_table_index)
144*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400145autoreply define policer_classify_set_interface
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100146{
147 u32 client_index;
148 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200149 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100150 u32 ip4_table_index;
151 u32 ip6_table_index;
152 u32 l2_table_index;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200153 bool is_add;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100154};
155
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200156enum policer_classify_table : u8
157{
158 POLICER_CLASSIFY_API_TABLE_IP4,
159 POLICER_CLASSIFY_API_TABLE_IP6,
160 POLICER_CLASSIFY_API_TABLE_L2,
161};
162
163
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100164/** \brief Get list of policer classify interfaces and tables
165 @param client_index - opaque cookie to identify the sender
166 @param context - sender context, to match reply w/ request
167 @param type - classify table type
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200168 @param sw_if_index - filter on sw_if_index
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100169*/
170define policer_classify_dump
171{
172 u32 client_index;
173 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200174 vl_api_policer_classify_table_t type;
175 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100176};
177
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200178/** \brief Policer classify operational state response.
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100179 @param context - sender context, to match reply w/ request
180 @param sw_if_index - software interface index
181 @param table_index - classify table index
182*/
183define policer_classify_details
184{
185 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200186 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100187 u32 table_index;
188};
189
190/** \brief Classify get table IDs request
191 @param client_index - opaque cookie to identify the sender
192 @param context - sender context, to match reply w/ request
193*/
194define classify_table_ids
195{
196 u32 client_index;
197 u32 context;
198};
199
200/** \brief Reply for classify get table IDs request
201 @param context - sender context which was passed in the request
202 @param count - number of ids returned in response
203 @param ids - array of classify table ids
204*/
205define classify_table_ids_reply
206{
207 u32 context;
208 i32 retval;
209 u32 count;
210 u32 ids[count];
211};
212
213/** \brief Classify table ids by interface index request
214 @param client_index - opaque cookie to identify the sender
215 @param context - sender context, to match reply w/ request
216 @param sw_if_index - index of the interface
217*/
218define classify_table_by_interface
219{
220 u32 client_index;
221 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200222 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100223};
224
225/** \brief Reply for classify table id by interface index request
226 @param context - sender context which was passed in the request
227 @param count - number of ids returned in response
228 @param sw_if_index - index of the interface
229 @param l2_table_id - l2 classify table index
230 @param ip4_table_id - ip4 classify table index
231 @param ip6_table_id - ip6 classify table index
232*/
233define classify_table_by_interface_reply
234{
235 u32 context;
236 i32 retval;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200237 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100238 u32 l2_table_id;
239 u32 ip4_table_id;
240 u32 ip6_table_id;
241};
242
243/** \brief Classify table info
244 @param client_index - opaque cookie to identify the sender
245 @param context - sender context, to match reply w/ request
246 @param table_id - classify table index
247*/
248define classify_table_info
249{
250 u32 client_index;
251 u32 context;
252 u32 table_id;
253};
254
255/** \brief Reply for classify table info request
256 @param context - sender context which was passed in the request
257 @param count - number of ids returned in response
258 @param table_id - classify table index
259 @param nbuckets - number of buckets when adding a table
260 @param match_n_vectors - number of match vectors
261 @param skip_n_vectors - number of skip_n_vectors
262 @param active_sessions - number of sessions (active entries)
263 @param next_table_index - index of next table
264 @param miss_next_index - index of miss table
265 @param mask[] - match mask
266*/
267define classify_table_info_reply
268{
269 u32 context;
270 i32 retval;
271 u32 table_id;
272 u32 nbuckets;
273 u32 match_n_vectors;
274 u32 skip_n_vectors;
275 u32 active_sessions;
276 u32 next_table_index;
277 u32 miss_next_index;
278 u32 mask_length;
279 u8 mask[mask_length];
280};
281
282/** \brief Classify sessions dump request
283 @param client_index - opaque cookie to identify the sender
284 @param context - sender context, to match reply w/ request
285 @param table_id - classify table index
286*/
287define classify_session_dump
288{
289 u32 client_index;
290 u32 context;
291 u32 table_id;
292};
293
294/** \brief Reply for classify table session dump request
295 @param context - sender context which was passed in the request
296 @param count - number of ids returned in response
297 @param table_id - classify table index
298 @param hit_next_index - hit_next_index of session
299 @param opaque_index - for add, opaque_index of session
300 @param advance - advance value of session
301 @param match[] - match value for session
302*/
303define classify_session_details
304{
305 u32 context;
306 i32 retval;
307 u32 table_id;
308 u32 hit_next_index;
309 i32 advance;
310 u32 opaque_index;
311 u32 match_length;
312 u8 match[match_length];
313};
314
315/** \brief Set/unset flow classify interface
316 @param client_index - opaque cookie to identify the sender
317 @param context - sender context, to match reply w/ request
318 @param sw_if_index - interface to set/unset flow classify
319 @param ip4_table_index - ip4 classify table index (~0 for skip)
320 @param ip6_table_index - ip6 classify table index (~0 for skip)
321 @param l2_table_index - l2 classify table index (~0 for skip)
322 @param is_add - Set if non-zero, else unset
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200323 Note: User is recommended to use just one valid table_index per call.
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100324 (ip4_table_index, ip6_table_index, or l2_table_index)
325*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400326autoreply define flow_classify_set_interface {
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100327 u32 client_index;
328 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200329 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100330 u32 ip4_table_index;
331 u32 ip6_table_index;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200332 bool is_add;
333};
334
335enum flow_classify_table : u8
336{
337 FLOW_CLASSIFY_API_TABLE_IP4,
338 FLOW_CLASSIFY_API_TABLE_IP6,
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100339};
340
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100341/** \brief Get list of flow classify interfaces and tables
342 @param client_index - opaque cookie to identify the sender
343 @param context - sender context, to match reply w/ request
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200344 @param type - flow classify table type
345 @param sw_if_index - filter on sw_if_index
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100346*/
347define flow_classify_dump {
348 u32 client_index;
349 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200350 vl_api_flow_classify_table_t type;
351 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100352};
353
354/** \brief Flow classify operational state response.
355 @param context - sender context, to match reply w/ request
356 @param sw_if_index - software interface index
357 @param table_index - classify table index
358*/
359define flow_classify_details {
360 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200361 vl_api_interface_index_t sw_if_index;
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100362 u32 table_index;
363};
364
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200365/** \brief Set/unset the classification table for an interface request
Neale Rannsb8d44812017-11-10 06:53:54 -0800366 @param client_index - opaque cookie to identify the sender
367 @param context - sender context, to match reply w/ request
368 @param is_ipv6 - ipv6 if non-zero, else ipv4
369 @param sw_if_index - interface to associate with the table
370 @param table_index - index of the table, if ~0 unset the table
371*/
372autoreply define classify_set_interface_ip_table
373{
374 u32 client_index;
375 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200376 bool is_ipv6;
377 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800378 u32 table_index; /* ~0 => off */
379};
380
381/** \brief Set/unset l2 classification tables for an interface request
382 @param client_index - opaque cookie to identify the sender
383 @param context - sender context, to match reply w/ request
384 @param sw_if_index - interface to set/unset tables for
385 @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
386 @param ip6_table_index - ip6 index
387 @param other_table_index - other index
388*/
389autoreply define classify_set_interface_l2_tables
390{
391 u32 client_index;
392 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200393 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800394 /* 3 x ~0 => off */
395 u32 ip4_table_index;
396 u32 ip6_table_index;
397 u32 other_table_index;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200398 bool is_input;
Neale Rannsb8d44812017-11-10 06:53:54 -0800399};
400
401/** \brief Set/unset input ACL interface
402 @param client_index - opaque cookie to identify the sender
403 @param context - sender context, to match reply w/ request
404 @param sw_if_index - interface to set/unset input ACL
405 @param ip4_table_index - ip4 classify table index (~0 for skip)
406 @param ip6_table_index - ip6 classify table index (~0 for skip)
407 @param l2_table_index - l2 classify table index (~0 for skip)
408 @param is_add - Set input ACL if non-zero, else unset
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200409 Note: User is recommended to use just one valid table_index per call.
Neale Rannsb8d44812017-11-10 06:53:54 -0800410 (ip4_table_index, ip6_table_index, or l2_table_index)
411*/
412autoreply define input_acl_set_interface
413{
414 u32 client_index;
415 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200416 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800417 u32 ip4_table_index;
418 u32 ip6_table_index;
419 u32 l2_table_index;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200420 bool is_add;
Neale Rannsb8d44812017-11-10 06:53:54 -0800421};
422
Benoît Ganneabb2a422021-09-30 13:41:00 +0200423/** \brief Add/del punt ACL
424 @param client_index - opaque cookie to identify the sender
425 @param context - sender context, to match reply w/ request
426 @param ip4_table_index - ip4 punt classify table index (~0 for skip)
427 @param ip6_table_index - ip6 punt classify table index (~0 for skip)
428 @param is_add - add punt ACL if non-zero, else delete
429*/
430autoreply define punt_acl_add_del
431{
432 u32 client_index;
433 u32 context;
434 u32 ip4_table_index [default=0xffffffff];
435 u32 ip6_table_index [default=0xffffffff];
436 bool is_add [default=true];
437};
438
Benoît Ganne7fc0ee72021-10-13 19:16:07 +0200439/** \brief Get classify table ids configured for punt ACL
440 @param client_index - opaque cookie to identify the sender
441 @param context - sender context, to match reply w/ request
442*/
443define punt_acl_get
444{
445 u32 client_index;
446 u32 context;
447};
448
449/** \brief Reply for punt_acl_get
450 @param context - sender context which was passed in the request
451 @param retval - return value (0 for success)
452 @param ip4_table_index - ip4 punt classify table index (~0 for none)
453 @param ip6_table_index - ip6 punt classify table index (~0 for none)
454*/
455define punt_acl_get_reply
456{
457 u32 context;
458 i32 retval;
459 u32 ip4_table_index;
460 u32 ip6_table_index;
461};
462
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100463/** \brief Set/unset output ACL interface
464 @param client_index - opaque cookie to identify the sender
465 @param context - sender context, to match reply w/ request
466 @param sw_if_index - interface to set/unset output ACL
467 @param ip4_table_index - ip4 classify table index (~0 for skip)
468 @param ip6_table_index - ip6 classify table index (~0 for skip)
469 @param l2_table_index - l2 classify table index (~0 for skip)
470 @param is_add - Set output ACL if non-zero, else unset
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200471 Note: User is recommended to use just one valid table_index per call.
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100472 (ip4_table_index, ip6_table_index, or l2_table_index)
473*/
474autoreply define output_acl_set_interface
475{
476 u32 client_index;
477 u32 context;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200478 vl_api_interface_index_t sw_if_index;
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100479 u32 ip4_table_index;
480 u32 ip6_table_index;
481 u32 l2_table_index;
Jakub Grajciar692bfc82019-08-27 10:16:44 +0200482 bool is_add;
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100483};
484
Jon Loeliger5c1e48c2020-10-15 14:41:36 -0400485
486
487/** \brief Find a compatible Classify table in a PCAP chain
488 @param client_index - opaque cookie to identify the sender
489 @param context - sender context, to match reply w/ request
490 @param sw_if_index - interface whose chain will be searched, 0==system-wide
491 @param skip_n_vectors - number of u32x4 skip vectors
492 @param match_n_vectors - number of u32x4 vectors, 1..5
493 @param mask_len - length of mask, match_n_vectors * sizeof(u32x4)
494 @param mask - match mask
495*/
496define classify_pcap_lookup_table
497{
498 u32 client_index;
499 u32 context;
500 vl_api_interface_index_t sw_if_index [default=0xffffffff];
501 u32 skip_n_vectors [default=0];
502 u32 match_n_vectors [default=1];
503 u32 mask_len;
504 u8 mask[mask_len];
505};
506
507/** \brief Classify pcap table lookup response
508 @param context - sender context, to match reply w/ request
509 @param retval - return code for the table lookup request
510 @param table_index - returned index of the found table, or ~0
511 */
512define classify_pcap_lookup_table_reply
513{
514 u32 context;
515 i32 retval;
516 u32 table_index;
517};
518
519/** \brief Add a Classify table into a PCAP chain on an interface
520 @param client_index - opaque cookie to identify the sender
521 @param context - sender context, to match reply w/ request
522 @param sw_if_index - interface whose chain will be searched, 0==system-wide
523 @param table_index - Classify table to be added
524 @param sort_masks - 1=sort masks into most-to-least specific order
525 */
526define classify_pcap_set_table
527{
528 u32 client_index;
529 u32 context;
530 vl_api_interface_index_t sw_if_index;
531 u32 table_index [default=0xffffffff];
532 bool sort_masks [default=0];
533};
534
535/** \brief Classify pcap table lookup response
536 @param context - sender context which was passed in the request
537 @param retval - return code for the table lookup request
538 @param table_index - returned index of the sorted table chain
539 */
540define classify_pcap_set_table_reply
541{
542 u32 context;
543 i32 retval;
544 u32 table_index;
545};
546
547/** \brief Classify get the PCAP table indices for an interface
548 @param client_index - opaque cookie to identify the sender
549 @param context - sender context, to match reply w/ request
550 */
551define classify_pcap_get_tables
552{
553 u32 client_index;
554 u32 context;
555 vl_api_interface_index_t sw_if_index;
556};
557
558/** \brief Classify get a PCAP tables response
559 @param context - sender context which was passed in the request
560 @param retval - return code for the request
561 @param count - number of ids returned in response
562 @param indices - array of classify table indices
563 */
564define classify_pcap_get_tables_reply
565{
566 u32 context;
567 i32 retval;
568 u32 count;
569 u32 indices[count];
570};
571
572
573
574/** \brief Find a mask-compatible Classify table in the Trace chain
575 @param client_index - opaque cookie to identify the sender
576 @param context - sender context, to match reply w/ request
577 @param skip_n_vectors - number of u32x4 skip vectors
578 @param match_n_vectors - number of u32x4 vectors, 1..5
579 @param mask_len - length of mask, match_n_vectors * sizeof(u32x4)
580 @param mask - match mask
581*/
582define classify_trace_lookup_table
583{
584 u32 client_index;
585 u32 context;
586 u32 skip_n_vectors [default=0];
587 u32 match_n_vectors [default=1];
588 u32 mask_len;
589 u8 mask[mask_len];
590};
591
592/** \brief Classify trace table lookup response
593 @param context - sender context which was passed in the request
594 @param retval - return code for the table lookup request
595 @param table_index - returned index of the found table, or ~0
596 */
597define classify_trace_lookup_table_reply
598{
599 u32 context;
600 i32 retval;
601 u32 table_index;
602};
603
604/** \brief Add a Classify table into the Trace chain
605 @param client_index - opaque cookie to identify the sender
606 @param context - sender context, to match reply w/ request
607 @param table_index - Classify table to be added
608 @param sort_masks - 1=sort masks into most-to-least specific order
609 */
610define classify_trace_set_table
611{
612 u32 client_index;
613 u32 context;
614 u32 table_index [default=0xffffffff];
615 bool sort_masks [default=0];
616};
617
618/** \brief Classify Trace table lookup response
619 @param context - sender context which was passed in the request
620 @param retval - return code for the table lookup request
621 @param table_index - returned index of the sorted table chain
622 */
623define classify_trace_set_table_reply
624{
625 u32 context;
626 i32 retval;
627 u32 table_index;
628};
629
630/** \brief Classify get the Trace table indices
631 @param client_index - opaque cookie to identify the sender
632 @param context - sender context, to match reply w/ request
633 */
634define classify_trace_get_tables
635{
636 u32 client_index;
637 u32 context;
638};
639
640/** \brief Classify get the Trace tables response
641 @param context - sender context which was passed in the request
642 @param retval - return code for the request
643 @param count - number of ids returned in response
644 @param indices - array of classify table indices
645 */
646define classify_trace_get_tables_reply
647{
648 u32 context;
649 i32 retval;
650 u32 count;
651 u32 indices[count];
652};
653
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100654/*
655 * Local Variables:
656 * eval: (c-set-style "gnu")
657 * End:
658 */