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_;
161 #endif // vnsw_agent_ndp_entry_hpp
bool EnqueueDelayTimerExpired()
boost::intrusive_ptr< Icmpv6Handler > handler_
uint64_t last_notification_in_at_
const std::string & LastStateName() const
std::pair< int, int > last_notification_out_
std::string last_notification_in_error_
WorkQueue< EventContainer > work_queue_
DISALLOW_COPY_AND_ASSIGN(NdpEntry)
void SendNeighborSolicit(bool send_unicast=false)
int retransmit_time() const
uint64_t last_notification_out_at_
std::vector< int > SecurityGroupList
void StartReachableTimer()
boost::asio::io_context & io_
NdpEntry(boost::asio::io_context &io, Icmpv6Handler *handler, NdpKey &key, const VrfEntry *vrf, const Interface *itf)
std::string last_notification_out_error_
const std::string last_state_change_at() const
bool RetransmitTimerExpired()
boost::function< void(void)> EventCB
void set_mac(MacAddress mac)
void set_last_notification_out(int code, int subcode, const std::string &reason)
int reachable_time() const
bool operator<(const NdpKey &rhs) const
void Resync(bool policy, const VnListType &vnlist, const SecurityGroupList &sg, const TagList &tag)
NdpKey(const NdpKey &key)
bool EnqueueUnsolNaIn(nd_neighbor_advert *na, MacAddress mac)
static const int kMaxRetries
boost::function< bool(StateMachine *)> EvValidate
Timer * reachable_timer()
void AddNdpRoute(bool resolved)
bool EnqueueNsIn(nd_neighbor_solicit *ns, MacAddress mac)
bool Enqueue(const Ev &event)
bool EnqueueRetransmitTimerExpired()
void StartRetransmitTimer()
boost::asio::ip::address_v6 Ip6Address
void set_state(State state)
bool EnqueueReachableTimerExpired()
boost::intrusive_ptr< const Interface > InterfaceConstRef
const Interface * get_interface() const
NdpKey(Ip6Address addr, const VrfEntry *ventry)
void SendNeighborAdvert(bool solicited)
bool EnqueueTestStateChange(State state, int retry_count)
uint64_t last_state_change_at_
std::set< std::string > VnListType
bool DequeueEvent(EventContainer ec)
const std::string & last_event() const
bool EnqueueSolNaIn(nd_neighbor_advert *na, MacAddress mac)
void HandleNsRequest(nd_neighbor_solicit *ns, MacAddress mac)
void set_last_event(const std::string &event)
void retry_count_set(int rc)
static const int kMaxUnicastRetries
void set_retransmit_time(int t)
Timer * retransmit_timer()
std::pair< int, int > last_notification_in_
const uint64_t last_state_change_usecs_at() const
boost::intrusive_ptr< const sc::event_base > event
InterfaceConstRef interface_
const NdpKey & key() const
Timer * retransmit_timer_
void LogEvent(std::string event_name, std::string msg, SandeshLevel::type log_level=SandeshLevel::SYS_DEBUG)
void set_last_notification_in(int code, int subcode, const std::string &reason)
void DequeueEventDone(bool done)
bool ReachableTimerExpired()
bool EnqueueNaIn(nd_neighbor_advert *na, MacAddress mac)
const std::string & StateName() const
void set_reachable_time(int t)
std::vector< int > TagList