BGP_STATS_ASPATH_MAXSIZE,
BGP_STATS_ASPATH_TOTSIZE,
BGP_STATS_ASN_HIGHEST,
+ BGP_STATS_REDISTRIBUTED,
+ BGP_STATS_LOCAL_AGGREGATES,
BGP_STATS_MAX,
};
[BGP_STATS_ASPATH_TOTSIZE] = {"Average AS-Path size (bytes)",
"averageAsPathSizeBytes"},
[BGP_STATS_ASN_HIGHEST] = {"Highest public ASN", "highestPublicAsn"},
+ [BGP_STATS_REDISTRIBUTED] = {"Redistributed routes", "totalRedistributed"},
+ [BGP_STATS_LOCAL_AGGREGATES] = {"Local aggregates", "totalLocalAggregates"},
[BGP_STATS_MAX] = {NULL, NULL}
};
ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE)))
ts->counts[BGP_STATS_AGGREGATES]++;
+ if (pi->peer == ts->table->bgp->peer_self) {
+ if (pi->sub_type == BGP_ROUTE_REDISTRIBUTE)
+ ts->counts[BGP_STATS_REDISTRIBUTED]++;
+
+ if ((pi->type == ZEBRA_ROUTE_BGP) &&
+ (pi->sub_type == BGP_ROUTE_AGGREGATE))
+ ts->counts[BGP_STATS_LOCAL_AGGREGATES]++;
+ }
+
/* as-path stats */
if (pi->attr->aspath) {
unsigned int hops = aspath_count_hops(pi->attr->aspath);