OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NdpEntry Class Reference

#include <ndp_entry.h>

Inheritance diagram for NdpEntry:
Collaboration diagram for NdpEntry:

Classes

struct  EventContainer
 

Public Types

enum  State {
  NOSTATE = 0, INCOMPLETE = 1, REACHABLE = 2, STALE = 3,
  DELAY = 4, PROBE = 5
}
 
typedef boost::function< void(void)> EventCB
 

Public Member Functions

 NdpEntry (boost::asio::io_context &io, Icmpv6Handler *handler, NdpKey &key, const VrfEntry *vrf, const Interface *itf)
 
virtual ~NdpEntry ()
 
const NdpKeykey () const
 
const Interfaceget_interface () const
 
void StartRetransmitTimer ()
 
void StartReachableTimer ()
 
void StartDelayTimer ()
 
void DeleteAllTimers ()
 
const std::string & StateName () const
 
const std::string & LastStateName () const
 
int retry_count () const
 
void retry_count_inc ()
 
void retry_count_clear ()
 
void retry_count_set (int rc)
 
int retransmit_time () const
 
void set_retransmit_time (int t)
 
int reachable_time () const
 
void set_reachable_time (int t)
 
void set_state (State state)
 
State get_state () const
 
const std::string last_state_change_at () const
 
const uint64_t last_state_change_usecs_at () const
 
void set_last_event (const std::string &event)
 
const std::string & last_event () const
 
MacAddress mac () const
 
void set_mac (MacAddress mac)
 
void set_last_notification_in (int code, int subcode, const std::string &reason)
 
void set_last_notification_out (int code, int subcode, const std::string &reason)
 
void reset_last_info ()
 
void LogEvent (std::string event_name, std::string msg, SandeshLevel::type log_level=SandeshLevel::SYS_DEBUG)
 
bool RetransmitTimerExpired ()
 
bool ReachableTimerExpired ()
 
bool DelayTimerExpired ()
 
bool EnqueuePktOut ()
 
bool EnqueueTestStateChange (State state, int retry_count)
 
bool EnqueueRetransmitTimerExpired ()
 
bool EnqueueReachableTimerExpired ()
 
bool EnqueueDelayTimerExpired ()
 
bool EnqueueNaIn (nd_neighbor_advert *na, MacAddress mac)
 
bool EnqueueSolNaIn (nd_neighbor_advert *na, MacAddress mac)
 
bool EnqueueUnsolNaIn (nd_neighbor_advert *na, MacAddress mac)
 
bool EnqueueNsIn (nd_neighbor_solicit *ns, MacAddress mac)
 
template<typename Ev >
bool Enqueue (const Ev &event)
 
bool DequeueEvent (EventContainer ec)
 
void DequeueEventDone (bool done)
 
void UpdateFlapCount ()
 
Timerretransmit_timer ()
 
Timerreachable_timer ()
 
Timerdelay_timer ()
 
bool DeleteNdpRoute ()
 
bool IsResolved ()
 
void Resync (bool policy, const VnListType &vnlist, const SecurityGroupList &sg, const TagList &tag)
 
void HandleNsRequest (nd_neighbor_solicit *ns, MacAddress mac)
 
void SendNeighborSolicit (bool send_unicast=false)
 
void SendNeighborAdvert (bool solicited)
 

Static Public Attributes

static const int kMaxRetries = 3
 
static const int kMaxUnicastRetries = 3
 

Private Member Functions

void AddNdpRoute (bool resolved)
 
bool IsDerived ()
 
 DISALLOW_COPY_AND_ASSIGN (NdpEntry)
 

Private Attributes

WorkQueue< EventContainerwork_queue_
 
Timerdelay_timer_
 
Timerretransmit_timer_
 
Timerreachable_timer_
 
int retransmit_time_
 
int delay_time_
 
int reachable_time_
 
int retry_count_
 
bool deleted_
 
State state_
 
State last_state_
 
MacAddress mac_
 
std::string last_event_
 
uint64_t last_event_at_
 
uint64_t last_state_change_at_
 
std::pair< int, int > last_notification_in_
 
std::string last_notification_in_error_
 
uint64_t last_notification_in_at_
 
std::pair< int, int > last_notification_out_
 
std::string last_notification_out_error_
 
uint64_t last_notification_out_at_
 
boost::asio::io_context & io_
 
NdpKey key_
 
const VrfEntrynh_vrf_
 
boost::intrusive_ptr
< Icmpv6Handler
handler_
 
InterfaceConstRef interface_
 

Detailed Description

Definition at line 37 of file ndp_entry.h.

Member Typedef Documentation

typedef boost::function<void(void)> NdpEntry::EventCB

Definition at line 43 of file ndp_entry.h.

Member Enumeration Documentation

Enumerator
NOSTATE 
INCOMPLETE 
REACHABLE 
STALE 
DELAY 
PROBE 

Definition at line 48 of file ndp_entry.h.

Constructor & Destructor Documentation

NdpEntry::NdpEntry ( boost::asio::io_context &  io,
Icmpv6Handler handler,
NdpKey key,
const VrfEntry vrf,
const Interface itf 
)

Definition at line 619 of file ndp_entry.cc.

NdpEntry::~NdpEntry ( )
virtual

Definition at line 647 of file ndp_entry.cc.

Here is the call graph for this function:

Member Function Documentation

void NdpEntry::AddNdpRoute ( bool  resolved)
private

Definition at line 943 of file ndp_entry.cc.

Here is the call graph for this function:

Timer* NdpEntry::delay_timer ( )
inline

Definition at line 118 of file ndp_entry.h.

bool NdpEntry::DelayTimerExpired ( )

Definition at line 699 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::DeleteAllTimers ( )

Definition at line 655 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::DeleteNdpRoute ( )

Definition at line 1005 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::DequeueEvent ( NdpEntry::EventContainer  ec)

Definition at line 814 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::DequeueEventDone ( bool  done)

Definition at line 827 of file ndp_entry.cc.

NdpEntry::DISALLOW_COPY_AND_ASSIGN ( NdpEntry  )
private
template<typename Ev >
bool NdpEntry::Enqueue ( const Ev &  event)

Definition at line 798 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueDelayTimerExpired ( )

Definition at line 712 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueNaIn ( nd_neighbor_advert *  na,
MacAddress  mac 
)

Definition at line 720 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueNsIn ( nd_neighbor_solicit *  ns,
MacAddress  mac 
)

Definition at line 716 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueuePktOut ( )

Definition at line 704 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueReachableTimerExpired ( )
bool NdpEntry::EnqueueRetransmitTimerExpired ( )

Definition at line 708 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueSolNaIn ( nd_neighbor_advert *  na,
MacAddress  mac 
)

Definition at line 734 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueTestStateChange ( State  state,
int  retry_count 
)

Definition at line 739 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::EnqueueUnsolNaIn ( nd_neighbor_advert *  na,
MacAddress  mac 
)

Definition at line 729 of file ndp_entry.cc.

Here is the call graph for this function:

const Interface* NdpEntry::get_interface ( ) const
inline

Definition at line 58 of file ndp_entry.h.

State NdpEntry::get_state ( ) const
inline

Definition at line 84 of file ndp_entry.h.

void NdpEntry::HandleNsRequest ( nd_neighbor_solicit *  ns,
MacAddress  mac 
)

Definition at line 934 of file ndp_entry.cc.

Here is the call graph for this function:

bool NdpEntry::IsDerived ( )
private

Definition at line 877 of file ndp_entry.cc.

bool NdpEntry::IsResolved ( )

Definition at line 872 of file ndp_entry.cc.

Here is the call graph for this function:

const NdpKey& NdpEntry::key ( ) const
inline

Definition at line 57 of file ndp_entry.h.

const std::string& NdpEntry::last_event ( ) const
inline

Definition at line 88 of file ndp_entry.h.

const string NdpEntry::last_state_change_at ( ) const

Definition at line 761 of file ndp_entry.cc.

Here is the call graph for this function:

const uint64_t NdpEntry::last_state_change_usecs_at ( ) const

Definition at line 765 of file ndp_entry.cc.

const string & NdpEntry::LastStateName ( ) const

Definition at line 757 of file ndp_entry.cc.

void NdpEntry::LogEvent ( std::string  event_name,
std::string  msg,
SandeshLevel::type  log_level = SandeshLevel::SYS_DEBUG 
)

Definition at line 809 of file ndp_entry.cc.

Here is the call graph for this function:

MacAddress NdpEntry::mac ( void  ) const
inline

Definition at line 89 of file ndp_entry.h.

int NdpEntry::reachable_time ( ) const
inline

Definition at line 80 of file ndp_entry.h.

Timer* NdpEntry::reachable_timer ( )
inline

Definition at line 117 of file ndp_entry.h.

bool NdpEntry::ReachableTimerExpired ( )

Definition at line 679 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::reset_last_info ( )

Definition at line 859 of file ndp_entry.cc.

void NdpEntry::Resync ( bool  policy,
const VnListType vnlist,
const SecurityGroupList sg,
const TagList tag 
)

Definition at line 1033 of file ndp_entry.cc.

Here is the call graph for this function:

int NdpEntry::retransmit_time ( ) const
inline

Definition at line 78 of file ndp_entry.h.

Timer* NdpEntry::retransmit_timer ( )
inline

Definition at line 116 of file ndp_entry.h.

bool NdpEntry::RetransmitTimerExpired ( )

Definition at line 694 of file ndp_entry.cc.

Here is the call graph for this function:

int NdpEntry::retry_count ( ) const
inline

Definition at line 73 of file ndp_entry.h.

void NdpEntry::retry_count_clear ( )
inline

Definition at line 75 of file ndp_entry.h.

void NdpEntry::retry_count_inc ( )
inline

Definition at line 74 of file ndp_entry.h.

void NdpEntry::retry_count_set ( int  rc)
inline

Definition at line 76 of file ndp_entry.h.

void NdpEntry::SendNeighborAdvert ( bool  solicited)

Definition at line 899 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::SendNeighborSolicit ( bool  send_unicast = false)

Definition at line 885 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::set_last_event ( const std::string &  event)

Definition at line 830 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::set_last_notification_in ( int  code,
int  subcode,
const std::string &  reason 
)

Definition at line 843 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::set_last_notification_out ( int  code,
int  subcode,
const std::string &  reason 
)

Definition at line 835 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::set_mac ( MacAddress  mac)
inline

Definition at line 90 of file ndp_entry.h.

Here is the call graph for this function:

void NdpEntry::set_reachable_time ( int  t)
inline

Definition at line 81 of file ndp_entry.h.

void NdpEntry::set_retransmit_time ( int  t)
inline

Definition at line 79 of file ndp_entry.h.

void NdpEntry::set_state ( State  state)

Definition at line 851 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::StartDelayTimer ( )

Definition at line 661 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::StartReachableTimer ( )

Definition at line 670 of file ndp_entry.cc.

Here is the call graph for this function:

void NdpEntry::StartRetransmitTimer ( )

Definition at line 684 of file ndp_entry.cc.

Here is the call graph for this function:

const string & NdpEntry::StateName ( ) const

Definition at line 753 of file ndp_entry.cc.

void NdpEntry::UpdateFlapCount ( )

Member Data Documentation

int NdpEntry::delay_time_
private

Definition at line 137 of file ndp_entry.h.

Timer* NdpEntry::delay_timer_
private

Definition at line 133 of file ndp_entry.h.

bool NdpEntry::deleted_
private

Definition at line 140 of file ndp_entry.h.

boost::intrusive_ptr<Icmpv6Handler> NdpEntry::handler_
private

Definition at line 156 of file ndp_entry.h.

InterfaceConstRef NdpEntry::interface_
private

Definition at line 157 of file ndp_entry.h.

boost::asio::io_context& NdpEntry::io_
private

Definition at line 153 of file ndp_entry.h.

NdpKey NdpEntry::key_
private

Definition at line 154 of file ndp_entry.h.

const int NdpEntry::kMaxRetries = 3
static

Definition at line 45 of file ndp_entry.h.

const int NdpEntry::kMaxUnicastRetries = 3
static

Definition at line 46 of file ndp_entry.h.

std::string NdpEntry::last_event_
private

Definition at line 144 of file ndp_entry.h.

uint64_t NdpEntry::last_event_at_
private

Definition at line 145 of file ndp_entry.h.

std::pair<int, int> NdpEntry::last_notification_in_
private

Definition at line 147 of file ndp_entry.h.

uint64_t NdpEntry::last_notification_in_at_
private

Definition at line 149 of file ndp_entry.h.

std::string NdpEntry::last_notification_in_error_
private

Definition at line 148 of file ndp_entry.h.

std::pair<int, int> NdpEntry::last_notification_out_
private

Definition at line 150 of file ndp_entry.h.

uint64_t NdpEntry::last_notification_out_at_
private

Definition at line 152 of file ndp_entry.h.

std::string NdpEntry::last_notification_out_error_
private

Definition at line 151 of file ndp_entry.h.

State NdpEntry::last_state_
private

Definition at line 142 of file ndp_entry.h.

uint64_t NdpEntry::last_state_change_at_
private

Definition at line 146 of file ndp_entry.h.

MacAddress NdpEntry::mac_
private

Definition at line 143 of file ndp_entry.h.

const VrfEntry* NdpEntry::nh_vrf_
private

Definition at line 155 of file ndp_entry.h.

int NdpEntry::reachable_time_
private

Definition at line 138 of file ndp_entry.h.

Timer* NdpEntry::reachable_timer_
private

Definition at line 135 of file ndp_entry.h.

int NdpEntry::retransmit_time_
private

Definition at line 136 of file ndp_entry.h.

Timer* NdpEntry::retransmit_timer_
private

Definition at line 134 of file ndp_entry.h.

int NdpEntry::retry_count_
private

Definition at line 139 of file ndp_entry.h.

State NdpEntry::state_
private

Definition at line 141 of file ndp_entry.h.

WorkQueue<EventContainer> NdpEntry::work_queue_
private

Definition at line 132 of file ndp_entry.h.


The documentation for this class was generated from the following files: