5 #ifndef vnsw_evpn_route_hpp
6 #define vnsw_evpn_route_hpp
20 virtual std::string
GetTableName()
const {
return "EvpnAgentRouteTable";}
26 const std::string &context);
33 const std::string &vn_name,
38 const std::string &vn_name,
44 const IpAddress &ip_addr, uint32_t ethernet_tag,
45 const std::string &vn_name,
49 const IpAddress &ip_addr, uint32_t ethernet_tag,
50 const std::string &vn_name,
55 const IpAddress &ip_addr, uint32_t ethernet_tag,
56 const std::string &vn_name,
58 uint64_t sequence_number);
63 uint32_t ethernet_tag,
68 const std::string &vn_name,
72 uint32_t ethernet_tag,
74 const std::string &interface_name);
79 const std::string &vn_name,
83 uint32_t ethernet_tag,
90 uint32_t ethernet_tag,
97 uint32_t ethernet_tag,
104 uint32_t ethernet_tag,
111 uint32_t ethernet_tag,
116 uint32_t ethernet_tag,
129 const IpAddress &ip, uint32_t ethernet_tag);
132 uint32_t plen, uint32_t ethernet_tag,
136 uint32_t ethernet_tag);
139 uint32_t plen, uint32_t ethernet_tag);
141 uint32_t plen, uint32_t ethernet_tag);
145 uint32_t ethernet_tag);
151 uint32_t ethernet_tag);
157 const std::string &vn_name,
181 virtual std::string
ToString()
const;
227 bool active_path_changed);
251 virtual std::string
ToString()
const;
270 #endif // vnsw_evpn_route_hpp
void AddType5Route(const Peer *peer, const std::string &vrf_name, const IpAddress &ip_addr, uint32_t ethernet_tag, EvpnRoutingData *data, uint8_t plen=0)
virtual ~EvpnAgentRouteTable()
EvpnRouteEntry * FindRoute(const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
void DeleteOvsPeerMulticastRoute(const Peer *peer, uint32_t vxlan_id, const Ip4Address &tor_ip)
void AddReceiveRoute(const Peer *peer, const std::string &vrf_name, uint32_t label, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &vn_name, const PathPreference &pref)
EvpnRouteKey(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
void DeleteOvsPeerMulticastRouteReq(const Peer *peer, uint32_t vxlan_id, const Ip4Address &tor_ip)
bool publish_to_bridge_route_table_
void DeleteOvsPeerMulticastRouteInternal(const Peer *peer, uint32_t vxlan_id, const Ip4Address &tor_ip, bool enqueue)
const std::string & vrf_name() const
void AddOvsPeerMulticastRoute(const Peer *peer, uint32_t vxlan_id, const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip, bool ha_stale)
static void Delete(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag)
virtual const std::string GetSourceAddressString() const
bool publish_to_inet_route_table_
virtual void DeleteDerivedRoutes(AgentRouteTable *table)
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.
virtual void UpdateDerivedRoutes(AgentRouteTable *table, const AgentPath *path, bool active_path_changed)
void AddOvsPeerMulticastRouteReq(const Peer *peer, uint32_t vxlan_id, const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip)
void AddClonedLocalPathReq(const Peer *peer, const string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, ClonedLocalPath *data)
void DelLocalVmRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *intf, const IpAddress &ip, uint32_t ethernet_tag)
EvpnRouteEntry(VrfEntry *vrf, const MacAddress &mac, const IpAddress &ip_addr, uint8_t plen, uint32_t ethernet_tag, bool is_multicast)
boost::asio::ip::address IpAddress
static void DeleteReq(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag, AgentRouteData *data)
static const MacAddress kZeroMac
virtual void SetKey(const DBRequestKey *key)
std::vector< int > SecurityGroupList
bool is_multicast() const
uint32_t ethernet_tag() const
virtual uint32_t GetActiveLabel() const
static void DeleteType5Req(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
virtual bool DBEntrySandesh(Sandesh *sresp, bool stale) const
virtual const std::string GetAddressString() const
uint8_t prefix_length_
The prefix length.
void set_publish_to_bridge_route_table(bool publish_to_bridge_route_table)
virtual std::string ToString() const
virtual Agent::RouteTableType GetTableType() const
std::unique_ptr< DBRequestKey > KeyPtr
virtual std::string GetTableName() const
Base class for all Route entries in agent.
std::string ToString() const
uint32_t ethernet_tag() const
const AgentPath * FindOvsPath() const
bool publish_to_bridge_route_table() const
EvpnRouteEntry * FindRouteNoLock(const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag)
void AddOvsPeerMulticastRouteInternal(const Peer *peer, uint32_t vxlan_id, const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip, bool enqueue, bool ha_stale)
virtual void UpdateDependantRoutes()
virtual bool ReComputePathDeletion(AgentPath *path)
void AddLocalVmRouteReq(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, LocalVmRoute *data)
virtual AgentSandeshPtr GetAgentSandesh(const AgentSandeshArguments *args, const std::string &context)
virtual Agent::RouteTableType GetTableType() const
virtual KeyPtr GetDBRequestKey() const
const MacAddress & GetMac() const
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
DISALLOW_COPY_AND_ASSIGN(EvpnRouteKey)
const std::string & name() const
void AddControllerReceiveRouteReq(const Peer *peer, const std::string &vrf_name, uint32_t label, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &vn_name, const PathPreference &pref, uint64_t sequence_number)
DISALLOW_COPY_AND_ASSIGN(EvpnAgentRouteTable)
const MacAddress & mac() const
boost::asio::ip::address_v4 Ip4Address
static void ResyncVmRoute(const Peer *peer, const string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, AgentRouteData *data)
void AddReceiveRouteReq(const Peer *peer, const std::string &vrf_name, uint32_t label, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &vn_name, const PathPreference &pref)
static void AddRemoteVmRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag, AgentRouteData *data)
uint8_t prefix_length() const
!
const IpAddress & ip_addr() const
virtual EvpnRouteKey * Clone() const
const Peer * peer() const
void set_publish_to_inet_route_table(bool publish_to_inet_route_table)
static uint32_t ComputeHostIpPlen(const IpAddress &addr)
const std::string & vrf_name() const
static DBTableBase * CreateTable(DB *db, const std::string &name)
virtual std::string ToString() const
virtual AgentRoute * AllocRouteEntry(VrfEntry *vrf, bool is_multicast) const
virtual ~EvpnRouteEntry()
void AddLocalVmRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *intf, const IpAddress &ip, uint32_t label, const std::string &vn_name, const SecurityGroupList &sg_id_list, const TagList &tag_id_list, const PathPreference &path_pref, uint32_t ethernet_tag, bool etree_leaf, const std::string &interface_name)
EvpnAgentRouteTable(DB *db, const std::string &name)
virtual int CompareTo(const Route &rhs) const
bool publish_to_inet_route_table() const
DISALLOW_COPY_AND_ASSIGN(EvpnRouteEntry)
This class defines interfaces for manipulating the prefix of a route stored in an Agent VRF table...
std::vector< int > TagList
static void AddRemoteVmRouteReq(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t plen, uint32_t ethernet_tag, AgentRouteData *data)
virtual Agent::RouteTableType GetRouteTableType()