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.
16 /** \brief Add/del policer
17 @param client_index - opaque cookie to identify the sender
18 @param context - sender context, to match reply w/ request
19 @param is_add - add policer if non-zero, else delete
20 @param name - policer name
23 @param cb - Committed Burst
24 @param eb - Excess or Peak Burst
25 @param rate_type - rate type
26 @param round_type - rounding type
27 @param type - policer algorithm
28 @param color_aware - 0=color-blind, 1=color-aware
29 @param conform_action_type - conform action type
30 @param conform_dscp - DSCP for conform mar-and-transmit action
31 @param exceed_action_type - exceed action type
32 @param exceed_dscp - DSCP for exceed mar-and-transmit action
33 @param violate_action_type - violate action type
34 @param violate_dscp - DSCP for violate mar-and-transmit action
36 define policer_add_del
51 u8 conform_action_type;
53 u8 exceed_action_type;
55 u8 violate_action_type;
59 /** \brief Add/del policer response
60 @param context - sender context, to match reply w/ request
61 @param retval - return value for request
62 @param policer_index - for add, returned index of the new policer
64 define policer_add_del_reply
71 /** \brief Get list of policers
72 @param client_index - opaque cookie to identify the sender
73 @param context - sender context, to match reply w/ request
74 @param match_name_valid - if 0 request all policers otherwise use match_name
75 @param match_name - policer name
86 /** \brief Policer operational state response.
87 @param context - sender context, to match reply w/ request
88 @param name - policer name
91 @param cb - Committed Burst
92 @param eb - Excess or Peak Burst
93 @param rate_type - rate type
94 @param round_type - rounding type
95 @param type - policer algorithm
96 @param conform_action_type - conform action type
97 @param conform_dscp - DSCP for conform mar-and-transmit action
98 @param exceed_action_type - exceed action type
99 @param exceed_dscp - DSCP for exceed mar-and-transmit action
100 @param violate_action_type - violate action type
101 @param violate_dscp - DSCP for violate mar-and-transmit action
102 @param single_rate - 1 = single rate policer, 0 = two rate policer
103 @param color_aware - for hierarchical policing
104 @param scale - power-of-2 shift amount for lower rates
105 @param cir_tokens_per_period - number of tokens for each period
106 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
107 @param current_limit - current limit
108 @param current_bucket - current bucket
109 @param extended_limit - extended limit
110 @param extended_bucket - extended bucket
111 @param last_update_time - last update time
113 define policer_details
125 u8 conform_action_type;
127 u8 exceed_action_type;
129 u8 violate_action_type;
134 u32 cir_tokens_per_period;
135 u32 pir_tokens_per_period;
140 u64 last_update_time;
145 * eval: (c-set-style "gnu")