14 : io_(
io), key_(key), nh_vrf_(vrf), state_(state), retry_count_(0),
15 handler_(handler), arp_timer_(NULL), interface_(itf) {
94 if (retry_count_ < arp_proto->max_retries()) {
98 std::vector<Ip4Address> gateway_list =
99 handler_->agent()->vhost_default_gateway();
101 if (std::find(gateway_list.begin(), gateway_list.end(), ip) !=
102 gateway_list.end()) {
125 ArpNHKey nh_key(vrf_name, ip,
false);
127 FindActiveEntry(&nh_key));
150 if (!gw_ip.is_unspecified() && gw_ip.is_v4()) {
151 handler_->SendArp(ARPOP_REQUEST, smac,
152 gw_ip.to_v4().to_ulong(),
153 smac, vmi->
vm_mac(), gw_ip.to_v4().to_ulong(),
156 if (!dns_ip.is_unspecified() && dns_ip.is_v4() &&
158 handler_->SendArp(ARPOP_REQUEST, smac,
159 dns_ip.to_v4().to_ulong(),
160 smac, vmi->
vm_mac(), dns_ip.to_v4().to_ulong(),
217 if (agent->
is_l3mh() ==
true) {
232 handler_->SendArp(ARPOP_REQUEST, smac, ip.to_ulong(),
250 FindActiveEntry(&nh_key));
261 handler_->agent()->local_peer(), vrf_name, ip, 32);
263 FindActiveEntry(rt_key);
295 for (InterfaceList::size_type i = 0; i != vintf->
parent_list().size(); i++) {
297 handler_->agent()->fabric_inet4_unicast_table()->ArpRoute(
306 handler_->agent()->fabric_inet4_unicast_table()->ArpRoute(
321 FindActiveEntry(&nh_key));
334 handler_->agent()->fabric_inet4_unicast_table()->ArpRoute(
348 handler_->agent()->fabric_inet4_unicast_table()->ArpRoute(
351 32, policy, vnlist, sg, tag);
boost::asio::ip::address IpAddress
boost::asio::ip::address_v4 Ip4Address
std::vector< int > TagList
std::vector< int > SecurityGroupList
std::set< std::string > VnListType
#define ARP_TRACE(obj,...)
const VnListType & dest_vn_list() const
const SecurityGroupList & sg_list() const
const TagList & tag_list() const
Base class for all Route entries in agent.
const AgentPath * GetActivePath() const
const NextHop * GetActiveNextHop() const
static const std::set< std::string > & NullStringList()
VrfTable * vrf_table() const
bool router_id_configured()
ArpProto * GetArpProto() const
AddressList ip_fabric_intf_addr_list() const
const std::string & fabric_vrf_name() const
Ip4Address router_id() const
InterfaceConstRef interface_
void AddArpRoute(bool resolved)
void StartTimer(uint32_t timeout, uint32_t mtype)
const ArpKey & key() const
boost::asio::io_context & io_
ArpEntry(boost::asio::io_context &io, ArpHandler *handler, ArpKey &key, const VrfEntry *vrf, State state, const Interface *itf)
void HandleDerivedArpRequest()
void Resync(bool policy, const VnListType &vnlist, const SecurityGroupList &sg, const TagList &tag)
void HandleArpReply(const MacAddress &)
const MacAddress & mac_address() const
boost::intrusive_ptr< ArpHandler > handler_
bool GetResolveState() const
const MacAddress & GetMac() const
bool AddArpEntry(ArpEntry *entry)
uint32_t aging_timeout() const
uint32_t ip_fabric_interface_index() const
void IncrementStatsMaxRetries()
bool TimerExpiry(ArpKey &key, uint32_t timer_type, const Interface *itf)
static const uint32_t kGratRetryTimeout
void IncrementStatsResolved()
ArpEntry * FindArpEntry(const ArpKey &key)
@ GRATUITOUS_TIMER_EXPIRED
const MacAddress & ip_fabric_interface_mac() const
uint32_t retry_timeout() const
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
InetUnicastRouteEntry * FindLPM(const IpAddress &ip)
const uint32_t id() const
std::string ToString() const
int CompareTo(const MacAddress &rhs, int len=0) const
static const MacAddress & BroadcastMac()
bool PolicyEnabled() const
static TaskScheduler * GetInstance()
static bool DeleteTimer(Timer *Timer)
static Timer * CreateTimer(boost::asio::io_context &service, const std::string &name, int task_id=Timer::GetTimerTaskId(), int task_instance=Timer::GetTimerInstanceId(), bool delete_on_completion=false)
bool Start(int time, Handler handler, ErrorHandler error_handler=NULL)
VmInterface::VmiType vmi_type() const
const Interface * parent() const
IpAddress GetServiceIp(const IpAddress &ip) const
const MacAddress & GetVifMac(const Agent *) const
const MacAddress & vm_mac() const
InterfaceList parent_list() const
IpAddress GetGatewayFromIpam(const IpAddress &ip) const
IpAddress GetDnsFromIpam(const IpAddress &ip) const
const string & GetName() const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
static const uint32_t kInvalidIndex
const uint32_t vrf_id() const
VrfEntry * FindVrfFromName(const string &name)
static string ToString(PhysicalDevice::ManagementProtocol proto)