5 #ifndef vnsw_agent_route_ksync_h
6 #define vnsw_agent_route_ksync_h
8 #include <boost/asio.hpp>
9 #include <boost/bind.hpp>
21 #include "vrouter/ksync/agent_ksync_types.h"
49 virtual std::string
ToString()
const;
52 virtual int AddMsg(
char *buf,
int buf_len);
53 virtual int ChangeMsg(
char *buf,
int buf_len);
54 virtual int DeleteMsg(
char *buf,
int buf_len);
62 char *buf,
int buf_len);
64 char *buf,
int buf_len);
149 pref = it->second.preference();
174 if (it->second.wait_for_traffic() ==
true) {
203 virtual std::string
ToString()
const;
206 virtual int AddMsg(
char *buf,
int buf_len);
207 virtual int ChangeMsg(
char *buf,
int buf_len);
208 virtual int DeleteMsg(
char *buf,
int buf_len);
211 char *buf,
int buf_len);
255 uint32_t ethernet_tag,
257 bool wait_for_traffic);
259 const MacAddress &mac, uint32_t ethernet_tag);
boost::asio::ip::address IpAddress
boost::intrusive_ptr< AgentRouteWalker > AgentRouteWalkerPtr
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge,...
Base class for all Route entries in agent.
boost::intrusive_ptr< KSyncEntry > KSyncEntryPtr
DBTableWalker::WalkId RouteWalkerIdList[Agent::ROUTE_TABLE_MAX]
VrfKSyncObject::VrfState * state_
KSyncRouteWalker(Agent *agent, VrfKSyncObject::VrfState *state)
virtual bool RouteWalkNotify(DBTablePartBase *partition, DBEntryBase *e)
virtual ~KSyncRouteWalker()
void NotifyRoutes(VrfEntry *vrf)
DISALLOW_COPY_AND_ASSIGN(KSyncRouteWalker)
bool marked_for_deletion_
static const MacAddress & ZeroMac()
virtual std::string ToString() const
virtual int ChangeMsg(char *buf, int buf_len)
int DeleteInternal(NHKSyncEntry *nexthop, RouteKSyncEntry *new_rt, char *buf, int buf_len)
virtual ~RouteKSyncEntry()
const AgentPath * GetActivePath(const AgentRoute *route) const
const NextHop * GetActiveNextHop(const AgentRoute *route) const
RouteKSyncEntry(RouteKSyncObject *obj, const RouteKSyncEntry *entry, uint32_t index)
bool L2IsLess(const KSyncEntry &rhs) const
bool layer2_control_word_
NHKSyncEntry * nh() const
KSyncDBObject * GetObject() const
uint8_t CopyReplacementData(NHKSyncEntry *nexthop, RouteKSyncEntry *new_rt)
bool wait_for_traffic() const
uint32_t prefix_len() const
int Encode(sandesh_op::type op, uint8_t replace_plen, char *buf, int buf_len)
void set_prefix_len(uint32_t len)
RouteKSyncObject * ksync_obj_
virtual int DeleteMsg(char *buf, int buf_len)
virtual KSyncEntry * UnresolvedReference()
void FillObjectLog(sandesh_op::type op, KSyncRouteInfo &info) const
void set_ip(IpAddress addr)
DISALLOW_COPY_AND_ASSIGN(RouteKSyncEntry)
bool BuildArpFlags(const DBEntry *rt, const AgentPath *path, const MacAddress &mac)
TunnelType::Type tunnel_type_
bool EvpnIsLess(const KSyncEntry &rhs) const
virtual bool IsLess(const KSyncEntry &rhs) const
virtual int AddMsg(char *buf, int buf_len)
bool UcIsLess(const KSyncEntry &rhs) const
virtual bool Sync(DBEntry *e)
bool McIsLess(const KSyncEntry &rhs) const
bool local_vm_peer_route_
Agent::RouteTableType rt_type_
virtual void EmptyTable()
virtual ~RouteKSyncObject()
DISALLOW_COPY_AND_ASSIGN(RouteKSyncObject)
RouteKSyncObject(KSync *ksync, AgentRouteTable *rt_table)
AgentRouteTable * rt_table_
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
LifetimeRef< RouteKSyncObject > table_delete_ref_
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *e)
DBFilterResp DBEntryFilter(const DBEntry *entry, const KSyncDBEntry *ksync)
const uint32_t hbf_lintf() const
DISALLOW_COPY_AND_ASSIGN(VrfKSyncEntry)
VrfKSyncObject * ksync_obj_
virtual std::string ToString() const
virtual int ChangeMsg(char *buf, int buf_len)
void set_hbf_rintf(uint32_t hbf_rintf)
virtual bool Sync(DBEntry *e)
void set_hbf_lintf(uint32_t hbf_lintf)
const uint32_t vrf_id() const
void FillObjectLog(sandesh_op::type op, KSyncVrfInfo &info) const
virtual int AddMsg(char *buf, int buf_len)
VrfKSyncEntry(VrfKSyncObject *obj, const VrfKSyncEntry *entry, uint32_t index)
const uint32_t hbf_rintf() const
KSyncDBObject * GetObject() const
virtual bool IsLess(const KSyncEntry &rhs) const
int Encode(sandesh_op::type op, uint8_t replace_plen, char *buf, int buf_len)
virtual KSyncEntry * UnresolvedReference()
virtual int DeleteMsg(char *buf, int buf_len)
std::map< IpToMacBindingKey, MacBinding > IpToMacBinding
void VrfNotify(DBTablePartBase *partition, DBEntryBase *e)
virtual ~VrfKSyncObject()
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *entry)
std::pair< IpAddress, uint32_t > IpToMacBindingKey
void UnRegisterEvpnRouteTableListener(const VrfEntry *entry, VrfState *state)
void NotifyUcRoute(VrfEntry *vrf, VrfState *state, const IpAddress &ip)
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
DISALLOW_COPY_AND_ASSIGN(VrfKSyncObject)
bool RouteNeedsMacBinding(const InetUnicastRouteEntry *rt)
bool GetIpMacWaitForTraffic(VrfEntry *vrf, const IpAddress &ip) const
void EvpnRouteTableNotify(DBTablePartBase *partition, DBEntryBase *e)
DBTableBase::ListenerId vrf_listener_id_
VrfKSyncObject(KSync *ksync)
DBTableBase::ListenerId vrf_listener_id() const
void AddIpMacBinding(VrfEntry *vrf, const IpAddress &ip, const MacAddress &mac, uint32_t ethernet_tag, uint32_t pref, bool wait_for_traffic)
MacAddress GetIpMacBinding(VrfEntry *vrf, const IpAddress &ip, const InetUnicastRouteEntry *rt) const
void DelIpMacBinding(VrfEntry *vrf, const IpAddress &ip, const MacAddress &mac, uint32_t ethernet_tag)
bool WaitForTraffic() const
MacBinding(const MacBinding &mac_binding)
void reset_mac(const MacAddress &mac)
MacPreferenceMap mac_preference_map_
std::map< const MacAddress, PathPreference > MacPreferenceMap
const MacAddress & get_mac() const
MacBinding(const MacAddress &mac, const PathPreference &pref)
std::pair< const MacAddress, PathPreference > MacPreferencePair
void set_mac(const PathPreference &pref, const MacAddress &mac)
AgentRouteWalkerPtr ksync_route_walker_
RouteKSyncObject * inet6_uc_route_table_
IpToMacBinding ip_mac_binding_
DBTableBase::ListenerId evpn_rt_table_listener_id_
RouteKSyncObject * inet4_mc_route_table_
RouteKSyncObject * inet4_uc_route_table_
RouteKSyncObject * bridge_route_table_
static uint64_t UTCTimestampUsec()