FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
classify.api
Go to the documentation of this file.
1 /*
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 
16 vl_api_version 1.0.0
17 
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
41 */
42 define classify_add_del_table
43 {
57  u8 mask[0];
58 };
59 
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
66 */
67 define classify_add_del_table_reply
68 {
74 };
75 
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
84  @param action -
85  0: no action (by default)
86  metadata is not used.
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
96  routing node.
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
101 */
102 autoreply define classify_add_del_session
103 {
113  u8 match[0];
114 };
115 
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)
126 */
127 autoreply define policer_classify_set_interface
128 {
136 };
137 
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
142 */
143 define policer_classify_dump
144 {
148 };
149 
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
154 */
155 define policer_classify_details
156 {
160 };
161 
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
165 */
166 define classify_table_ids
167 {
170 };
171 
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
176 */
177 define classify_table_ids_reply
178 {
182  u32 ids[count];
183 };
184 
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
189 */
190 define classify_table_by_interface
191 {
195 };
196 
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
204 */
205 define classify_table_by_interface_reply
206 {
213 };
214 
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
219 */
220 define classify_table_info
221 {
225 };
226 
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
238 */
239 define classify_table_info_reply
240 {
251  u8 mask[mask_length];
252 };
253 
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
258 */
259 define classify_session_dump
260 {
264 };
265 
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
274 */
275 define classify_session_details
276 {
284  u8 match[match_length];
285 };
286 
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)
297 */
298 autoreply define flow_classify_set_interface {
305 };
306 
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
311 */
312 define flow_classify_dump {
316 };
317 
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
322 */
323 define flow_classify_details {
327 };
328 
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
335 */
336 autoreply define classify_set_interface_ip_table
337 {
342  u32 table_index; /* ~0 => off */
343 };
344 
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
352 */
353 autoreply define classify_set_interface_l2_tables
354 {
358  /* 3 x ~0 => off */
363 };
364 
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)
375 */
376 autoreply define input_acl_set_interface
377 {
385 };
386 
387 /*
388  * Local Variables:
389  * eval: (c-set-style "gnu")
390  * End:
391  */
392 
#define vl_api_version(n, v)
Definition: jvpp_registry.c:18
int i32
Definition: types.h:81
unsigned int u32
Definition: types.h:88
size_t count
Definition: vapi.c:42
unsigned char u8
Definition: types.h:56