// Copyright (c) 2015, Cisco Systems
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
//    this list of conditions and the following disclaimer.
// 
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
//    contributors may be used to endorse or promote products derived
//    from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// This file is autogenerated
//
// The following edits are possible, without affecting the validity of the
// file:
//
//  * Fields may be renamed.
//  * Fields may be deleted.
//  * The unique numbered tag for a field may be changed, provided that
//    the ordering of tags for fields within a message is preserved.
//  * Message types may be renamed.
//  * Message types may be deleted (if all fields that reference them
//    have been deleted).
//
// All Cisco message and field extensions must be preserved (except when the
// field itself is being deleted).

syntax = "proto3";

package cisco_ios_xr_qos_ma_oper.qos.nodes.node.policy_map.shared_policy_instances.shared_policy_instance.member_interfaces.member_interface.satellite_ids.satellite_id.output.statistics;

// policy map statistics
message qos_stats_KEYS {
    string node_name = 1;
    string spi_name = 2;
    string interface_name = 3;
    uint32 n_v_satellite_id = 4;
}

message qos_stats {
    string policy_name = 50;
    string state = 51;
    string state_description = 52;
    // array of classes contained in policy
    repeated class_stats class_stats = 53;
    // to maintain satellite id
    uint32 satid = 54;
}

message policy_param_uint32_st_ {
    uint32 value = 1;
    string unit = 2;
}

// Counters common to all features
message gen_stats_st {
    // Transmitted packets (packets/bytes)
    uint64 transmit_packets = 1;
    // Transmitted bytes (packets/bytes)
    uint64 transmit_bytes = 2;
    // Dropped packets (packets/bytes)
    uint64 total_drop_packets = 3;
    // Dropped bytes (packets/bytes)
    uint64 total_drop_bytes = 4;
    // Total drop rate (packets/bytes)
    uint32 total_drop_rate = 5;
    // Incoming matched data rate in kbps
    uint32 match_data_rate = 6;
    // Total transmit rate in kbps
    uint32 total_transmit_rate = 7;
    // Matched pkts before applying policy
    uint64 pre_policy_matched_packets = 8;
    // Matched bytes before applying policy
    uint64 pre_policy_matched_bytes = 9;
}

// Color Aware Policer statistics
message plc_color_class_stats_st {
    // Packets with classification result conform and policer result conform
    uint64 conform_class_conform_packets = 1;
    // Bytes with classification result conform and policer result conform
    uint64 conform_class_conform_bytes = 2;
    // Conform Class Conform rate in kbps
    uint32 conform_class_conform_rate = 3;
    // Packets with classification result conform and policer result exceed
    uint64 conform_class_exceed_packets = 4;
    // Bytes with classification result conform and policer result exceed
    uint64 conform_class_exceed_bytes = 5;
    // Conform Class Exceed rate in kbps
    uint32 conform_class_exceed_rate = 6;
    // Packets with classification result conform and policer result violate
    uint64 conform_class_violate_packets = 7;
    // Bytes with classification result conform and policer result violate
    uint64 conform_class_violate_bytes = 8;
    // Conform Class Violate rate in kbps
    uint32 conform_class_violate_rate = 9;
    // Packets with classification result exceed and policer result exceed
    uint64 exceed_class_exceed_packets = 10;
    // Bytes with classification result exceed and policer result exceed
    uint64 exceed_class_exceed_bytes = 11;
    // Exceed Class Exceed rate in kbps
    uint32 exceed_class_exceed_rate = 12;
    // Packets with classification result exceed and policer result violate
    uint64 exceed_class_violate_packets = 13;
    // Bytes with classification result exceed and policer result violate
    uint64 exceed_class_violate_bytes = 14;
    // Exceed Class Violate rate in kbps
    uint32 exceed_class_violate_rate = 15;
    // Packets with classification result violate and policer result violate
    uint64 violate_class_violate_packets = 16;
    // Bytes with classification result violate and policer result violate
    uint64 violate_class_violate_bytes = 17;
    // Violate Class Violate rate in kbps
    uint32 violate_class_violate_rate = 18;
}

// Policer statistics
message plc_stats_st {
    // Police dropped packets
    uint64 drop_packets = 1;
    // Police dropped bytes
    uint64 drop_bytes = 2;
    // Packets that conform  to the policed rate
    uint64 conform_packets = 3;
    // Bytes that conform to the policed rate
    uint64 conform_bytes = 4;
    // Packets that exceed the policed rate
    uint64 exceed_packets = 5;
    // Bytes that exceed  the policed rate
    uint64 exceed_bytes = 6;
    // Packets violating the policed rate
    uint64 violate_packets = 7;
    // Bytes that violate the policed rate
    uint64 violate_bytes = 8;
    // Dropped pkts by the parent policer
    uint64 parent_drop_packets = 9;
    // Dropped bytes by the parent policer
    uint64 parent_drop_bytes = 10;
    // Conform rate in kbps
    uint32 conform_rate = 11;
    // Exceed rate in kbps
    uint32 exceed_rate = 12;
    // Violate rate in kbps
    uint32 violate_rate = 13;
    plc_color_class_stats_st color_class_stats = 14;
}

// CAC statistics
message cac_stats_st {
    // CAC dropped packets
    uint64 drop_packets = 1;
    // CAC dropped bytes
    uint64 drop_bytes = 2;
    // CAC dropped rate
    uint32 drop_rates = 3;
    // Admitted packets (pkts/bytes)
    uint64 admitpackets = 4;
    // Admitted bytes (pkts/bytes)
    uint64 admit_bytes = 5;
    // CAC admit rate
    uint32 admit_rates = 6;
}

// IPHC Stats
message iphc_stats_st {
    // TotalNum of Non tcp pkts sent
    uint64 non_tcp_total_out_packets = 1;
    // TotalNum of Non Tcp Bytes sent
    uint64 non_tcp_total_out_bytes = 2;
    // Non Tcp Bytes saved due to compression
    uint64 non_tcp_bytes_saved = 3;
    // Num of non tcp compressed pkts sent
    uint64 non_tcp_compressed_packets_out = 4;
    // Compressed Non Tcp Bytes sent rate
    uint32 non_tcp_bytes_sent_rate = 5;
    // Num of non tcp fullheader pkts sent
    uint64 non_tcp_full_header_packets_out = 6;
    // Total Num of tcp pkts sent
    uint64 tcp_total_out_packets = 7;
    // TotalNum of Tcp Bytes sent
    uint64 tcp_total_out_bytes = 8;
    // Tcp Bytes saved due to compression
    uint64 tcp_bytes_saved = 9;
    // Num of tcp compressed pkts sent
    uint64 tcp_compressed_packets_out = 10;
    // Compressed Tcp Bytes sent rate
    uint32 tcp_bytes_sent_rate = 11;
    // Num of tcp fullheader pkts sent
    uint64 tcp_full_header_packets_out = 12;
}

// Queue limit statistics
message q_stats_st {
    // Queue Id used for Fabric Stats
    uint32 queue_id = 1;
    // Packets tail dropped
    uint64 tail_drop_packets = 2;
    // Bytes tail dropped
    uint64 tail_drop_bytes = 3;
    // ATP CLP 0 matched packets dropped
    uint64 atm_clp0_drop_packets = 4;
    // ATP CLP 0 matched bytes dropped
    uint64 atm_clp0_drop_bytes = 5;
    // ATP CLP 0 matched packets dropped
    uint64 atm_clp1_drop_packets = 6;
    // ATP CLP 0 matched bytes dropped
    uint64 atm_clp1_drop_bytes = 7;
    // Queue instance length
    repeated policy_param_uint32_st_ queue_instance_length = 8;
    // Queue average length
    repeated policy_param_uint32_st_ queue_average_length = 9;
    // Queue maximum length
    repeated policy_param_uint32_st_ queue_max_length = 10;
    // tail drop threshold of the queue in bytes
    uint32 queue_drop_threshold = 11;
    // flag to forcedisplay of WRED even when per WredWRED profile stats is not available
    bool forced_wred_stats_display = 12;
    // Packets probabilistically dropped
    uint64 random_drop_packets = 13;
    // Bytes probabilistically dropped
    uint64 random_drop_bytes = 14;
    // Dropped packets with the average queue size at the max-threshold
    uint64 max_threshold_packets = 15;
    // Dropped bytes with the average queue size at the max-threshold
    uint64 max_threshold_bytes = 16;
    // Packets that conform  to the queue rate
    uint64 conform_packets = 17;
    // Bytes that conform to the queue rate
    uint64 conform_bytes = 18;
    // Packets that exceed the queue rate
    uint64 exceed_packets = 19;
    // Bytes that exceed  the queue rate
    uint64 exceed_bytes = 20;
    // Conform rate
    uint32 conform_rate = 21;
    // Exceed rate
    uint32 exceed_rate = 22;
}

// WRED Type Value pairs
message wred_type_value {
    // WRED type DSCP, EXP, PREC etc.
    string wred_type = 1;
    // WRED value for this type.
    uint32 value = 2;
}

// Per RED profile stats
message red_profile_stats {
    string profile_title = 1;
    // Array of WRED Typevalues as in PRP stats is available per threshold   
    repeated wred_type_value red_label = 2;
    // Transmitted packets
    uint64 red_transmit_packets = 3;
    // Transmitted bytes
    uint64 red_transmit_bytes = 4;
    // Probabilistically dropped  packets
    uint64 random_drop_packets = 5;
    // Probabilisticallydropped bytes
    uint64 random_drop_bytes = 6;
    // Dropped packets with  the average queue size at the max-threshold
    uint64 max_threshold_packets = 7;
    // Dropped bytes with  the average queue size at the max-threshold
    uint64 max_threshold_bytes = 8;
    // ECN marked packets 
    uint64 red_ecn_marked_packets = 9;
    // ECN marked bytes
    uint64 red_ecn_marked_bytes = 10;
}

message class_stats {
    //  Bitmask to indicate which counter or counters are undetermined. Counters will be marked undetermined when one or more classes share queues with class-default because in such cases the value of counters for each class is invalid. Based on the flag(s) set, the following counters will be marked undetermined. For example, if value of this object returned is 0x00000101, counters TransmitPackets/TransmitBytes/TotalTransmitRate and DropPackets/DropBytes are undetermined.0x00000001 - Transmit (TransmitPackets/TransmitBytes/TotalTransmitRate), 0x00000002 - Total drop (TotalDropPackets/TotalDropBytes/TotalDropRate), 0x00000004 - Match (MatchDataRate/PrepolicyMatchedPackets/PrepolicyMatchedBytes), 0x00000100 - Police drop (DropPackets/DropBytes), 0x00000200 - Police conform (ConformPackets/ConformBytes/ConformRate), 0x00000400 - Police exceed (ExceedPackets/ExceedBytes/ExceedRate), 0x00000800 - Police violate (ViolatePackets/ViolateBytes/ViolateRate), 0x00001000 - Parent policer drop (ParentDropPackets/ParentDropBytes), 0x00010000 - Queueing drop (TailDropPackets/TailDropBytes), 0x00020000 - Red queue drop (RandomDropPackets/RandomDropBytes), 0x00040000 - Queue maximum threshold drop (MaxThresholdPackets/MaxThresholdBytes), 0x00080000 - Queue conform (ConformPackets/ConformBytes/ConformRate), 0x00100000 - Queue exceed (ExceedPackets/ExceedBytes/ExceedRate), 0x00200000 - CLP limit drop (ATM_CLP0DropPackets/ATM_CLP0DropBytes/ATM_CLP1DropPackets/ATM_CLP1DropBytes), 0x01000000 - RED transmit (RedTransmitPackets/RedTransmitBytes), 0x02000000 - RED drop (RandomDropPackets/RandomDropBytes), 0x04000000 - RED maximum threshold drop (MaxThresholdPackets/MaxThresholdBytes)
    uint64 counter_validity_bitmask = 1;
    string class_name = 2;
    // q-id of the  shared queue for this class
    uint32 shared_queue_id = 3;
    // Description of queue for the class
    string queue_descr = 4;
    string cac_state = 5;
    gen_stats_st general_stats = 6;
    // array of queue stats
    repeated q_stats_st queue_stats_array = 7;
    // array of police stats
    repeated plc_stats_st police_stats_array = 8;
    // array of red stats
    repeated red_profile_stats wred_stats_array = 9;
    // IPHC stats
    iphc_stats_st iphc_stats = 10;
    qos_stats child_policy = 11;
    // bag for cac stats
    cac_stats_st cac_stats = 12;
}

