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

#include <icmpv6_proto.h>

Inheritance diagram for Icmpv6Proto:
Collaboration diagram for Icmpv6Proto:

Classes

struct  Icmpv6Ipc
 
struct  Icmpv6Stats
 
struct  InterfaceNdpInfo
 

Public Types

enum  Icmpv6MsgType { NDP_RESOLVE, NDP_DELETE, NDP_SEND_UNSOL_NA }
 
typedef std::map< VmInterface
*, Icmpv6Stats
VmInterfaceMap
 
typedef std::pair< VmInterface
*, Icmpv6Stats
VmInterfacePair
 
typedef std::map< NdpKey,
NdpEntry * > 
NdpCache
 
typedef std::pair< NdpKey,
NdpEntry * > 
NdpCachePair
 
typedef std::map< NdpKey,
NdpEntry * >::iterator 
NdpIterator
 
typedef std::set< NdpKeyNdpKeySet
 
typedef std::set< NdpEntry * > NdpEntrySet
 
typedef std::map< NdpKey,
NdpEntrySet
UnsolNaCache
 
typedef std::pair< NdpKey,
NdpEntrySet
UnsolNaCachePair
 
typedef std::map< NdpKey,
NdpEntrySet >::iterator 
UnsolNaIterator
 
typedef std::map< uint32_t,
InterfaceNdpInfo
InterfaceNdpMap
 
typedef std::pair< uint32_t,
InterfaceNdpInfo
InterfaceNdpPair
 
- Public Types inherited from Proto
typedef WorkQueue
< boost::shared_ptr< PktInfo > > 
ProtoWorkQueue
 

Public Member Functions

void Shutdown ()
 
 Icmpv6Proto (Agent *agent, boost::asio::io_context &io)
 
virtual ~Icmpv6Proto ()
 
ProtoHandlerAllocProtoHandler (boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
 
void VrfNotify (DBTablePartBase *part, DBEntryBase *entry)
 
void VnNotify (DBEntryBase *entry)
 
void InterfaceNotify (DBEntryBase *entry)
 
void NexthopNotify (DBEntryBase *entry)
 
void SendIcmpv6Ipc (Icmpv6Proto::Icmpv6MsgType type, Ip6Address ip, const VrfEntry *vrf, InterfaceConstRef itf)
 
const VmInterfaceMapvm_interfaces ()
 
void IncrementStatsRouterSolicit (VmInterface *vmi)
 
void IncrementStatsRouterAdvert (VmInterface *vmi)
 
void IncrementStatsPingRequest (VmInterface *vmi)
 
void IncrementStatsPingResponse (VmInterface *vmi)
 
void IncrementStatsDrop ()
 
void IncrementStatsNeighborAdvertSolicited (VmInterface *vmi)
 
void IncrementStatsNeighborAdvertUnSolicited (VmInterface *vmi)
 
void IncrementStatsNeighborSolicit (VmInterface *vmi)
 
void IncrementStatsNeighborSolicited (VmInterface *vmi)
 
const Icmpv6StatsGetStats () const
 
Icmpv6StatsVmiToIcmpv6Stats (VmInterface *i)
 
void ClearStats ()
 
bool ValidateAndClearVrfState (VrfEntry *vrf, Icmpv6VrfState *state)
 
Icmpv6VrfStateCreateAndSetVrfState (VrfEntry *vrf)
 
Interfaceip_fabric_interface () const
 
uint32_t ip_fabric_interface_index () const
 
const MacAddressip_fabric_interface_mac () const
 
void set_ip_fabric_interface (Interface *itf)
 
void set_ip_fabric_interface_index (uint32_t ind)
 
void set_ip_fabric_interface_mac (const MacAddress &mac)
 
bool AddNdpEntry (NdpEntry *entry)
 
bool DeleteNdpEntry (NdpEntry *entry)
 
NdpEntryFindNdpEntry (const NdpKey &key)
 
std::size_t GetNdpCacheSize ()
 
const NdpCachendp_cache ()
 
const UnsolNaCacheunsol_na_cache ()
 
const InterfaceNdpMapinterface_ndp_map ()
 
void AddUnsolNaEntry (NdpKey &key)
 
void DeleteUnsolNaEntry (NdpEntry *entry)
 
void HandlePathPreferenceNA (const VrfEntry *, uint32_t, IpAddress)
 
NdpEntryFindUnsolNaEntry (NdpKey &key)
 
NdpEntryUnsolNaEntry (const NdpKey &key, const Interface *intf)
 
Icmpv6Proto::UnsolNaIterator UnsolNaEntryIterator (const NdpKey &key, bool *key_valid)
 
DBTableBase::ListenerId vrf_table_listener_id () const
 
- Public Member Functions inherited from Proto
 Proto (Agent *agent, const char *task_name, PktHandler::PktModuleName mod, boost::asio::io_context &io)
 
virtual ~Proto ()
 
virtual bool Validate (PktInfo *msg)
 
virtual bool Enqueue (boost::shared_ptr< PktInfo > msg)
 
virtual void ProcessStats (PktStatsType::Type type)
 
void FreeBuffer (PktInfo *msg)
 
bool ProcessProto (boost::shared_ptr< PktInfo > msg_info)
 
bool RunProtoHandler (ProtoHandler *handler)
 
void set_trace (bool val)
 
void set_free_buffer (bool val)
 
boost::asio::io_context & get_io_service () const
 
Agentagent () const
 
const ProtoWorkQueuework_queue () const
 
virtual void TokenAvailable (TokenPool *pool)
 

Static Public Attributes

static const uint32_t kRouterAdvertTimeout = 30000
 
static const uint16_t kMaxRetries = 8
 
static const uint32_t kRetryTimeout = 2000
 
static const uint32_t kAgingTimeout = (5 * 60 * 1000)
 

Private Member Functions

bool HandlePacket ()
 
bool HandleMessage ()
 
Icmpv6Proto::NdpIterator DeleteNdpEntry (Icmpv6Proto::NdpIterator iter)
 
void SendIcmpv6Ipc (Icmpv6Proto::Icmpv6MsgType type, NdpKey &key, InterfaceConstRef itf)
 
 DISALLOW_COPY_AND_ASSIGN (Icmpv6Proto)
 

Private Attributes

Timertimer_
 
Icmpv6Stats stats_
 
VmInterfaceMap vm_interfaces_
 
NdpCache ndp_cache_
 
UnsolNaCache unsol_na_cache_
 
InterfaceNdpMap interface_ndp_map_
 
boost::scoped_ptr< Icmpv6Handlericmpv6_handler_
 
DBTableBase::ListenerId vn_table_listener_id_
 
DBTableBase::ListenerId vrf_table_listener_id_
 
DBTableBase::ListenerId interface_listener_id_
 
DBTableBase::ListenerId nexthop_listener_id_
 
uint32_t ip_fabric_interface_index_
 
MacAddress ip_fabric_interface_mac_
 
Interfaceip_fabric_interface_
 

Additional Inherited Members

- Protected Attributes inherited from Proto
Agentagent_
 
PktHandler::PktModuleName module_
 
bool trace_
 
bool free_buffer_
 
boost::asio::io_context & io_
 
ProtoWorkQueue work_queue_
 

Detailed Description

Definition at line 32 of file icmpv6_proto.h.

Member Typedef Documentation

typedef std::map<uint32_t, InterfaceNdpInfo> Icmpv6Proto::InterfaceNdpMap

Definition at line 93 of file icmpv6_proto.h.

typedef std::pair<uint32_t, InterfaceNdpInfo> Icmpv6Proto::InterfaceNdpPair

Definition at line 94 of file icmpv6_proto.h.

typedef std::map<NdpKey, NdpEntry *> Icmpv6Proto::NdpCache

Definition at line 79 of file icmpv6_proto.h.

typedef std::pair<NdpKey, NdpEntry *> Icmpv6Proto::NdpCachePair

Definition at line 80 of file icmpv6_proto.h.

typedef std::set<NdpEntry *> Icmpv6Proto::NdpEntrySet

Definition at line 83 of file icmpv6_proto.h.

typedef std::map<NdpKey, NdpEntry *>::iterator Icmpv6Proto::NdpIterator

Definition at line 81 of file icmpv6_proto.h.

typedef std::set<NdpKey> Icmpv6Proto::NdpKeySet

Definition at line 82 of file icmpv6_proto.h.

Definition at line 84 of file icmpv6_proto.h.

Definition at line 85 of file icmpv6_proto.h.

typedef std::map<NdpKey, NdpEntrySet>::iterator Icmpv6Proto::UnsolNaIterator

Definition at line 86 of file icmpv6_proto.h.

Definition at line 77 of file icmpv6_proto.h.

Definition at line 78 of file icmpv6_proto.h.

Member Enumeration Documentation

Enumerator
NDP_RESOLVE 
NDP_DELETE 
NDP_SEND_UNSOL_NA 

Definition at line 39 of file icmpv6_proto.h.

Constructor & Destructor Documentation

Icmpv6Proto::Icmpv6Proto ( Agent agent,
boost::asio::io_context &  io 
)

Definition at line 13 of file icmpv6_proto.cc.

Here is the call graph for this function:

Icmpv6Proto::~Icmpv6Proto ( )
virtual

Definition at line 40 of file icmpv6_proto.cc.

Member Function Documentation

bool Icmpv6Proto::AddNdpEntry ( NdpEntry entry)

Definition at line 785 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::AddUnsolNaEntry ( NdpKey key)

Definition at line 730 of file icmpv6_proto.cc.

ProtoHandler * Icmpv6Proto::AllocProtoHandler ( boost::shared_ptr< PktInfo info,
boost::asio::io_context &  io 
)
virtual

Implements Proto.

Definition at line 51 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::ClearStats ( )
inline

Definition at line 121 of file icmpv6_proto.h.

Here is the call graph for this function:

Icmpv6VrfState * Icmpv6Proto::CreateAndSetVrfState ( VrfEntry vrf)

Definition at line 56 of file icmpv6_proto.cc.

Here is the call graph for this function:

bool Icmpv6Proto::DeleteNdpEntry ( NdpEntry entry)

Definition at line 811 of file icmpv6_proto.cc.

Here is the call graph for this function:

Icmpv6Proto::NdpIterator Icmpv6Proto::DeleteNdpEntry ( Icmpv6Proto::NdpIterator  iter)
private

Definition at line 825 of file icmpv6_proto.cc.

void Icmpv6Proto::DeleteUnsolNaEntry ( NdpEntry entry)

Definition at line 735 of file icmpv6_proto.cc.

Here is the call graph for this function:

Icmpv6Proto::DISALLOW_COPY_AND_ASSIGN ( Icmpv6Proto  )
private
NdpEntry * Icmpv6Proto::FindNdpEntry ( const NdpKey key)

Definition at line 832 of file icmpv6_proto.cc.

NdpEntry * Icmpv6Proto::FindUnsolNaEntry ( NdpKey key)

Definition at line 722 of file icmpv6_proto.cc.

std::size_t Icmpv6Proto::GetNdpCacheSize ( )
inline

Definition at line 143 of file icmpv6_proto.h.

const Icmpv6Stats& Icmpv6Proto::GetStats ( ) const
inline

Definition at line 119 of file icmpv6_proto.h.

bool Icmpv6Proto::HandleMessage ( )
private
bool Icmpv6Proto::HandlePacket ( )
private
void Icmpv6Proto::HandlePathPreferenceNA ( const VrfEntry vrf,
uint32_t  itf,
IpAddress  sip 
)

Definition at line 389 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsDrop ( )
inline

Definition at line 114 of file icmpv6_proto.h.

void Icmpv6Proto::IncrementStatsNeighborAdvertSolicited ( VmInterface vmi)

Definition at line 706 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsNeighborAdvertUnSolicited ( VmInterface vmi)

Definition at line 714 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsNeighborSolicit ( VmInterface vmi)

Definition at line 690 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsNeighborSolicited ( VmInterface vmi)

Definition at line 698 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsPingRequest ( VmInterface vmi)

Definition at line 674 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsPingResponse ( VmInterface vmi)

Definition at line 682 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsRouterAdvert ( VmInterface vmi)

Definition at line 666 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::IncrementStatsRouterSolicit ( VmInterface vmi)

Definition at line 658 of file icmpv6_proto.cc.

Here is the call graph for this function:

const InterfaceNdpMap& Icmpv6Proto::interface_ndp_map ( )
inline

Definition at line 146 of file icmpv6_proto.h.

void Icmpv6Proto::InterfaceNotify ( DBEntryBase entry)

Definition at line 145 of file icmpv6_proto.cc.

Here is the call graph for this function:

Interface* Icmpv6Proto::ip_fabric_interface ( ) const
inline

Definition at line 125 of file icmpv6_proto.h.

uint32_t Icmpv6Proto::ip_fabric_interface_index ( ) const
inline

Definition at line 126 of file icmpv6_proto.h.

const MacAddress& Icmpv6Proto::ip_fabric_interface_mac ( ) const
inline

Definition at line 129 of file icmpv6_proto.h.

const NdpCache& Icmpv6Proto::ndp_cache ( )
inline

Definition at line 144 of file icmpv6_proto.h.

void Icmpv6Proto::NexthopNotify ( DBEntryBase entry)

Definition at line 185 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::SendIcmpv6Ipc ( Icmpv6Proto::Icmpv6MsgType  type,
Ip6Address  ip,
const VrfEntry vrf,
InterfaceConstRef  itf 
)

Definition at line 173 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::SendIcmpv6Ipc ( Icmpv6Proto::Icmpv6MsgType  type,
NdpKey key,
InterfaceConstRef  itf 
)
private

Definition at line 179 of file icmpv6_proto.cc.

Here is the call graph for this function:

void Icmpv6Proto::set_ip_fabric_interface ( Interface itf)
inline

Definition at line 132 of file icmpv6_proto.h.

void Icmpv6Proto::set_ip_fabric_interface_index ( uint32_t  ind)
inline

Definition at line 133 of file icmpv6_proto.h.

void Icmpv6Proto::set_ip_fabric_interface_mac ( const MacAddress mac)
inline

Definition at line 136 of file icmpv6_proto.h.

void Icmpv6Proto::Shutdown ( )

Definition at line 43 of file icmpv6_proto.cc.

Here is the call graph for this function:

const UnsolNaCache& Icmpv6Proto::unsol_na_cache ( )
inline

Definition at line 145 of file icmpv6_proto.h.

NdpEntry * Icmpv6Proto::UnsolNaEntry ( const NdpKey key,
const Interface intf 
)

Definition at line 752 of file icmpv6_proto.cc.

Here is the call graph for this function:

Icmpv6Proto::UnsolNaIterator Icmpv6Proto::UnsolNaEntryIterator ( const NdpKey key,
bool *  key_valid 
)

Definition at line 768 of file icmpv6_proto.cc.

Here is the call graph for this function:

bool Icmpv6Proto::ValidateAndClearVrfState ( VrfEntry vrf,
Icmpv6VrfState state 
)

Definition at line 206 of file icmpv6_proto.cc.

Here is the call graph for this function:

const VmInterfaceMap& Icmpv6Proto::vm_interfaces ( )
inline

Definition at line 108 of file icmpv6_proto.h.

Icmpv6Proto::Icmpv6Stats * Icmpv6Proto::VmiToIcmpv6Stats ( VmInterface i)

Definition at line 650 of file icmpv6_proto.cc.

void Icmpv6Proto::VnNotify ( DBEntryBase entry)

Definition at line 69 of file icmpv6_proto.cc.

Here is the call graph for this function:

DBTableBase::ListenerId Icmpv6Proto::vrf_table_listener_id ( ) const
inline

Definition at line 155 of file icmpv6_proto.h.

void Icmpv6Proto::VrfNotify ( DBTablePartBase part,
DBEntryBase entry 
)

Definition at line 115 of file icmpv6_proto.cc.

Here is the call graph for this function:

Member Data Documentation

boost::scoped_ptr<Icmpv6Handler> Icmpv6Proto::icmpv6_handler_
private

Definition at line 172 of file icmpv6_proto.h.

DBTableBase::ListenerId Icmpv6Proto::interface_listener_id_
private

Definition at line 175 of file icmpv6_proto.h.

InterfaceNdpMap Icmpv6Proto::interface_ndp_map_
private

Definition at line 165 of file icmpv6_proto.h.

Interface* Icmpv6Proto::ip_fabric_interface_
private

Definition at line 179 of file icmpv6_proto.h.

uint32_t Icmpv6Proto::ip_fabric_interface_index_
private

Definition at line 177 of file icmpv6_proto.h.

MacAddress Icmpv6Proto::ip_fabric_interface_mac_
private

Definition at line 178 of file icmpv6_proto.h.

const uint32_t Icmpv6Proto::kAgingTimeout = (5 * 60 * 1000)
static

Definition at line 37 of file icmpv6_proto.h.

const uint16_t Icmpv6Proto::kMaxRetries = 8
static

Definition at line 35 of file icmpv6_proto.h.

const uint32_t Icmpv6Proto::kRetryTimeout = 2000
static

Definition at line 36 of file icmpv6_proto.h.

const uint32_t Icmpv6Proto::kRouterAdvertTimeout = 30000
static

Definition at line 34 of file icmpv6_proto.h.

NdpCache Icmpv6Proto::ndp_cache_
private

Definition at line 163 of file icmpv6_proto.h.

DBTableBase::ListenerId Icmpv6Proto::nexthop_listener_id_
private

Definition at line 176 of file icmpv6_proto.h.

Icmpv6Stats Icmpv6Proto::stats_
private

Definition at line 161 of file icmpv6_proto.h.

Timer* Icmpv6Proto::timer_
private

Definition at line 160 of file icmpv6_proto.h.

UnsolNaCache Icmpv6Proto::unsol_na_cache_
private

Definition at line 164 of file icmpv6_proto.h.

VmInterfaceMap Icmpv6Proto::vm_interfaces_
private

Definition at line 162 of file icmpv6_proto.h.

DBTableBase::ListenerId Icmpv6Proto::vn_table_listener_id_
private

Definition at line 173 of file icmpv6_proto.h.

DBTableBase::ListenerId Icmpv6Proto::vrf_table_listener_id_
private

Definition at line 174 of file icmpv6_proto.h.


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