FD.io VPP  v17.07.01-10-g3be13f0
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 autoreply define classify_add_del_session
96 {
106  u8 match[0];
107 };
108 
109 /** \brief Set/unset policer classify interface
110  @param client_index - opaque cookie to identify the sender
111  @param context - sender context, to match reply w/ request
112  @param sw_if_index - interface to set/unset policer classify
113  @param ip4_table_index - ip4 classify table index (~0 for skip)
114  @param ip6_table_index - ip6 classify table index (~0 for skip)
115  @param l2_table_index - l2 classify table index (~0 for skip)
116  @param is_add - Set if non-zero, else unset
117  Note: User is recommeneded to use just one valid table_index per call.
118  (ip4_table_index, ip6_table_index, or l2_table_index)
119 */
120 autoreply define policer_classify_set_interface
121 {
129 };
130 
131 /** \brief Get list of policer classify interfaces and tables
132  @param client_index - opaque cookie to identify the sender
133  @param context - sender context, to match reply w/ request
134  @param type - classify table type
135 */
136 define policer_classify_dump
137 {
141 };
142 
143 /** \brief Policer iclassify operational state response.
144  @param context - sender context, to match reply w/ request
145  @param sw_if_index - software interface index
146  @param table_index - classify table index
147 */
148 define policer_classify_details
149 {
153 };
154 
155 /** \brief Classify get table IDs request
156  @param client_index - opaque cookie to identify the sender
157  @param context - sender context, to match reply w/ request
158 */
159 define classify_table_ids
160 {
163 };
164 
165 /** \brief Reply for classify get table IDs request
166  @param context - sender context which was passed in the request
167  @param count - number of ids returned in response
168  @param ids - array of classify table ids
169 */
170 define classify_table_ids_reply
171 {
175  u32 ids[count];
176 };
177 
178 /** \brief Classify table ids by interface index request
179  @param client_index - opaque cookie to identify the sender
180  @param context - sender context, to match reply w/ request
181  @param sw_if_index - index of the interface
182 */
183 define classify_table_by_interface
184 {
188 };
189 
190 /** \brief Reply for classify table id by interface index request
191  @param context - sender context which was passed in the request
192  @param count - number of ids returned in response
193  @param sw_if_index - index of the interface
194  @param l2_table_id - l2 classify table index
195  @param ip4_table_id - ip4 classify table index
196  @param ip6_table_id - ip6 classify table index
197 */
198 define classify_table_by_interface_reply
199 {
206 };
207 
208 /** \brief Classify table info
209  @param client_index - opaque cookie to identify the sender
210  @param context - sender context, to match reply w/ request
211  @param table_id - classify table index
212 */
213 define classify_table_info
214 {
218 };
219 
220 /** \brief Reply for classify table info request
221  @param context - sender context which was passed in the request
222  @param count - number of ids returned in response
223  @param table_id - classify table index
224  @param nbuckets - number of buckets when adding a table
225  @param match_n_vectors - number of match vectors
226  @param skip_n_vectors - number of skip_n_vectors
227  @param active_sessions - number of sessions (active entries)
228  @param next_table_index - index of next table
229  @param miss_next_index - index of miss table
230  @param mask[] - match mask
231 */
232 define classify_table_info_reply
233 {
244  u8 mask[mask_length];
245 };
246 
247 /** \brief Classify sessions dump request
248  @param client_index - opaque cookie to identify the sender
249  @param context - sender context, to match reply w/ request
250  @param table_id - classify table index
251 */
252 define classify_session_dump
253 {
257 };
258 
259 /** \brief Reply for classify table session dump request
260  @param context - sender context which was passed in the request
261  @param count - number of ids returned in response
262  @param table_id - classify table index
263  @param hit_next_index - hit_next_index of session
264  @param opaque_index - for add, opaque_index of session
265  @param advance - advance value of session
266  @param match[] - match value for session
267 */
268 define classify_session_details
269 {
277  u8 match[match_length];
278 };
279 
280 /** \brief Set/unset flow classify interface
281  @param client_index - opaque cookie to identify the sender
282  @param context - sender context, to match reply w/ request
283  @param sw_if_index - interface to set/unset flow classify
284  @param ip4_table_index - ip4 classify table index (~0 for skip)
285  @param ip6_table_index - ip6 classify table index (~0 for skip)
286  @param l2_table_index - l2 classify table index (~0 for skip)
287  @param is_add - Set if non-zero, else unset
288  Note: User is recommeneded to use just one valid table_index per call.
289  (ip4_table_index, ip6_table_index, or l2_table_index)
290 */
291 autoreply define flow_classify_set_interface {
298 };
299 
300 /** \brief Get list of flow classify interfaces and tables
301  @param client_index - opaque cookie to identify the sender
302  @param context - sender context, to match reply w/ request
303  @param type - classify table type
304 */
305 define flow_classify_dump {
309 };
310 
311 /** \brief Flow classify operational state response.
312  @param context - sender context, to match reply w/ request
313  @param sw_if_index - software interface index
314  @param table_index - classify table index
315 */
316 define flow_classify_details {
320 };
321 
322 /*
323  * Local Variables:
324  * eval: (c-set-style "gnu")
325  * End:
326  */
327 
int i32
Definition: types.h:81
unsigned int u32
Definition: types.h:88
unsigned char u8
Definition: types.h:56