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.
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 @param metadata - valid only if action != 0
94 VRF id if action is 1 or 2.
95 @param match[] - for add, match value for session, required
97 autoreply define classify_add_del_session
111 /** \brief Set/unset policer classify interface
112 @param client_index - opaque cookie to identify the sender
113 @param context - sender context, to match reply w/ request
114 @param sw_if_index - interface to set/unset policer classify
115 @param ip4_table_index - ip4 classify table index (~0 for skip)
116 @param ip6_table_index - ip6 classify table index (~0 for skip)
117 @param l2_table_index - l2 classify table index (~0 for skip)
118 @param is_add - Set if non-zero, else unset
119 Note: User is recommeneded to use just one valid table_index per call.
120 (ip4_table_index, ip6_table_index, or l2_table_index)
122 autoreply define policer_classify_set_interface
133 /** \brief Get list of policer classify interfaces and tables
134 @param client_index - opaque cookie to identify the sender
135 @param context - sender context, to match reply w/ request
136 @param type - classify table type
138 define policer_classify_dump
145 /** \brief Policer iclassify operational state response.
146 @param context - sender context, to match reply w/ request
147 @param sw_if_index - software interface index
148 @param table_index - classify table index
150 define policer_classify_details
157 /** \brief Classify get table IDs request
158 @param client_index - opaque cookie to identify the sender
159 @param context - sender context, to match reply w/ request
161 define classify_table_ids
167 /** \brief Reply for classify get table IDs request
168 @param context - sender context which was passed in the request
169 @param count - number of ids returned in response
170 @param ids - array of classify table ids
172 define classify_table_ids_reply
180 /** \brief Classify table ids by interface index request
181 @param client_index - opaque cookie to identify the sender
182 @param context - sender context, to match reply w/ request
183 @param sw_if_index - index of the interface
185 define classify_table_by_interface
192 /** \brief Reply for classify table id by interface index request
193 @param context - sender context which was passed in the request
194 @param count - number of ids returned in response
195 @param sw_if_index - index of the interface
196 @param l2_table_id - l2 classify table index
197 @param ip4_table_id - ip4 classify table index
198 @param ip6_table_id - ip6 classify table index
200 define classify_table_by_interface_reply
210 /** \brief Classify table info
211 @param client_index - opaque cookie to identify the sender
212 @param context - sender context, to match reply w/ request
213 @param table_id - classify table index
215 define classify_table_info
222 /** \brief Reply for classify table info request
223 @param context - sender context which was passed in the request
224 @param count - number of ids returned in response
225 @param table_id - classify table index
226 @param nbuckets - number of buckets when adding a table
227 @param match_n_vectors - number of match vectors
228 @param skip_n_vectors - number of skip_n_vectors
229 @param active_sessions - number of sessions (active entries)
230 @param next_table_index - index of next table
231 @param miss_next_index - index of miss table
232 @param mask[] - match mask
234 define classify_table_info_reply
243 u32 next_table_index;
246 u8 mask[mask_length];
249 /** \brief Classify sessions dump request
250 @param client_index - opaque cookie to identify the sender
251 @param context - sender context, to match reply w/ request
252 @param table_id - classify table index
254 define classify_session_dump
261 /** \brief Reply for classify table session dump request
262 @param context - sender context which was passed in the request
263 @param count - number of ids returned in response
264 @param table_id - classify table index
265 @param hit_next_index - hit_next_index of session
266 @param opaque_index - for add, opaque_index of session
267 @param advance - advance value of session
268 @param match[] - match value for session
270 define classify_session_details
279 u8 match[match_length];
282 /** \brief Set/unset flow classify interface
283 @param client_index - opaque cookie to identify the sender
284 @param context - sender context, to match reply w/ request
285 @param sw_if_index - interface to set/unset flow classify
286 @param ip4_table_index - ip4 classify table index (~0 for skip)
287 @param ip6_table_index - ip6 classify table index (~0 for skip)
288 @param l2_table_index - l2 classify table index (~0 for skip)
289 @param is_add - Set if non-zero, else unset
290 Note: User is recommeneded to use just one valid table_index per call.
291 (ip4_table_index, ip6_table_index, or l2_table_index)
293 autoreply define flow_classify_set_interface {
302 /** \brief Get list of flow classify interfaces and tables
303 @param client_index - opaque cookie to identify the sender
304 @param context - sender context, to match reply w/ request
305 @param type - classify table type
307 define flow_classify_dump {
313 /** \brief Flow classify operational state response.
314 @param context - sender context, to match reply w/ request
315 @param sw_if_index - software interface index
316 @param table_index - classify table index
318 define flow_classify_details {
326 * eval: (c-set-style "gnu")