5 #ifndef vnsw_agent_ndp_entry_hpp
6 #define vnsw_agent_ndp_entry_hpp
10 #include <boost/statechart/state_machine.hpp>
11 #include <netinet/icmp6.h>
14 namespace sc = boost::statechart;
37 class NdpEntry :
public sc::state_machine<NdpEntry, fsm::NoState> {
43 typedef boost::function<void(
void)>
EventCB;
69 boost::intrusive_ptr<const sc::event_base>
event;
93 const std::string &reason);
95 const std::string &reason);
97 void LogEvent(std::string event_name, std::string msg,
112 template <
typename Ev>
bool Enqueue(
const Ev &event);
153 boost::asio::io_context &
io_;
boost::asio::ip::address_v6 Ip6Address
boost::intrusive_ptr< const Interface > InterfaceConstRef
std::vector< int > TagList
std::vector< int > SecurityGroupList
std::set< std::string > VnListType
boost::function< void(void)> EventCB
bool EnqueueReachableTimerExpired()
void SendNeighborSolicit(bool send_unicast=false)
void set_last_event(const std::string &event)
NdpEntry(boost::asio::io_context &io, Icmpv6Handler *handler, NdpKey &key, const VrfEntry *vrf, const Interface *itf)
void StartRetransmitTimer()
int reachable_time() const
const uint64_t last_state_change_usecs_at() const
void AddNdpRoute(bool resolved)
std::pair< int, int > last_notification_out_
const std::string & LastStateName() const
bool EnqueueTestStateChange(State state, int retry_count)
bool EnqueueUnsolNaIn(nd_neighbor_advert *na, MacAddress mac)
std::string last_notification_in_error_
void set_mac(MacAddress mac)
InterfaceConstRef interface_
bool DequeueEvent(EventContainer ec)
Timer * retransmit_timer()
int retransmit_time() const
std::pair< int, int > last_notification_in_
uint64_t last_notification_in_at_
const std::string last_state_change_at() const
void set_retransmit_time(int t)
void DequeueEventDone(bool done)
const std::string & last_event() const
void retry_count_set(int rc)
bool EnqueueNsIn(nd_neighbor_solicit *ns, MacAddress mac)
std::string last_notification_out_error_
boost::intrusive_ptr< Icmpv6Handler > handler_
bool RetransmitTimerExpired()
static const int kMaxUnicastRetries
uint64_t last_notification_out_at_
bool Enqueue(const Ev &event)
void set_last_notification_out(int code, int subcode, const std::string &reason)
bool ReachableTimerExpired()
WorkQueue< EventContainer > work_queue_
DISALLOW_COPY_AND_ASSIGN(NdpEntry)
void HandleNsRequest(nd_neighbor_solicit *ns, MacAddress mac)
const NdpKey & key() const
void LogEvent(std::string event_name, std::string msg, SandeshLevel::type log_level=SandeshLevel::SYS_DEBUG)
Timer * reachable_timer()
void SendNeighborAdvert(bool solicited)
static const int kMaxRetries
bool EnqueueRetransmitTimerExpired()
void StartReachableTimer()
bool EnqueueDelayTimerExpired()
boost::asio::io_context & io_
void set_reachable_time(int t)
bool EnqueueSolNaIn(nd_neighbor_advert *na, MacAddress mac)
bool EnqueueNaIn(nd_neighbor_advert *na, MacAddress mac)
Timer * retransmit_timer_
void set_state(State state)
uint64_t last_state_change_at_
void set_last_notification_in(int code, int subcode, const std::string &reason)
const std::string & StateName() const
void Resync(bool policy, const VnListType &vnlist, const SecurityGroupList &sg, const TagList &tag)
const Interface * get_interface() const
boost::function< bool(NdpEntry *)> EvValidate
boost::function< bool(StateMachine *)> EvValidate
boost::intrusive_ptr< const sc::event_base > event
bool operator<(const NdpKey &rhs) const
NdpKey(const NdpKey &key)
NdpKey(Ip6Address addr, const VrfEntry *ventry)