Line data Source code
1 : /* 2 : * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. 3 : */ 4 : 5 : #ifndef SRC_BGP_ROUTING_INSTANCE_IROUTE_AGGREGATOR_H_ 6 : #define SRC_BGP_ROUTING_INSTANCE_IROUTE_AGGREGATOR_H_ 7 : 8 : #include <stdint.h> 9 : 10 : class BgpRoute; 11 : class RoutingInstance; 12 : class AggregateRouteEntriesInfo; 13 : 14 : class IRouteAggregator { 15 : public: 16 160 : virtual ~IRouteAggregator() { } 17 : 18 : virtual void Initialize() = 0; 19 : virtual void ProcessAggregateRouteConfig() = 0; 20 : virtual void UpdateAggregateRouteConfig() = 0; 21 : virtual void FlushAggregateRouteConfig() = 0; 22 : virtual uint32_t GetAggregateRouteCount() const = 0; 23 : 24 : virtual bool IsAggregateRoute(const BgpRoute *route) const = 0; 25 : virtual bool IsContributingRoute(const BgpRoute *route) const = 0; 26 : 27 : virtual bool FillAggregateRouteInfo(AggregateRouteEntriesInfo *info, 28 : bool summary) const = 0; 29 : 30 : private: 31 : friend class RouteAggregatorTest; 32 : 33 : // Enable/Disable task triggers 34 : virtual void DisableRouteAggregateUpdate() = 0; 35 : virtual void EnableRouteAggregateUpdate() = 0; 36 : virtual size_t GetUpdateAggregateListSize() const = 0; 37 : 38 : virtual void DisableUnregResolveTask() = 0; 39 : virtual void EnableUnregResolveTask() = 0; 40 : virtual size_t GetUnregResolveListSize() const = 0; 41 : }; 42 : 43 : #endif // SRC_BGP_ROUTING_INSTANCE_IROUTE_AGGREGATOR_H_