5 #ifndef __AGENT_PKT_FLOW_MGMT_KEY_H__
6 #define __AGENT_PKT_FLOW_MGMT_KEY_H__
171 if (dynamic_cast<const BridgeRouteEntry *>(rt))
201 ip_(route->prefix_address()),
plen_(route->prefix_length()) {
217 return ip_ < rhs_key->
ip_;
225 return (((
sizeof(rt->
vrf_id_) +
sizeof(rt->
type_)) << 3) +
233 ch = (
const char *)&rt->
vrf_id_;
234 return ch[
sizeof(rt->
vrf_id_) - i - 1];
237 if (i <
sizeof(rt->
type_)) {
238 ch = (
const char *)&rt->
type_;
239 return ch[
sizeof(rt->
type_) - i - 1];
241 i -=
sizeof(rt->
type_);
243 return rt->
ip_.to_v4().to_bytes()[i];
245 return rt->
ip_.to_v6().to_bytes()[i];
269 }
else if (
ip_.is_v6()) {
394 #endif // __AGENT_PKT_FLOW_MGMT_KEY_H__
virtual ~VrfFlowMgmtKey()
HealthCheckService * bgp_health_check_service_
virtual ~AclFlowMgmtKey()
virtual ~BridgeRouteFlowMgmtKey()
virtual bool UseDBEntry() const
static Type RouteToType(const AgentRoute *rt)
const DBEntry * db_entry() const
DISALLOW_COPY_AND_ASSIGN(BridgeRouteFlowMgmtKey)
DISALLOW_COPY_AND_ASSIGN(NhFlowMgmtKey)
boost::asio::ip::address IpAddress
virtual bool Compare(const FlowMgmtKey *rhs) const
AclEntryIDList ace_id_list_
virtual FlowMgmtKey * Clone()
virtual FlowMgmtKey * Clone()
VrfFlowMgmtKey(const VrfEntry *vrf)
RouteFlowMgmtKey(Type type, const AgentRoute *rt, uint32_t vrf_id)
virtual ~BgpAsAServiceFlowMgmtKey()
std::vector< AclEntryID > AclEntryIDList
BgpAsAServiceFlowMgmtKey(const boost::uuids::uuid &uuid, uint32_t source_port, uint8_t cn_index, HealthCheckInstanceBase *hc_instance, HealthCheckService *hc_service)
HealthCheckInstanceBase * bgp_health_check_instance() const
DISALLOW_COPY_AND_ASSIGN(RouteFlowMgmtKey)
virtual FlowMgmtKey * Clone()
virtual void KeyToFlowRequest(FlowEvent *req)
static Ip4Address GetIp4SubnetAddress(const Ip4Address &prefix, uint16_t plen)
Base class for all Route entries in agent.
static Ip6Address GetIp6SubnetAddress(const Ip6Address &prefix, uint16_t plen)
const AclEntryIDList * ace_id_list() const
bool NeedsReCompute(const FlowEntry *flow)
void set_db_entry(const DBEntry *db_entry)
virtual ~RouteFlowMgmtKey()
DISALLOW_COPY_AND_ASSIGN(VrfFlowMgmtKey)
void StopHealthCheck(FlowEntry *flow)
DISALLOW_COPY_AND_ASSIGN(BgpAsAServiceFlowMgmtKey)
static std::size_t BitLength(const InetRouteFlowMgmtKey *rt)
BridgeRouteFlowMgmtKey(uint32_t vrf_id, const MacAddress &mac)
RouteFlowMgmtKey(Type type, uint32_t vrf_id)
bool operator()(const FlowMgmtKey *l, const FlowMgmtKey *r) const
virtual FlowMgmtKey * Clone()=0
DISALLOW_COPY_AND_ASSIGN(FlowMgmtKey)
uint32_t source_port() const
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
virtual bool Compare(const FlowMgmtKey *rhs) const
bool IsLess(const FlowMgmtKey *rhs) const
static Type AddrToType(const IpAddress &addr)
DISALLOW_COPY_AND_ASSIGN(InterfaceFlowMgmtKey)
InterfaceFlowMgmtKey(const Interface *intf)
NhFlowMgmtKey(const NextHop *nh)
virtual ~InetRouteFlowMgmtKey()
BridgeRouteFlowMgmtKey(const BridgeRouteEntry *rt)
virtual FlowMgmtKey * Clone()
static char ByteValue(const InetRouteFlowMgmtKey *rt, std::size_t idx)
FlowMgmtKey(Type type, const DBEntry *db_entry)
AclFlowMgmtKey(const AclDBEntry *acl, const AclEntryIDList *ace_id_list)
FlowEvent::Event FreeDBEntryEvent() const
virtual ~InterfaceFlowMgmtKey()
void set_db_entry(const DBEntry *db_entry)
DISALLOW_COPY_AND_ASSIGN(AclFlowMgmtKey)
virtual FlowMgmtKey * Clone()
virtual FlowMgmtKey * Clone()
DISALLOW_COPY_AND_ASSIGN(InetRouteFlowMgmtKey)
virtual bool UseDBEntry() const
virtual bool Compare(const FlowMgmtKey *rhs) const
const boost::uuids::uuid & uuid() const
const DBEntry * db_entry_
DISALLOW_COPY_AND_ASSIGN(VnFlowMgmtKey)
HealthCheckInstanceBase * bgp_health_check_instance_
void StartHealthCheck(Agent *agent, FlowEntry *flow, const boost::uuids::uuid &hc_uuid)
InetRouteFlowMgmtKey(const InetUnicastRouteEntry *route)
virtual bool Compare(const FlowMgmtKey *rhs) const
VnFlowMgmtKey(const VnEntry *vn)
void set_ace_id_list(const AclEntryIDList *list)
InetRouteFlowMgmtKey(uint32_t vrf_id, const IpAddress &ip, uint8_t plen)
virtual bool UseDBEntry() const
bool Match(const IpAddress &match_ip) const