FD.io VPP  v17.04.2-2-ga8f93f8
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 /** \brief Add/Delete classification table request
17  @param client_index - opaque cookie to identify the sender
18  @param context - sender context, to match reply w/ request
19  @param is_add- if non-zero add the table, else delete it
20  @param del_chain - if non-zero delete the whole chain of tables
21  @param table_index - if add, reuturns index of the created table, else specifies the table to delete
22  @param nbuckets - number of buckets when adding a table
23  @param memory_size - memory size when adding a table
24  @param match_n_vectors - number of match vectors
25  @param next_table_index - index of next table
26  @param miss_next_index - index of miss table
27  @param current_data_flag - option to use current node's packet payload
28  as the starting point from where packets are classified,
29  This option is only valid for L2/L3 input ACL for now.
30  0: by default, classify data from the buffer's start location
31  1: classify packets from VPP node’s current data pointer
32  @param current_data_offset - a signed value to shift the start location of
33  the packet to be classified
34  For example, if input IP ACL node is used, L2 header’s first byte
35  can be accessible by configuring current_data_offset to -14
36  if there is no vlan tag.
37  This is valid only if current_data_flag is set to 1.
38  @param mask[] - match mask
39 */
40 define classify_add_del_table
41 {
55  u8 mask[0];
56 };
57 
58 /** \brief Add/Delete classification table response
59  @param context - sender context, to match reply w/ request
60  @param retval - return code for the table add/del requst
61  @param new_table_index - for add, returned index of the new table
62  @param skip_n_vectors - for add, returned value of skip_n_vectors in table
63  @param match_n_vectors -for add, returned value of match_n_vectors in table
64 */
65 define classify_add_del_table_reply
66 {
72 };
73 
74 /** \brief Classify add / del session request
75  @param client_index - opaque cookie to identify the sender
76  @param context - sender context, to match reply w/ request
77  @param is_add - add session if non-zero, else delete
78  @param table_index - index of the table to add/del the session, required
79  @param hit_next_index - for add, hit_next_index of new session, required
80  @param opaque_index - for add, opaque_index of new session
81  @param advance -for add, advance value for session
82  @param action -
83  0: no action (by default)
84  metadata is not used.
85  1: Classified IP packets will be looked up from the
86  specified ipv4 fib table (configured by metadata as VRF id).
87  Only valid for L3 input ACL node
88  2: Classified IP packets will be looked up from the
89  specified ipv6 fib table (configured by metadata as VRF id).
90  Only valid for L3 input ACL node
91  @param metadata - valid only if action != 0
92  VRF id if action is 1 or 2.
93  @param match[] - for add, match value for session, required
94 */
95 define classify_add_del_session
96 {
106  u8 match[0];
107 };
108 
109 /** \brief Classify add / del session response
110  @param context - sender context, to match reply w/ request
111  @param retval - return code for the add/del session request
112 */
113 define classify_add_del_session_reply
114 {
117 };
118 
119 /** \brief Set/unset policer classify interface
120  @param client_index - opaque cookie to identify the sender
121  @param context - sender context, to match reply w/ request
122  @param sw_if_index - interface to set/unset policer classify
123  @param ip4_table_index - ip4 classify table index (~0 for skip)
124  @param ip6_table_index - ip6 classify table index (~0 for skip)
125  @param l2_table_index - l2 classify table index (~0 for skip)
126  @param is_add - Set if non-zero, else unset
127  Note: User is recommeneded to use just one valid table_index per call.
128  (ip4_table_index, ip6_table_index, or l2_table_index)
129 */
130 define policer_classify_set_interface
131 {
139 };
140 
141 /** \brief Set/unset policer classify interface response
142  @param context - sender context, to match reply w/ request
143  @param retval - return value for request
144 */
145 define policer_classify_set_interface_reply
146 {
149 };
150 
151 /** \brief Get list of policer classify interfaces and tables
152  @param client_index - opaque cookie to identify the sender
153  @param context - sender context, to match reply w/ request
154  @param type - classify table type
155 */
156 define policer_classify_dump
157 {
161 };
162 
163 /** \brief Policer iclassify operational state response.
164  @param context - sender context, to match reply w/ request
165  @param sw_if_index - software interface index
166  @param table_index - classify table index
167 */
168 define policer_classify_details
169 {
173 };
174 
175 /** \brief Classify get table IDs request
176  @param client_index - opaque cookie to identify the sender
177  @param context - sender context, to match reply w/ request
178 */
179 define classify_table_ids
180 {
183 };
184 
185 /** \brief Reply for classify get table IDs request
186  @param context - sender context which was passed in the request
187  @param count - number of ids returned in response
188  @param ids - array of classify table ids
189 */
190 define classify_table_ids_reply
191 {
195  u32 ids[count];
196 };
197 
198 /** \brief Classify table ids by interface index request
199  @param client_index - opaque cookie to identify the sender
200  @param context - sender context, to match reply w/ request
201  @param sw_if_index - index of the interface
202 */
203 define classify_table_by_interface
204 {
208 };
209 
210 /** \brief Reply for classify table id by interface index request
211  @param context - sender context which was passed in the request
212  @param count - number of ids returned in response
213  @param sw_if_index - index of the interface
214  @param l2_table_id - l2 classify table index
215  @param ip4_table_id - ip4 classify table index
216  @param ip6_table_id - ip6 classify table index
217 */
218 define classify_table_by_interface_reply
219 {
226 };
227 
228 /** \brief Classify table info
229  @param client_index - opaque cookie to identify the sender
230  @param context - sender context, to match reply w/ request
231  @param table_id - classify table index
232 */
233 define classify_table_info
234 {
238 };
239 
240 /** \brief Reply for classify table info request
241  @param context - sender context which was passed in the request
242  @param count - number of ids returned in response
243  @param table_id - classify table index
244  @param nbuckets - number of buckets when adding a table
245  @param match_n_vectors - number of match vectors
246  @param skip_n_vectors - number of skip_n_vectors
247  @param active_sessions - number of sessions (active entries)
248  @param next_table_index - index of next table
249  @param miss_next_index - index of miss table
250  @param mask[] - match mask
251 */
252 define classify_table_info_reply
253 {
264  u8 mask[mask_length];
265 };
266 
267 /** \brief Classify sessions dump request
268  @param client_index - opaque cookie to identify the sender
269  @param context - sender context, to match reply w/ request
270  @param table_id - classify table index
271 */
272 define classify_session_dump
273 {
277 };
278 
279 /** \brief Reply for classify table session dump request
280  @param context - sender context which was passed in the request
281  @param count - number of ids returned in response
282  @param table_id - classify table index
283  @param hit_next_index - hit_next_index of session
284  @param opaque_index - for add, opaque_index of session
285  @param advance - advance value of session
286  @param match[] - match value for session
287 */
288 define classify_session_details
289 {
297  u8 match[match_length];
298 };
299 
300 /** \brief Set/unset flow classify interface
301  @param client_index - opaque cookie to identify the sender
302  @param context - sender context, to match reply w/ request
303  @param sw_if_index - interface to set/unset flow classify
304  @param ip4_table_index - ip4 classify table index (~0 for skip)
305  @param ip6_table_index - ip6 classify table index (~0 for skip)
306  @param l2_table_index - l2 classify table index (~0 for skip)
307  @param is_add - Set if non-zero, else unset
308  Note: User is recommeneded to use just one valid table_index per call.
309  (ip4_table_index, ip6_table_index, or l2_table_index)
310 */
311 define flow_classify_set_interface {
318 };
319 
320 /** \brief Set/unset flow classify interface response
321  @param context - sender context, to match reply w/ request
322  @param retval - return value for request
323 */
324 define flow_classify_set_interface_reply {
327 };
328 
329 /** \brief Get list of flow classify interfaces and tables
330  @param client_index - opaque cookie to identify the sender
331  @param context - sender context, to match reply w/ request
332  @param type - classify table type
333 */
334 define flow_classify_dump {
338 };
339 
340 /** \brief Flow classify operational state response.
341  @param context - sender context, to match reply w/ request
342  @param sw_if_index - software interface index
343  @param table_index - classify table index
344 */
345 define flow_classify_details {
349 };
350 
351 /*
352  * Local Variables:
353  * eval: (c-set-style "gnu")
354  * End:
355  */
356 
int i32
Definition: types.h:81
unsigned int u32
Definition: types.h:88
unsigned char u8
Definition: types.h:56