/*
 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

vl_api_version 1.0.0

/** \brief Add/del policer
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - add policer if non-zero, else delete
    @param name - policer name
    @param cir - CIR
    @param eir - EIR
    @param cb - Committed Burst
    @param eb - Excess or Peak Burst
    @param rate_type - rate type
    @param round_type - rounding type
    @param type - policer algorithm
    @param color_aware - 0=color-blind, 1=color-aware
    @param conform_action_type - conform action type
    @param conform_dscp - DSCP for conform mar-and-transmit action
    @param exceed_action_type - exceed action type
    @param exceed_dscp - DSCP for exceed mar-and-transmit action
    @param violate_action_type - violate action type
    @param violate_dscp - DSCP for violate mar-and-transmit action
*/
define policer_add_del
{
  u32 client_index;
  u32 context;

  u8 is_add;
  u8 name[64];
  u32 cir;
  u32 eir;
  u64 cb;
  u64 eb;
  u8 rate_type;
  u8 round_type;
  u8 type;
  u8 color_aware;
  u8 conform_action_type;
  u8 conform_dscp;
  u8 exceed_action_type;
  u8 exceed_dscp;
  u8 violate_action_type;
  u8 violate_dscp;
};

/** \brief Add/del policer response
    @param context - sender context, to match reply w/ request
    @param retval - return value for request
    @param policer_index - for add, returned index of the new policer
*/
define policer_add_del_reply
{
  u32 context;
  i32 retval;
  u32 policer_index;
};

/** \brief Get list of policers
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param match_name_valid - if 0 request all policers otherwise use match_name
    @param match_name - policer name
*/
define policer_dump
{
  u32 client_index;
  u32 context;

  u8 match_name_valid;
  u8 match_name[64];
};

/** \brief Policer operational state response.
    @param context - sender context, to match reply w/ request
    @param name - policer name
    @param cir - CIR
    @param eir - EIR
    @param cb - Committed Burst
    @param eb - Excess or Peak Burst
    @param rate_type - rate type
    @param round_type - rounding type
    @param type - policer algorithm
    @param conform_action_type - conform action type
    @param conform_dscp - DSCP for conform mar-and-transmit action
    @param exceed_action_type - exceed action type
    @param exceed_dscp - DSCP for exceed mar-and-transmit action
    @param violate_action_type - violate action type
    @param violate_dscp - DSCP for violate mar-and-transmit action
    @param single_rate - 1 = single rate policer, 0 = two rate policer
    @param color_aware - for hierarchical policing
    @param scale - power-of-2 shift amount for lower rates
    @param cir_tokens_per_period - number of tokens for each period
    @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
    @param current_limit - current limit
    @param current_bucket - current bucket
    @param extended_limit - extended limit
    @param extended_bucket - extended bucket
    @param last_update_time - last update time
*/
define policer_details
{
  u32 context;

  u8 name[64];
  u32 cir;
  u32 eir;
  u64 cb;
  u64 eb;
  u8 rate_type;
  u8 round_type;
  u8 type;
  u8 conform_action_type;
  u8 conform_dscp;
  u8 exceed_action_type;
  u8 exceed_dscp;
  u8 violate_action_type;
  u8 violate_dscp;
  u8 single_rate;
  u8 color_aware;
  u32 scale;
  u32 cir_tokens_per_period;
  u32 pir_tokens_per_period;
  u32 current_limit;
  u32 current_bucket;
  u32 extended_limit;
  u32 extended_bucket;
  u64 last_update_time;
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
