6 #include <boost/uuid/uuid_io.hpp>
10 #include <boost/foreach.hpp>
28 using namespace boost::asio;
48 const std::string &name) :
51 if (
name.find(
"uc.route.0") != std::string::npos) {
53 }
else if (
name.find(
"uc.route.3") != std::string::npos) {
55 }
else if (
name.find(
"uc.route6.0") != std::string::npos) {
57 }
else if (
name.find(
"evpn.route.0") != std::string::npos) {
59 }
else if (
name.find(
"l2.route.0") != std::string::npos) {
61 }
else if (
name.find(
"mc.route.0") != std::string::npos) {
102 }
while (rt && --plen);
143 if (key->
addr().is_v4()) {
145 }
else if (key->
addr().is_v6()) {
171 if (key->
addr().is_v4()) {
173 }
else if (key->
addr().is_v6()) {
205 while ((lpm_rt != NULL) && (plen < lpm_rt->prefix_length())) {
210 if (v4_parent_mask != node_mask)
217 if (v6_parent_mask != node_mask)
258 if (supernet_rt == NULL) {
268 (lpm_rt != NULL) && (plen < lpm_rt->prefix_length());
271 if (parent_mask != node_mask)
276 if (lpm_rt->IsHostRoute() ==
false) {
287 if (lpm_rt->GetActivePath()->dependant_rt() != supernet_rt)
294 lpm_rt->EnqueueRouteResync();
300 uint16_t plen)
const {
328 ipam_subnet_route_(false),
329 ipam_host_route_(false), proxy_arp_(false) {
339 str <<
dip_.to_string();
453 if (supernet_rt == NULL)
471 uc_rt_table->
agent()->
490 ret |= ecmp_data.
Update(
this);
502 const ArpNH *arp_nh =
525 return ecmp_data.
Update(
this);
546 bool ipam_host_route,
570 assert(evpn_peer != NULL);
572 Route::PathList::const_iterator it;
583 assert(evpn_path != NULL);
584 assert(evpn_data != NULL);
596 if (inet_evpn_peer != NULL)
630 if (path->
ChangeNH(agent, nh) ==
true)
668 if (path->
ChangeNH(agent, nh) ==
true)
714 bool comp_nh_policy =
false;
721 AddressList::const_iterator ptr;
744 std::unique_ptr<const NextHopKey> nh_key_ptr(nh_key);
746 std::move(nh_key_ptr)));
747 comp_nh_list.push_back(component_nh_key);
751 if (comp_nh_list.size() ==
gw_list_.size()) {
759 FindActiveEntry(comp_key));
763 FindActiveEntry(comp_key));
772 if (agent->
is_l3mh() ==
false) {
777 path_sg_list = path->
sg_list();
795 if (agent->
is_l3mh() ==
false) {
814 path->
ChangeNH(agent, nh) ==
true) {
823 const std::string& parent,
825 AgentPath(peer, rt), mac_(mac), parent_(parent) {
848 if (parent_subnet_route != dependant_route) {
851 if (parent_subnet_route) {
885 if (r_evpn_path != NULL) {
887 return (mac_ < r_evpn_path->
MacAddr());
895 evpn_rt->is_multicast(), 0),
896 mac_(evpn_rt->mac()) {
918 if (evpn_path == NULL) {
951 if (path->
ChangeNH(agent, nh) ==
true) {
964 RouteUcSandeshData data;
970 data.set_src_vrf(
vrf()->GetName());
973 for (Route::PathList::const_iterator it =
GetPathList().begin();
977 PathSandeshData pdata;
981 pdata.set_active_tunnel_type(
"Native");
983 data.path_list.push_back(pdata);
988 Inet4UcRouteResp *v4_resp =
static_cast<Inet4UcRouteResp *
>(sresp);
989 std::vector<RouteUcSandeshData> &list =
990 const_cast<std::vector<RouteUcSandeshData>&
>(v4_resp->get_route_list());
991 list.push_back(data);
993 Inet6UcRouteResp *v6_resp =
static_cast<Inet6UcRouteResp *
>(sresp);
994 std::vector<RouteUcSandeshData> &list =
995 const_cast<std::vector<RouteUcSandeshData>&
>(v6_resp->get_route_list());
996 list.push_back(data);
1002 uint8_t plen,
bool stale)
const {
1010 void UnresolvedRoute::HandleRequest()
const {
1013 ErrorResp *resp =
new ErrorResp();
1014 resp->set_context(context());
1020 Inet4UcRouteResp *resp =
new Inet4UcRouteResp();
1025 InetUnicastAgentRouteTable::UnresolvedRouteTree::const_iterator it;
1032 resp->set_context(context()+
"$");
1035 resp =
new Inet4UcRouteResp();
1039 resp->set_context(context());
1044 void Inet4UcRouteReq::HandleRequest()
const {
1048 ErrorResp *resp =
new ErrorResp();
1049 resp->set_context(context());
1055 if (get_src_ip().empty()) {
1058 boost::system::error_code ec;
1059 Ip4Address src_ip = Ip4Address::from_string(get_src_ip(), ec);
1061 (uint8_t)get_prefix_len(),
1064 sand->DoSandesh(sand);
1067 void Inet4MplsUcRouteReq::HandleRequest()
const {
1071 ErrorResp *resp =
new ErrorResp();
1072 resp->set_context(context());
1078 if (get_src_ip().empty()) {
1081 boost::system::error_code ec;
1082 Ip4Address src_ip = Ip4Address::from_string(get_src_ip(), ec);
1084 (uint8_t)get_prefix_len(),
1087 sand->DoSandesh(sand);
1104 void Inet6UcRouteReq::HandleRequest()
const {
1108 ErrorResp *resp =
new ErrorResp();
1109 resp->set_context(context());
1115 if (get_src_ip().empty()) {
1118 boost::system::error_code ec;
1119 Ip6Address src_ip = Ip6Address::from_string(get_src_ip(), ec);
1121 (uint8_t)get_prefix_len(),
1124 sand->DoSandesh(sand);
1138 req.
data.reset(data);
1149 req.
data.reset(NULL);
1159 req.
data.reset(data);
1169 req.
data.reset(data);
1179 const std::string &dest_vn_name,
1190 req.
data.reset(data);
1198 const string &vm_vrf,
1204 req.
data.reset(data);
1210 const string &vm_vrf,
1223 sg_list, tag_list, path_preference,
1231 const string &vm_vrf,
1247 sg_list, tag_list, path_preference,
1254 const string &vm_vrf,
1261 req.
data.reset(data);
1268 const string &vm_vrf,
1283 bool is_health_check_service,
1285 const std::string &intf_name,
1286 bool is_learnt_route)
1292 tag_list, communities, path_preference,
1293 subnet_service_ip, ecmp_load_balance,
1294 is_local, is_health_check_service,
1296 false, native_encap);
1310 req.
data.reset(NULL);
1316 const string &vm_vrf,
1322 req.
data.reset(data);
1330 const string &vm_vrf,
1345 bool is_health_check_service,
1346 const std::string &intf_name,
1348 const std::string &intf_route_type,
1349 bool is_learnt_route)
1356 force_policy, vn_list,
1358 communities, path_preference,
1360 ecmp_load_balance, is_local,
1361 is_health_check_service,
1370 const string &vm_vrf,
1378 req.
data.reset(data);
1385 const string &nexthop_vrf_name,
1391 ArpNHKey key(route_vrf_name, ip, policy);
1396 nh_req.
key.reset(
new ArpNHKey(route_vrf_name, ip, policy));
1403 route_vrf_name, ip, 32));
1405 vn_list, sg_list, tag_list));
1411 const string &route_vrf_name,
1414 const string &nexthop_vrf_name,
1432 nh_req.
key.reset(nh_key);
1436 nh_req.
data.reset(arp_data);
1454 GetInet4UnicastRouteTable()->Find(rt_key));
1455 assert(resolved==
false);
1473 rt_req.
key.reset(rt_key);
1474 rt_req.
data.reset(data);
1480 const string &route_vrf_name,
1483 const string &nexthop_vrf_name,
1501 nh_req.
key.reset(nh_key);
1505 nh_req.
data.reset(ndp_data);
1523 GetInet6UnicastRouteTable()->Find(rt_key));
1524 assert(resolved==
false);
1542 rt_req.
key.reset(rt_key);
1543 rt_req.
data.reset(data);
1571 std::string nexthop_vrf = intf->
vrf()->
GetName();
1576 nexthop_vrf, *intf, resolved, 32,
false, vn_list, sg, tag);
1590 std::string nexthop_vrf = intf->
vrf()->
GetName();
1598 const string &vrf_name,
1602 const uint32_t label,
1604 const std::string &vn_name,
1614 req.
data.reset(
new ResolveRoute(&intf, policy, label, vn_name, sg_list, tag_list));
1621 const string &vm_vrf,
1624 const string &interface,
1636 const string &vm_vrf,
1642 req.
data.reset(data);
1651 const string &vn_name,
bool policy,
1652 bool native_encap) {
1662 tunnel_bmap, policy, vn_name));
1669 const string &vn_name,
bool policy,
1670 bool native_encap) {
1680 tunnel_bmap, policy, vn_name));
1684 const IpAddress &addr, uint8_t plen,
const string &vn_name,
bool policy,
1685 bool native_encap) {
1688 vn_name, policy, native_encap);
1696 const string &vn_name,
1697 bool policy,
bool native_encap,
bool ipam_host_route) {
1700 vn_name, policy, native_encap);
1702 static_cast<ReceiveRoute *
>(req.
data.get())->SetIpamHostRoute(ipam_host_route);
1705 }
else if (addr.is_v6()) {
1712 const IpAddress &addr, uint8_t plen,
const string &vn_name,
bool policy,
1713 bool native_encap) {
1716 vn_name, policy, native_encap);
1721 }
else if (addr.is_v6()) {
1732 const string &vn_name,
1736 vn_name, policy,
true);
1743 const string &vn_name) {
1768 bool native_encap) {
1771 vrf_name, dst_addr, plen));
1773 vn_name, label, sg_list,
1774 tag_list, communities,
1779 const string &vrf_name,
1791 bool native_encap) {
1794 label, sg_list, tag_list, communities, native_encap);
1800 const string &vrf_name,
1812 bool native_encap) {
1815 vn_list, label, sg_list, tag_list, communities,
1822 const string &vrf_name,
1828 req.
data.reset(data);
1835 const string &vn_name) {
1838 if (dst_addr.is_v4()) {
1840 }
else if (dst_addr.is_v6()) {
1847 dscd_nh_req.
data.reset(NULL);
1863 if (!dst_addr.is_v4()) {
1872 vn_list.insert(
agent()->fabric_vn_name());
1883 if (!vhost_addr.is_v4()) {
1891 agent()->vhost_interface_name());
1893 32,
agent()->fabric_vn_name(),
false,
false);
1896 if (ip_addr.is_v4()) {
1905 const string &vrf_name,
1909 const string &vn_name) {
1926 if (ip_addr.is_unspecified())
1932 const uint32_t plen = evpn_route->
IsType5() ?
1952 const uint32_t plen = evpn_route->
IsType5() ?
1974 const std::string& origin_vn) {
2007 const std::string& origin_vn) {
boost::asio::ip::address_v6 Ip6Address
boost::asio::ip::address IpAddress
boost::asio::ip::address_v4 Ip4Address
bool IsIp4SubnetMember(const Ip4Address &ip, const Ip4Address &prefix_ip, uint16_t plen)
std::vector< uint64_t > TagList
std::vector< int > SecurityGroupList
std::vector< Ip4Address > AddressList
std::set< std::string > VnListType
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
std::vector< std::string > CommunityList
static const uint8_t kMaxV4PrefixLen
static Ip4Address GetIp4SubnetAddress(const Ip4Address &prefix, uint16_t plen)
static const uint8_t kMaxV6PrefixLen
static Ip6Address GetIp6SubnetAddress(const Ip6Address &prefix, uint16_t plen)
AgentDBEntry * FindActiveEntry(const DBEntry *key)
void set_label(uint32_t label)
void set_tunnel_bmap(TunnelType::TypeBmap bmap)
void ResetDependantRoute(AgentRoute *rt)
void set_dest_vn_list(const VnListType &dest_vn_list)
void set_communities(const CommunityList &communities)
const VnListType & dest_vn_list() const
NextHop * nexthop() const
bool is_subnet_discard() const
void set_sg_list(const SecurityGroupList &sg)
void set_nexthop(NextHop *nh)
void SetSandeshData(PathSandeshData &data) const
const AgentRoute * dependant_rt() const
const SecurityGroupList & sg_list() const
void set_tag_list(const TagList &tag)
uint32_t tunnel_bmap() const
void set_gw_ip(const IpAddress &addr)
void set_unresolved(bool unresolved)
const Peer * peer() const
const bool unresolved() const
const TagList & tag_list() const
bool ChangeNH(Agent *agent, NextHop *nh)
void set_vrf_name(const std::string &vrf_name)
const CommunityList & communities() const
void ClearDependantRoute()
virtual const NextHop * ComputeNextHop(Agent *agent) const
This class defines interfaces for manipulating the prefix of a route stored in an Agent VRF table.
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
IpAddress prefix_address_
The prefix address.
void set_prefix_length(uint8_t new_plen)
Sets the length of a stored prefix address.
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge,...
const std::string & vrf_name() const
void Process(DBRequest &req)
UnresolvedRouteTree::const_iterator unresolved_route_end() const
void EvaluateUnresolvedRoutes(void)
VrfEntry * vrf_entry() const
virtual void NotifyEntry(AgentRoute *entry)
UnresolvedRouteTree::const_iterator unresolved_route_begin() const
Base class for all Route entries in agent.
bool IsTunnelNHListEmpty()
void SetVrf(VrfEntry *vrf)
const AgentPath * GetActivePath() const
bool IsDependantRouteEmpty()
const NextHop * GetActiveNextHop() const
virtual bool DBEntrySandesh(Sandesh *sresp, bool stale) const =0
void UpdateDependantRoutes()
bool is_multicast() const
virtual AgentPath * FindPath(const Peer *peer) const
const std::string & intf_route_type() const
InterfaceTable * interface_table() const
const std::string & GetHostInterfaceName() const
VrfTable * vrf_table() const
const Peer * local_peer() const
const Peer * fabric_rt_export_peer() const
const Peer * inet_evpn_peer() const
const std::string & fabric_vn_name() const
const Peer * evpn_routing_peer() const
NextHopTable * nexthop_table() const
static Agent * GetInstance()
InetUnicastAgentRouteTable * fabric_inet4_unicast_table() const
InetUnicastAgentRouteTable * fabric_inet4_mpls_table() const
const std::string & fabric_vrf_name() const
Ip4Address router_id() const
const MacAddress & GetMac() const
void AddMacVmBindingRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *vm_intf, bool flood_dhcp)
void DeleteMacVmBindingRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *vm_intf)
std::unique_ptr< DBRequestKey > KeyPtr
DBTableBase * get_table() const
virtual KeyPtr GetDBRequestKey() const =0
bool Enqueue(DBRequest *req)
const std::string & name() const
bool Update(AgentRoute *rt)
uint8_t prefix_length() const
!
virtual std::string ToString() const
void set_policy(bool policy)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
SecurityGroupList sg_list_
const SecurityGroupList sg_list_
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const CommunityList communities_
std::unique_ptr< InterfaceKey > interface_key_
Inet4UnicastInterfaceRoute(const PhysicalInterface *intrface, const std::string &vn_name)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const MacAddress & MacAddr() const
InetEvpnRouteData(const EvpnRouteEntry *evpn_rt)
virtual bool CanDeletePath(Agent *agent, AgentPath *path, const AgentRoute *rt) const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
virtual AgentPath * CreateAgentPath(const Peer *peer, AgentRoute *rt) const
virtual const NextHop * ComputeNextHop(Agent *agent) const
virtual bool Sync(AgentRoute *sync_route)
const MacAddress & MacAddr() const
virtual const AgentPath * UsablePath() const
bool SyncDependantRoute(const AgentRoute *sync_route)
virtual bool IsLess(const AgentPath &rhs) const
InetEvpnRoutePath(const Peer *peer, const MacAddress &mac, const std::string &parent, AgentRoute *rt)
virtual AgentRouteKey * Clone() const
Agent::RouteTableType type_
InetUnicastRouteEntry * FindResolveRoute(const Ip4Address &ip)
static void AddMplsRouteReq(const Peer *peer, const string &vrf_name, const IpAddress &dst_addr, uint8_t plen, AgentRouteData *data)
static void AddVHostRecvRoute(const Peer *peer, const string &vrf, const InterfaceKey &interface, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap, bool ipam_host_route=true)
static void AddResolveRoute(const Peer *peer, const string &vrf_name, const Ip4Address &ip, const uint8_t plen, const InterfaceKey &intf_key, const uint32_t label, bool policy, const std::string &vn_name, const SecurityGroupList &sg_list, const TagList &tag_list)
static void NdpRoute(DBRequest::DBOperation op, const string &route_vrf_name, const IpAddress &ip, const MacAddress &mac, const string &nh_vrf_name, const Interface &intf, bool resolved, const uint8_t plen, bool policy, const VnListType &dest_vn_list, const SecurityGroupList &sg_list, const TagList &tag_list)
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
void TraverseHostRoutesInSubnet(InetUnicastRouteEntry *rt, const Peer *peer)
static bool ShouldAddArp(const Ip4Address &ip)
static void AddVHostRecvRouteReq(const Peer *peer, const string &vrf, const InterfaceKey &interface, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap)
uint8_t GetHostPlen(const IpAddress &ip_addr) const
void AddEvpnRoutingRoute(const IpAddress &ip_addr, uint8_t plen, const VrfEntry *vrf, const Peer *peer, const SecurityGroupList &sg_list, const CommunityList &communities, const PathPreference &path_preference, const EcmpLoadBalance &ecmp_load_balance, const TagList &tag_list, DBRequest &nh_req, uint32_t vxlan_id, const VnListType &vn_list, const std::string &origin_vn="")
InetUnicastRouteEntry * FindRouteUsingKey(InetUnicastRouteEntry &key)
bool ResyncSubnetRoutes(const InetUnicastRouteEntry *rt, bool val)
InetUnicastRouteEntry * FindRoute(const IpAddress &ip)
void AddInterfaceRouteReq(Agent *agent, const Peer *peer, const string &vrf_name, const Ip4Address &ip, uint8_t plen, const Interface *intrface, const std::string &vn_name)
static void AddRemoteVmRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &vm_addr, uint8_t plen, AgentRouteData *data)
static void AddVHostSubnetRecvRoute(const Peer *peer, const string &vrf, const InterfaceKey &interface, const Ip4Address &addr, uint8_t plen, const std::string &vn_name, bool policy)
static void DelVHostSubnetRecvRoute(const string &vm_vrf, const Ip4Address &addr, uint8_t plen)
void AddIpamSubnetRoute(const string &vm_vrf, const IpAddress &addr, uint8_t plen, const std::string &vn_name)
InetUnicastRouteEntry * FindLPM(const IpAddress &ip)
void AddClonedLocalPathReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, ClonedLocalPath *data)
static void AddVHostMplsRecvRouteReq(const Peer *peer, const string &vrf, const InterfaceKey &interface, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap)
static void AddArpReq(const string &route_vrf_name, const Ip4Address &ip, const string &nh_vrf_name, const Interface *intf, bool policy, const VnListType &dest_vn_list, const SecurityGroupList &sg_list, const TagList &tag_list)
static void AddLocalVmRoute(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, const boost::uuids::uuid &intf_uuid, const VnListType &vn_list, uint32_t label, const SecurityGroupList &sg_list, const TagList &tag_list, const CommunityList &communities, bool force_policy, const PathPreference &path_preference, const IpAddress &subnet_service_ip, const EcmpLoadBalance &ecmp_load_balance, bool is_local, bool is_health_check_service, const std::string &intf_name, bool native_encap, const std::string &intf_route_type=VmInterface::kInterface, bool is_learnt_route=false)
void DeleteEvpnRoute(const AgentRoute *rt)
void ResyncRoute(const Peer *peer, const string &vrf, const IpAddress &addr, uint8_t plen)
static void CheckAndAddArpReq(const string &vrf_name, const Ip4Address &ip, const Interface *intf, const VnListType &vn_list, const SecurityGroupList &sg, const TagList &tag)
void AddInetInterfaceRouteReq(const Peer *peer, const string &vm_vrf, const Ip4Address &addr, uint8_t plen, InetInterfaceRoute *data)
static void CheckAndAddArpRoute(const string &route_vrf_name, const Ip4Address &ip, const MacAddress &mac, const Interface *intf, bool resolved, const VnListType &vn_list, const SecurityGroupList &sg, const TagList &tag)
InetUnicastRouteEntry * GetNextNonConst(const InetUnicastRouteEntry *rt)
void AddLocalVmRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, LocalVmRoute *data)
InetUnicastRouteEntry * GetSuperNetRoute(const IpAddress &addr)
void AddEvpnRoutingRouteReq(const IpAddress &ip_addr, uint8_t plen, const VrfEntry *vrf, const Peer *peer, const SecurityGroupList &sg_list, const CommunityList &communities, const PathPreference &path_preference, const EcmpLoadBalance &ecmp_load_balance, const TagList &tag_list, DBRequest &nh_req, uint32_t vxlan_id, const VnListType &vn_list, const std::string &origin_vn="")
void AddVrouterSubnetRoute(const IpAddress &dst_addr, uint8_t plen)
void AddEvpnRoute(const AgentRoute *evpn_entry)
InetUnicastAgentRouteTable(DB *db, const std::string &name)
static void AddDropRoute(const string &vm_vrf, const Ip4Address &addr, uint8_t plen, const string &vn_name)
static void DeleteReq(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen, AgentRouteData *data)
static void ArpRoute(DBRequest::DBOperation op, const string &route_vrf_name, const Ip4Address &ip, const MacAddress &mac, const string &nh_vrf_name, const Interface &intf, bool resolved, const uint8_t plen, bool policy, const VnListType &dest_vn_list, const SecurityGroupList &sg_list, const TagList &tag_list)
static void AddGatewayRoute(const Peer *peer, const string &vrf_name, const Ip4Address &dst_addr, uint8_t plen, const AddressList &gw_list, const VnListType &vn_name, uint32_t label, const SecurityGroupList &sg_list, const TagList &tag_list, const CommunityList &communities, bool native_encap)
IpAddress GetSubnetAddress(const IpAddress &addr, uint16_t plen) const
static void AddVlanNHRoute(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, const boost::uuids::uuid &intf_uuid, uint16_t tag, uint32_t label, const VnListType &dest_vn_list, const SecurityGroupList &sg_list_, const TagList &tag_list, const PathPreference &path_preference)
static void DeleteMplsRouteReq(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen, AgentRouteData *data)
virtual Agent::RouteTableType GetTableType() const
static void AddHostRoute(const string &vrf_name, const IpAddress &addr, uint8_t plen, const std::string &dest_vn_name, bool policy)
virtual AgentSandeshPtr GetAgentSandesh(const AgentSandeshArguments *args, const std::string &context)
void AddVlanNHRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, VlanNhRoute *data)
static void AddGatewayRouteReq(const Peer *peer, const string &vrf_name, const Ip4Address &dst_addr, uint8_t plen, const AddressList &gw_list, const VnListType &vn_name, uint32_t label, const SecurityGroupList &sg_list, const TagList &tag_list, const CommunityList &communities, bool native_encap)
void AddVhostMplsRoute(const IpAddress &vhost_addr, const Peer *peer)
static DBTableBase * CreateTable(DB *db, const std::string &name)
SecurityGroupList sg_list_
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
virtual void SetKey(const DBRequestKey *key)
virtual std::string ToString() const
virtual bool ReComputePathAdd(AgentPath *path)
bool IpamSubnetRouteAvailable() const
virtual bool DBEntrySandesh(Sandesh *sresp, bool stale) const
virtual Agent::RouteTableType GetTableType() const
InetUnicastRouteEntry(VrfEntry *vrf, const IpAddress &addr, uint8_t plen, bool is_multicast)
uint8_t prefix_length() const
!
virtual AgentPath * FindPathUsingKeyData(const AgentRouteKey *key, const AgentRouteData *data) const
virtual KeyPtr GetDBRequestKey() const
InetUnicastRouteEntry * GetIpamSuperNetRoute() const
void set_addr(IpAddress addr)
bool UpdateIpamHostFlags(bool ipam_host_route)
bool ipam_host_route() const
virtual bool ReComputePathDeletion(AgentPath *path)
bool ipam_subnet_route() const
bool UpdateRouteFlags(bool ipam_subnet_route, bool ipam_host_route, bool proxy_arp)
virtual int CompareTo(const Route &rhs) const
AgentPath * FindEvpnPathUsingKeyData(const AgentRouteKey *key, const AgentRouteData *data) const
const IpAddress & addr() const
virtual AgentRouteKey * Clone() const
virtual string ToString() const
AgentRoute * AllocRouteEntry(VrfEntry *vrf, bool is_multicast) const
const MacAddress & mac() const
virtual KeyPtr GetDBRequestKey() const =0
static const uint32_t kImplicitNullLabel
static const uint32_t kInvalidExportLabel
void Process(DBRequest &req)
bool PolicyEnabled() const
D * LPMFind(const D *data)
bool IsLess(const Peer *rhs) const
uint64_t sequence_number() const
const Interface * get_interface() const
static void CreateReq(const InterfaceKey *intf, bool policy)
const PathList & GetPathList() const
static TypeBmap AllType()
static TypeBmap NativeType()
static TypeBmap MplsType()
const string & GetName() const
AgentRouteTable * GetBridgeRouteTable() const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
VrfEntry * forwarding_vrf() const
VrfEntry * FindVrfFromName(const string &name)
InetUnicastAgentRouteTable * GetInet6UnicastRouteTable(const std::string &vrf_name)
VrfEntry * FindVrfFromId(size_t index)
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable(const std::string &vrf_name)
InetUnicastAgentRouteTable * GetInet4MplsUnicastRouteTable(const std::string &vrf_name)
static const uint32_t kInvalidvxlan_id
static void Inet6UnicastTableProcess(Agent *agent, const string &vrf_name, DBRequest &req)
static void AddVHostRecvRouteInternal(DBRequest *req, const Peer *peer, const string &vrf, const InterfaceKey &intf_key, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap)
static void Inet4MplsUnicastTableEnqueue(Agent *agent, DBRequest *req)
static void Inet4UnicastTableEnqueue(Agent *agent, DBRequest *req)
static void AddGatewayRouteInternal(const Peer *peer, DBRequest *req, const string &vrf_name, const Ip4Address &dst_addr, uint8_t plen, const AddressList &gw_list, const VnListType &vn_name, uint32_t label, const SecurityGroupList &sg_list, const TagList &tag_list, const CommunityList &communities, bool native_encap)
static void Inet4UnicastTableProcess(Agent *agent, const string &vrf_name, DBRequest &req)
static void InetUnicastTableEnqueue(Agent *agent, const string &vrf, DBRequest *req)
static void AddVHostMplsRecvRouteInternal(DBRequest *req, const Peer *peer, const string &vrf, const InterfaceKey &intf_key, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap)
static void Inet6UnicastTableEnqueue(Agent *agent, const string &vrf_name, DBRequest *req)
static void InetUnicastTableProcess(Agent *agent, const string &vrf_name, DBRequest &req)
boost::shared_ptr< const ComponentNHKey > ComponentNHKeyPtr
std::vector< ComponentNHKeyPtr > ComponentNHKeyList
const Peer * peer() const
const std::string & vrf_name() const
std::unique_ptr< DBRequestKey > key
std::unique_ptr< DBRequestData > data