5 #include <boost/uuid/uuid_io.hpp>
9 #include <boost/foreach.hpp>
27 using namespace boost::asio;
47 const std::string &name) :
50 if (name.find(
"uc.route.0") != std::string::npos) {
52 }
else if (name.find(
"uc.route.3") != std::string::npos) {
54 }
else if (name.find(
"uc.route6.0") != std::string::npos) {
56 }
else if (name.find(
"evpn.route.0") != std::string::npos) {
58 }
else if (name.find(
"l2.route.0") != std::string::npos) {
60 }
else if (name.find(
"mc.route.0") != std::string::npos) {
101 }
while (rt && --plen);
142 if (key->
addr().is_v4()) {
144 }
else if (key->
addr().is_v6()) {
170 if (key->
addr().is_v4()) {
172 }
else if (key->
addr().is_v6()) {
204 while ((lpm_rt != NULL) && (plen < lpm_rt->
prefix_length())) {
209 if (v4_parent_mask != node_mask)
216 if (v6_parent_mask != node_mask)
230 lpm_rt = GetNextNonConst(lpm_rt);
257 if (supernet_rt == NULL) {
267 (lpm_rt != NULL) && (plen < lpm_rt->prefix_length());
270 if (parent_mask != node_mask)
275 if (lpm_rt->IsHostRoute() ==
false) {
286 if (lpm_rt->GetActivePath()->dependant_rt() != supernet_rt)
293 lpm_rt->EnqueueRouteResync();
299 uint16_t plen)
const {
327 ipam_subnet_route_(false),
328 ipam_host_route_(false), proxy_arp_(false) {
338 str <<
dip_.to_string();
452 if (supernet_rt == NULL)
470 uc_rt_table->
agent()->
489 ret |= ecmp_data.
Update(
this);
501 const ArpNH *arp_nh =
524 return ecmp_data.
Update(
this);
540 bool proxy_arp = ipam_host_route ?
false :
true;
545 bool ipam_host_route,
569 assert(evpn_peer != NULL);
571 Route::PathList::const_iterator it;
572 for (it = GetPathList().begin(); it != GetPathList().end(); it++) {
582 assert(evpn_path != NULL);
583 assert(evpn_data != NULL);
595 if (inet_evpn_peer != NULL)
596 return FindEvpnPathUsingKeyData(key, data);
598 return FindPath(peer);
629 if (path->
ChangeNH(agent, nh) ==
true)
667 if (path->
ChangeNH(agent, nh) ==
true)
713 bool comp_nh_policy =
false;
720 AddressList::const_iterator ptr;
743 std::unique_ptr<const NextHopKey> nh_key_ptr(nh_key);
745 std::move(nh_key_ptr)));
746 comp_nh_list.push_back(component_nh_key);
750 if (comp_nh_list.size() ==
gw_list_.size()) {
758 FindActiveEntry(comp_key));
762 FindActiveEntry(comp_key));
771 if (agent->
is_l3mh() ==
false) {
776 path_sg_list = path->
sg_list();
794 if (agent->
is_l3mh() ==
false) {
813 path->
ChangeNH(agent, nh) ==
true) {
822 const std::string& parent,
824 AgentPath(peer, rt), mac_(mac), parent_(parent) {
845 (sync_route)->prefix_address());
847 if (parent_subnet_route != dependant_route) {
850 if (parent_subnet_route) {
884 if (r_evpn_path != NULL) {
886 return (mac_ < r_evpn_path->
MacAddr());
894 evpn_rt->is_multicast(), 0),
895 mac_(evpn_rt->mac()) {
917 if (evpn_path == NULL) {
950 if (path->
ChangeNH(agent, nh) ==
true) {
963 RouteUcSandeshData data;
969 data.set_src_vrf(
vrf()->GetName());
972 for (Route::PathList::const_iterator it =
GetPathList().begin();
976 PathSandeshData pdata;
980 pdata.set_active_tunnel_type(
"Native");
982 data.path_list.push_back(pdata);
987 Inet4UcRouteResp *v4_resp =
static_cast<Inet4UcRouteResp *
>(sresp);
988 std::vector<RouteUcSandeshData> &list =
989 const_cast<std::vector<RouteUcSandeshData>&
>(v4_resp->get_route_list());
990 list.push_back(data);
992 Inet6UcRouteResp *v6_resp =
static_cast<Inet6UcRouteResp *
>(sresp);
993 std::vector<RouteUcSandeshData> &list =
994 const_cast<std::vector<RouteUcSandeshData>&
>(v6_resp->get_route_list());
995 list.push_back(data);
1001 uint8_t plen,
bool stale)
const {
1009 void UnresolvedRoute::HandleRequest()
const {
1012 ErrorResp *resp =
new ErrorResp();
1013 resp->set_context(context());
1019 Inet4UcRouteResp *resp =
new Inet4UcRouteResp();
1024 InetUnicastAgentRouteTable::UnresolvedRouteTree::const_iterator it;
1031 resp->set_context(context()+
"$");
1034 resp =
new Inet4UcRouteResp();
1038 resp->set_context(context());
1043 void Inet4UcRouteReq::HandleRequest()
const {
1047 ErrorResp *resp =
new ErrorResp();
1048 resp->set_context(context());
1054 if (get_src_ip().empty()) {
1057 boost::system::error_code ec;
1058 Ip4Address src_ip = Ip4Address::from_string(get_src_ip(), ec);
1060 (uint8_t)get_prefix_len(),
1063 sand->DoSandesh(sand);
1066 void Inet4MplsUcRouteReq::HandleRequest()
const {
1070 ErrorResp *resp =
new ErrorResp();
1071 resp->set_context(context());
1077 if (get_src_ip().empty()) {
1080 boost::system::error_code ec;
1081 Ip4Address src_ip = Ip4Address::from_string(get_src_ip(), ec);
1083 (uint8_t)get_prefix_len(),
1086 sand->DoSandesh(sand);
1103 void Inet6UcRouteReq::HandleRequest()
const {
1107 ErrorResp *resp =
new ErrorResp();
1108 resp->set_context(context());
1114 if (get_src_ip().empty()) {
1117 boost::system::error_code ec;
1118 Ip6Address src_ip = Ip6Address::from_string(get_src_ip(), ec);
1120 (uint8_t)get_prefix_len(),
1123 sand->DoSandesh(sand);
1137 req.
data.reset(data);
1148 req.
data.reset(NULL);
1158 req.
data.reset(data);
1168 req.
data.reset(data);
1178 const std::string &dest_vn_name,
1188 data->set_policy(policy);
1189 req.
data.reset(data);
1197 const string &vm_vrf,
1203 req.
data.reset(data);
1209 const string &vm_vrf,
1222 sg_list, tag_list, path_preference,
1230 const string &vm_vrf,
1246 sg_list, tag_list, path_preference,
1253 const string &vm_vrf,
1260 req.
data.reset(data);
1267 const string &vm_vrf,
1282 bool is_health_check_service,
1284 const std::string &intf_name,
1285 bool is_learnt_route)
1291 tag_list, communities, path_preference,
1292 subnet_service_ip, ecmp_load_balance,
1293 is_local, is_health_check_service,
1295 false, native_encap);
1309 req.
data.reset(NULL);
1315 const string &vm_vrf,
1321 req.
data.reset(data);
1329 const string &vm_vrf,
1344 bool is_health_check_service,
1345 const std::string &intf_name,
1347 const std::string &intf_route_type,
1348 bool is_learnt_route)
1355 force_policy, vn_list,
1357 communities, path_preference,
1359 ecmp_load_balance, is_local,
1360 is_health_check_service,
1369 const string &vm_vrf,
1377 req.
data.reset(data);
1384 const string &nexthop_vrf_name,
1390 ArpNHKey key(route_vrf_name, ip, policy);
1395 nh_req.
key.reset(
new ArpNHKey(route_vrf_name, ip, policy));
1402 route_vrf_name, ip, 32));
1404 vn_list, sg_list, tag_list));
1410 const string &route_vrf_name,
1413 const string &nexthop_vrf_name,
1431 nh_req.
key.reset(nh_key);
1435 nh_req.
data.reset(arp_data);
1453 GetInet4UnicastRouteTable()->Find(rt_key));
1454 assert(resolved==
false);
1472 rt_req.
key.reset(rt_key);
1473 rt_req.
data.reset(data);
1479 const string &route_vrf_name,
1482 const string &nexthop_vrf_name,
1500 nh_req.
key.reset(nh_key);
1504 nh_req.
data.reset(ndp_data);
1522 GetInet6UnicastRouteTable()->Find(rt_key));
1523 assert(resolved==
false);
1541 rt_req.
key.reset(rt_key);
1542 rt_req.
data.reset(data);
1570 std::string nexthop_vrf = intf->
vrf()->
GetName();
1575 nexthop_vrf, *intf, resolved, 32,
false, vn_list, sg, tag);
1589 std::string nexthop_vrf = intf->
vrf()->
GetName();
1593 AddArpReq(vrf_name, ip, nexthop_vrf, intf,
false, vn_list, sg, tag);
1597 const string &vrf_name,
1601 const uint32_t label,
1603 const std::string &vn_name,
1613 req.
data.reset(
new ResolveRoute(&intf, policy, label, vn_name, sg_list, tag_list));
1620 const string &vm_vrf,
1623 const string &interface,
1635 const string &vm_vrf,
1641 req.
data.reset(data);
1650 const string &vn_name,
bool policy,
1651 bool native_encap) {
1661 tunnel_bmap, policy, vn_name));
1668 const string &vn_name,
bool policy,
1669 bool native_encap) {
1679 tunnel_bmap, policy, vn_name));
1683 const IpAddress &addr, uint8_t plen,
const string &vn_name,
bool policy,
1684 bool native_encap) {
1687 vn_name, policy, native_encap);
1695 const string &vn_name,
1696 bool policy,
bool native_encap,
bool ipam_host_route) {
1699 vn_name, policy, native_encap);
1701 static_cast<ReceiveRoute *
>(req.
data.get())->SetIpamHostRoute(ipam_host_route);
1704 }
else if (addr.is_v6()) {
1711 const IpAddress &addr, uint8_t plen,
const string &vn_name,
bool policy,
1712 bool native_encap) {
1715 vn_name, policy, native_encap);
1720 }
else if (addr.is_v6()) {
1731 const string &vn_name,
1735 vn_name, policy,
true);
1742 const string &vn_name) {
1767 bool native_encap) {
1770 vrf_name, dst_addr, plen));
1772 vn_name, label, sg_list,
1773 tag_list, communities,
1778 const string &vrf_name,
1790 bool native_encap) {
1793 label, sg_list, tag_list, communities, native_encap);
1799 const string &vrf_name,
1811 bool native_encap) {
1814 vn_list, label, sg_list, tag_list, communities,
1821 const string &vrf_name,
1827 req.
data.reset(data);
1834 const string &vn_name) {
1837 if (dst_addr.is_v4()) {
1839 }
else if (dst_addr.is_v6()) {
1846 dscd_nh_req.
data.reset(NULL);
1862 if (!dst_addr.is_v4()) {
1871 vn_list.insert(
agent()->fabric_vn_name());
1882 if (!vhost_addr.is_v4()) {
1890 agent()->vhost_interface_name());
1892 32,
agent()->fabric_vn_name(),
false,
false);
1895 if (ip_addr.is_v4()) {
1904 const string &vrf_name,
1908 const string &vn_name) {
1925 if (ip_addr.is_unspecified())
1931 const uint32_t plen = evpn_route->
IsType5() ?
1951 const uint32_t plen = evpn_route->
IsType5() ?
1973 const std::string& origin_vn) {
InetUnicastRouteEntry * GetNextNonConst(const InetUnicastRouteEntry *rt)
SecurityGroupList sg_list_
uint8_t prefix_length() const
!
static void DeleteMplsRouteReq(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen, AgentRouteData *data)
static void Inet6UnicastTableEnqueue(Agent *agent, const string &vrf_name, DBRequest *req)
const VnListType & dest_vn_list() const
void set_communities(const CommunityList &communities)
static void InetUnicastTableProcess(Agent *agent, const string &vrf_name, DBRequest &req)
bool ChangeNH(Agent *agent, NextHop *nh)
virtual Agent::RouteTableType GetTableType() const
void set_gw_ip(const IpAddress &addr)
bool ResyncSubnetRoutes(const InetUnicastRouteEntry *rt, bool val)
void set_unresolved(bool unresolved)
const std::string & vrf_name() const
static Agent * GetInstance()
static const uint8_t kMaxV6PrefixLen
virtual int CompareTo(const Route &rhs) const
bool IsTunnelNHListEmpty()
static void CreateReq(const InterfaceKey *intf, bool policy)
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 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)
const TagList & tag_list() const
static void Inet4UnicastTableEnqueue(Agent *agent, DBRequest *req)
InetUnicastRouteEntry * FindLPM(const IpAddress &ip)
void AddLocalVmRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, LocalVmRoute *data)
InetUnicastAgentRouteTable(DB *db, const std::string &name)
const MacAddress & MacAddr() const
static void DelVHostSubnetRecvRoute(const string &vm_vrf, const Ip4Address &addr, uint8_t plen)
VrfEntry * FindVrfFromName(const string &name)
InetUnicastAgentRouteTable * fabric_inet4_unicast_table() const
NextHopTable * nexthop_table() const
DBTableBase * get_table() const
bool ipam_subnet_route() const
const MacAddress & GetMac() const
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)
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 bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
bool IsIp4SubnetMember(const Ip4Address &ip, const Ip4Address &prefix_ip, uint16_t plen)
void ClearDependantRoute()
void set_sg_list(const SecurityGroupList &sg)
Agent::RouteTableType type_
AgentRoute * AllocRouteEntry(VrfEntry *vrf, bool is_multicast) const
const std::string & intf_route_type() const
UnresolvedRouteTree::const_iterator unresolved_route_end() const
boost::asio::ip::address IpAddress
virtual bool IsLess(const AgentPath &rhs) const
void EvaluateUnresolvedRoutes(void)
std::vector< int > SecurityGroupList
static const uint32_t kInvalidExportLabel
InetEvpnRouteData(const EvpnRouteEntry *evpn_rt)
bool is_multicast() const
std::unique_ptr< DBRequestData > data
InetUnicastAgentRouteTable * fabric_inet4_mpls_table() const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
virtual AgentPath * CreateAgentPath(const Peer *peer, AgentRoute *rt) const
AgentDBEntry * FindActiveEntry(const DBEntry *key)
InterfaceTable * interface_table() const
bool Enqueue(DBRequest *req)
static TypeBmap MplsType()
static const uint8_t kMaxV4PrefixLen
const AgentRoute * dependant_rt() const
InetUnicastRouteEntry * FindRoute(const IpAddress &ip)
void set_prefix_length(uint8_t new_plen)
Sets the length of a stored prefix address.
boost::shared_ptr< const ComponentNHKey > ComponentNHKeyPtr
const string & GetName() const
const MacAddress & mac() const
virtual bool CanDeletePath(Agent *agent, AgentPath *path, const AgentRoute *rt) const
bool IsLess(const Peer *rhs) const
virtual const NextHop * ComputeNextHop(Agent *agent) const
virtual bool ReComputePathDeletion(AgentPath *path)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
static Ip4Address GetIp4SubnetAddress(const Ip4Address &prefix, uint16_t plen)
std::unique_ptr< DBRequestKey > KeyPtr
Base class for all Route entries in agent.
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 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)
void DeleteEvpnRoute(const AgentRoute *rt)
std::vector< ComponentNHKeyPtr > ComponentNHKeyList
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable(const std::string &vrf_name)
virtual KeyPtr GetDBRequestKey() const
static Ip6Address GetIp6SubnetAddress(const Ip6Address &prefix, uint16_t plen)
void AddEvpnRoute(const AgentRoute *evpn_entry)
const CommunityList communities_
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)
virtual bool DBEntrySandesh(Sandesh *sresp, bool stale) const =0
const MacAddress & MacAddr() const
const std::string & fabric_vrf_name() const
void AddVrouterSubnetRoute(const IpAddress &dst_addr, uint8_t plen)
virtual bool Sync(AgentRoute *sync_route)
void AddClonedLocalPathReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, ClonedLocalPath *data)
void set_tunnel_bmap(TunnelType::TypeBmap bmap)
const AgentPath * GetActivePath() const
NextHop * nexthop() const
VrfEntry * vrf_entry() const
IpAddress prefix_address_
The prefix address.
InetUnicastRouteEntry(VrfEntry *vrf, const IpAddress &addr, uint8_t plen, bool is_multicast)
void SetVrf(VrfEntry *vrf)
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="")
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
VrfEntry * FindVrfFromId(size_t index)
static const uint32_t kInvalidvxlan_id
virtual AgentRouteKey * Clone() const
IpAddress GetSubnetAddress(const IpAddress &addr, uint16_t plen) const
void AddIpamSubnetRoute(const string &vm_vrf, const IpAddress &addr, uint8_t plen, const std::string &vn_name)
void AddVhostMplsRoute(const IpAddress &vhost_addr, const Peer *peer)
const SecurityGroupList sg_list_
bool UpdateRouteFlags(bool ipam_subnet_route, bool ipam_host_route, bool proxy_arp)
bool IpamSubnetRouteAvailable() const
static void Inet4UnicastTableProcess(Agent *agent, const string &vrf_name, DBRequest &req)
const NextHop * GetActiveNextHop() const
bool is_subnet_discard() const
boost::asio::ip::address_v6 Ip6Address
Ip4Address router_id() const
void set_vrf_name(const std::string &vrf_name)
InetUnicastAgentRouteTable * GetInet4MplsUnicastRouteTable(const std::string &vrf_name)
std::unique_ptr< DBRequestKey > key
static void AddMplsRouteReq(const Peer *peer, const string &vrf_name, const IpAddress &dst_addr, uint8_t plen, AgentRouteData *data)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
Inet4UnicastInterfaceRoute(const PhysicalInterface *intrface, const std::string &vn_name)
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 Inet4MplsUnicastTableEnqueue(Agent *agent, DBRequest *req)
static TypeBmap AllType()
const Peer * peer() const
uint64_t sequence_number() const
bool ipam_host_route() const
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)
AgentRouteTable * GetBridgeRouteTable() const
const Peer * local_peer() const
const bool unresolved() const
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
void ResetDependantRoute(AgentRoute *rt)
std::vector< std::string > CommunityList
void SetSandeshData(PathSandeshData &data) const
std::vector< Ip4Address > AddressList
D * LPMFind(const D *data)
void TraverseHostRoutesInSubnet(InetUnicastRouteEntry *rt, const Peer *peer)
AgentPath * FindEvpnPathUsingKeyData(const AgentRouteKey *key, const AgentRouteData *data) const
void ResyncRoute(const Peer *peer, const string &vrf, const IpAddress &addr, uint8_t plen)
virtual Agent::RouteTableType GetTableType() const
std::set< std::string > VnListType
static void DeleteReq(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen, AgentRouteData *data)
static void AddDropRoute(const string &vm_vrf, const Ip4Address &addr, uint8_t plen, const string &vn_name)
static DBTableBase * CreateTable(DB *db, const std::string &name)
InetUnicastRouteEntry * GetSuperNetRoute(const IpAddress &addr)
virtual KeyPtr GetDBRequestKey() const =0
static TypeBmap NativeType()
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
boost::asio::ip::address_v4 Ip4Address
SecurityGroupList sg_list_
VrfTable * vrf_table() const
virtual KeyPtr GetDBRequestKey() const =0
static const uint32_t kImplicitNullLabel
void AddVlanNHRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, VlanNhRoute *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 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 CheckAndAddArpReq(const string &vrf_name, const Ip4Address &ip, const Interface *intf, const VnListType &vn_list, const SecurityGroupList &sg, const TagList &tag)
static void Inet6UnicastTableProcess(Agent *agent, const string &vrf_name, DBRequest &req)
void set_addr(IpAddress addr)
virtual bool ReComputePathAdd(AgentPath *path)
uint8_t prefix_length() const
!
void set_tag_list(const TagList &tag)
static void InetUnicastTableEnqueue(Agent *agent, const string &vrf, DBRequest *req)
void set_nexthop(NextHop *nh)
uint8_t GetHostPlen(const IpAddress &ip_addr) const
bool Update(AgentRoute *rt)
InetUnicastRouteEntry * GetIpamSuperNetRoute() const
const std::string & GetHostInterfaceName() const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
InetEvpnRoutePath(const Peer *peer, const MacAddress &mac, const std::string &parent, AgentRoute *rt)
void Process(DBRequest &req)
void DeleteMacVmBindingRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *vm_intf)
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)
void UpdateDependantRoutes()
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)
virtual AgentPath * FindPathUsingKeyData(const AgentRouteKey *key, const AgentRouteData *data) const
const Peer * peer() const
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)
const std::string & vrf_name() const
void AddInetInterfaceRouteReq(const Peer *peer, const string &vm_vrf, const Ip4Address &addr, uint8_t plen, InetInterfaceRoute *data)
VrfEntry * forwarding_vrf() const
virtual AgentSandeshPtr GetAgentSandesh(const AgentSandeshArguments *args, const std::string &context)
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)
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)
void set_label(uint32_t label)
bool SyncDependantRoute(const AgentRoute *sync_route)
void Process(DBRequest &req)
const std::string & name() const
const Interface * get_interface() const
virtual std::string ToString() const
static bool ShouldAddArp(const Ip4Address &ip)
const Peer * inet_evpn_peer() const
bool PolicyEnabled() const
void set_dest_vn_list(const VnListType &dest_vn_list)
virtual const NextHop * ComputeNextHop(Agent *agent) const
UnresolvedRouteTree::const_iterator unresolved_route_begin() const
virtual AgentRouteKey * Clone() const
virtual string ToString() const
const Peer * fabric_rt_export_peer() const
bool UpdateIpamHostFlags(bool ipam_host_route)
virtual std::string ToString() const
const IpAddress & addr() const
uint32_t tunnel_bmap() const
const std::string & fabric_vn_name() const
void AddMacVmBindingRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const VmInterface *vm_intf, bool flood_dhcp)
bool IsDependantRouteEmpty()
const CommunityList & communities() const
static void AddRemoteVmRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &vm_addr, uint8_t plen, AgentRouteData *data)
InetUnicastAgentRouteTable * GetInet6UnicastRouteTable(const std::string &vrf_name)
virtual void SetKey(const DBRequestKey *key)
static void AddHostRoute(const string &vrf_name, const IpAddress &addr, uint8_t plen, const std::string &dest_vn_name, bool policy)
InetUnicastRouteEntry * FindResolveRoute(const Ip4Address &ip)
InetUnicastRouteEntry * FindRouteUsingKey(InetUnicastRouteEntry &key)
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)
const SecurityGroupList & sg_list() const
virtual const AgentPath * UsablePath() const
virtual bool DBEntrySandesh(Sandesh *sresp, bool stale) const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const Peer * evpn_routing_peer() const
This class defines interfaces for manipulating the prefix of a route stored in an Agent VRF table...
const PathList & GetPathList() const
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)
std::vector< int > TagList
std::unique_ptr< InterfaceKey > interface_key_