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);
294 #endif // vnsw_agent_route_ksync_h
void FillObjectLog(sandesh_op::type op, KSyncRouteInfo &info) const
bool local_vm_peer_route_
static const MacAddress & ZeroMac()
int Encode(sandesh_op::type op, uint8_t replace_plen, char *buf, int buf_len)
KSyncDBObject * GetObject() const
DISALLOW_COPY_AND_ASSIGN(RouteKSyncEntry)
virtual std::string ToString() const
virtual bool IsLess(const KSyncEntry &rhs) const
virtual bool Sync(DBEntry *e)
bool WaitForTraffic() const
DBTableWalker::WalkId RouteWalkerIdList[Agent::ROUTE_TABLE_MAX]
const AgentPath * GetActivePath(const AgentRoute *route) const
void set_mac(const PathPreference &pref, const MacAddress &mac)
void FillObjectLog(sandesh_op::type op, KSyncVrfInfo &info) const
VrfKSyncObject * ksync_obj_
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge, EVPN (Type2/Type5). This base class contains common code for all types of route tables.
void set_hbf_lintf(uint32_t hbf_lintf)
const uint32_t vrf_id() const
boost::asio::ip::address IpAddress
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
AgentRouteWalkerPtr ksync_route_walker_
VrfKSyncObject(KSync *ksync)
RouteKSyncObject * inet4_uc_route_table_
int Encode(sandesh_op::type op, uint8_t replace_plen, char *buf, int buf_len)
RouteKSyncObject * bridge_route_table_
DBTableBase::ListenerId vrf_listener_id() const
void VrfNotify(DBTablePartBase *partition, DBEntryBase *e)
KSyncDBObject * GetObject() const
DBTableBase::ListenerId evpn_rt_table_listener_id_
NHKSyncEntry * nh() const
virtual KSyncEntry * UnresolvedReference()
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *e)
void set_prefix_len(uint32_t len)
Base class for all Route entries in agent.
Agent::RouteTableType rt_type_
const uint32_t hbf_lintf() const
bool wait_for_traffic() const
void reset_mac(const MacAddress &mac)
virtual int DeleteMsg(char *buf, int buf_len)
bool EvpnIsLess(const KSyncEntry &rhs) const
MacBinding(const MacBinding &mac_binding)
bool GetIpMacWaitForTraffic(VrfEntry *vrf, const IpAddress &ip) const
IpToMacBinding ip_mac_binding_
std::pair< const MacAddress, PathPreference > MacPreferencePair
void set_ip(IpAddress addr)
RouteKSyncObject(KSync *ksync, AgentRouteTable *rt_table)
bool RouteNeedsMacBinding(const InetUnicastRouteEntry *rt)
const NextHop * GetActiveNextHop(const AgentRoute *route) const
KSyncRouteWalker(Agent *agent, VrfKSyncObject::VrfState *state)
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *entry)
bool McIsLess(const KSyncEntry &rhs) const
VrfKSyncEntry(VrfKSyncObject *obj, const VrfKSyncEntry *entry, uint32_t index)
bool BuildArpFlags(const DBEntry *rt, const AgentPath *path, const MacAddress &mac)
void NotifyUcRoute(VrfEntry *vrf, VrfState *state, const IpAddress &ip)
virtual bool IsLess(const KSyncEntry &rhs) const
DISALLOW_COPY_AND_ASSIGN(VrfKSyncEntry)
DISALLOW_COPY_AND_ASSIGN(VrfKSyncObject)
RouteKSyncObject * ksync_obj_
boost::intrusive_ptr< KSyncEntry > KSyncEntryPtr
DBTableBase::ListenerId vrf_listener_id_
RouteKSyncEntry(RouteKSyncObject *obj, const RouteKSyncEntry *entry, uint32_t index)
void EvpnRouteTableNotify(DBTablePartBase *partition, DBEntryBase *e)
std::map< const MacAddress, PathPreference > MacPreferenceMap
VrfKSyncObject::VrfState * state_
DBFilterResp DBEntryFilter(const DBEntry *entry, const KSyncDBEntry *ksync)
bool UcIsLess(const KSyncEntry &rhs) const
virtual ~VrfKSyncObject()
MacAddress GetIpMacBinding(VrfEntry *vrf, const IpAddress &ip, const InetUnicastRouteEntry *rt) const
std::pair< IpAddress, uint32_t > IpToMacBindingKey
void DelIpMacBinding(VrfEntry *vrf, const IpAddress &ip, const MacAddress &mac, uint32_t ethernet_tag)
const uint32_t hbf_rintf() const
boost::intrusive_ptr< AgentRouteWalker > AgentRouteWalkerPtr
virtual ~RouteKSyncEntry()
virtual std::string ToString() const
void AddIpMacBinding(VrfEntry *vrf, const IpAddress &ip, const MacAddress &mac, uint32_t ethernet_tag, uint32_t pref, bool wait_for_traffic)
LifetimeRef< RouteKSyncObject > table_delete_ref_
bool layer2_control_word_
static uint64_t UTCTimestampUsec()
AgentRouteTable * rt_table_
DISALLOW_COPY_AND_ASSIGN(RouteKSyncObject)
virtual int ChangeMsg(char *buf, int buf_len)
virtual ~KSyncRouteWalker()
MacBinding(const MacAddress &mac, const PathPreference &pref)
virtual int AddMsg(char *buf, int buf_len)
std::map< IpToMacBindingKey, MacBinding > IpToMacBinding
virtual bool Sync(DBEntry *e)
const MacAddress & get_mac() const
uint8_t CopyReplacementData(NHKSyncEntry *nexthop, RouteKSyncEntry *new_rt)
virtual void EmptyTable()
virtual KSyncEntry * UnresolvedReference()
virtual bool RouteWalkNotify(DBTablePartBase *partition, DBEntryBase *e)
bool L2IsLess(const KSyncEntry &rhs) const
void set_hbf_rintf(uint32_t hbf_rintf)
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
uint32_t prefix_len() const
virtual int DeleteMsg(char *buf, int buf_len)
RouteKSyncObject * inet6_uc_route_table_
bool marked_for_deletion_
MacPreferenceMap mac_preference_map_
RouteKSyncObject * inet4_mc_route_table_
void UnRegisterEvpnRouteTableListener(const VrfEntry *entry, VrfState *state)
DISALLOW_COPY_AND_ASSIGN(KSyncRouteWalker)
virtual int AddMsg(char *buf, int buf_len)
void NotifyRoutes(VrfEntry *vrf)
TunnelType::Type tunnel_type_
virtual ~RouteKSyncObject()
virtual int ChangeMsg(char *buf, int buf_len)
int DeleteInternal(NHKSyncEntry *nexthop, RouteKSyncEntry *new_rt, char *buf, int buf_len)