OpenSDN source code
VNController Class Reference

#include <controller_init.h>

Collaboration diagram for VNController:

Classes

struct  FabricMulticastLabelRange
 

Public Types

typedef boost::function< void(uint8_t)> XmppChannelDownCb
 
typedef boost::shared_ptr< ControllerXmppDataControllerXmppDataType
 
typedef boost::shared_ptr< ControllerConnectRetryDataControllerConnectRetryDataType
 
typedef boost::shared_ptr< ControllerWorkQueueDataControllerWorkQueueDataType
 
typedef boost::shared_ptr< ControllerReConfigDataControllerReConfigDataType
 
typedef boost::shared_ptr< ControllerDelPeerDataControllerDelPeerDataType
 
typedef std::list< PeerPtrBgpPeerList
 
typedef BgpPeerList::const_iterator BgpPeerConstIterator
 
typedef std::list< PeerPtr >::iterator BgpPeerIterator
 
typedef boost::shared_ptr< AgentXmppChannelAgentXmppChannelPtr
 
typedef std::vector< AgentXmppChannelPtrAgentXmppChannelList
 
typedef AgentXmppChannelList::iterator AgentXmppChannelListIter
 

Public Member Functions

 VNController (Agent *agent)
 
virtual ~VNController ()
 
void Connect ()
 
void DisConnect ()
 
void ReConnect ()
 
void ReConnectXmppServer ()
 
void ReConnectDnsServer ()
 
void Cleanup ()
 
void XmppServerConnect ()
 
void DnsXmppServerConnect ()
 
void XmppServerDisConnect ()
 
void DnsXmppServerDisConnect ()
 
void XmppServerUpdate (uint8_t time_out)
 
bool VerifyXmppServerTimeout (uint32_t to)
 
void DisConnectControllerIfmapServer (uint8_t idx)
 
void DisConnectDnsServer (uint8_t idx)
 
void increment_multicast_sequence_number ()
 
uint64_t multicast_sequence_number ()
 
uint8_t ActiveXmppConnectionCount ()
 
AgentXmppChannelGetActiveXmppChannel ()
 
AgentIfMapVmExportagent_ifmap_vm_export () const
 
void StartEndOfRibTxTimer ()
 
void StopEndOfRibTx ()
 
bool ControllerWorkQueueProcess (ControllerWorkQueueDataType data)
 
bool XmppMessageProcess (ControllerXmppDataType data)
 
Agentagent ()
 
void Enqueue (ControllerWorkQueueDataType data)
 
void DeleteAgentXmppChannel (uint8_t idx)
 
void SetAgentMcastLabelRange (uint8_t idx)
 
void FillMcastLabelRange (uint32_t *star_idx, uint32_t *end_idx, uint8_t idx) const
 
const FabricMulticastLabelRangefabric_multicast_label_range (uint8_t idx) const
 
void RegisterControllerChangeCallback (XmppChannelDownCb xmpp_channel_down_cb)
 
void FlushTimedOutChannels (uint8_t index)
 
void DelPeerWalkDone (AgentXmppChannel *ch)
 
void DelPeerWalkDoneProcess (AgentXmppChannel *ch)
 
void StartDelPeerWalk (AgentXmppChannelPtr ch)
 
bool RxXmppMessageTrace (uint8_t peer_index, const std::string &to_address, int port, int size, const std::string &msg, const XmppStanza::XmppMessage *xmpp_msg)
 
bool TxXmppMessageTrace (uint8_t peer_index, const std::string &to_address, int port, int size, const std::string &msg, const XmppStanza::XmppMessage *xmpp_msg)
 
TunnelType::TypeBmap GetTypeBitmap (const autogen::EnetTunnelEncapsulationListType &encap)
 
TunnelType::TypeBmap GetTypeBitmap (const autogen::TunnelEncapsulationListType &encap)
 
TunnelType::TypeBmap GetTypeBitmap (const autogen::McastTunnelEncapsulationListType &encap)
 
MacAddress GetTunnelMac (const autogen::EnetNextHopType &nh)
 
MacAddress GetTunnelMac (const autogen::NextHopType &nh)
 
bool IsWorkQueueEmpty () const
 
void EnableWorkQueue ()
 
void GracefulRestartConfigListener ()
 

Private Member Functions

void SetDscpConfig (XmppChannelConfig *xmpp_cfg) const
 
AgentXmppChannelFindAgentXmppChannel (const std::string &server_ip)
 
AgentDnsXmppChannelFindAgentDnsXmppChannel (const std::string &server_ip)
 
void DeleteConnectionInfo (const std::string &addr, bool is_dns) const
 
const std::string MakeConnectionPrefix (bool is_dns) const
 
bool AgentReConfigXmppServerConnectedExists (const std::string &server_ip, std::vector< std::string > resp)
 
bool ApplyControllerReConfigInternal (std::vector< string >service_list)
 
bool ApplyDnsReConfigInternal (std::vector< string >service_list)
 

Private Attributes

Agentagent_
 
uint64_t multicast_sequence_number_
 
boost::scoped_ptr< AgentIfMapVmExportagent_ifmap_vm_export_
 
WorkQueue< ControllerWorkQueueDataTypework_queue_
 
FabricMulticastLabelRange fabric_multicast_label_range_ [MAX_XMPP_SERVERS]
 
XmppChannelDownCb xmpp_channel_down_cb_
 
uint32_t controller_list_chksum_
 
uint32_t dns_list_chksum_
 
AgentXmppChannelList timed_out_channels_ [MAX_XMPP_SERVERS]
 
AgentXmppChannelList delpeer_walks_
 
bool disconnect_
 

Detailed Description

Definition at line 111 of file controller_init.h.

Member Typedef Documentation

◆ AgentXmppChannelList

Definition at line 123 of file controller_init.h.

◆ AgentXmppChannelListIter

typedef AgentXmppChannelList::iterator VNController::AgentXmppChannelListIter

Definition at line 124 of file controller_init.h.

◆ AgentXmppChannelPtr

Definition at line 122 of file controller_init.h.

◆ BgpPeerConstIterator

typedef BgpPeerList::const_iterator VNController::BgpPeerConstIterator

Definition at line 120 of file controller_init.h.

◆ BgpPeerIterator

typedef std::list<PeerPtr>::iterator VNController::BgpPeerIterator

Definition at line 121 of file controller_init.h.

◆ BgpPeerList

typedef std::list<PeerPtr> VNController::BgpPeerList

Definition at line 119 of file controller_init.h.

◆ ControllerConnectRetryDataType

Definition at line 115 of file controller_init.h.

◆ ControllerDelPeerDataType

Definition at line 118 of file controller_init.h.

◆ ControllerReConfigDataType

Definition at line 117 of file controller_init.h.

◆ ControllerWorkQueueDataType

Definition at line 116 of file controller_init.h.

◆ ControllerXmppDataType

Definition at line 114 of file controller_init.h.

◆ XmppChannelDownCb

typedef boost::function<void(uint8_t)> VNController::XmppChannelDownCb

Definition at line 113 of file controller_init.h.

Constructor & Destructor Documentation

◆ VNController()

VNController::VNController ( Agent agent)

Definition at line 69 of file controller_init.cc.

Here is the call graph for this function:

◆ ~VNController()

VNController::~VNController ( )
virtual

Definition at line 84 of file controller_init.cc.

Here is the call graph for this function:

Member Function Documentation

◆ ActiveXmppConnectionCount()

uint8_t VNController::ActiveXmppConnectionCount ( )

Definition at line 854 of file controller_init.cc.

Here is the call graph for this function:

◆ agent()

Agent* VNController::agent ( )
inline

Definition at line 174 of file controller_init.h.

◆ agent_ifmap_vm_export()

AgentIfMapVmExport* VNController::agent_ifmap_vm_export ( ) const
inline

Definition at line 164 of file controller_init.h.

◆ AgentReConfigXmppServerConnectedExists()

bool VNController::AgentReConfigXmppServerConnectedExists ( const std::string &  server_ip,
std::vector< std::string >  resp 
)
private

Definition at line 600 of file controller_init.cc.

Here is the call graph for this function:

◆ ApplyControllerReConfigInternal()

bool VNController::ApplyControllerReConfigInternal ( std::vector< string >  service_list)
private

Definition at line 665 of file controller_init.cc.

Here is the call graph for this function:

◆ ApplyDnsReConfigInternal()

bool VNController::ApplyDnsReConfigInternal ( std::vector< string >  service_list)
private

Definition at line 776 of file controller_init.cc.

Here is the call graph for this function:

◆ Cleanup()

void VNController::Cleanup ( )

Definition at line 482 of file controller_init.cc.

Here is the call graph for this function:

◆ Connect()

void VNController::Connect ( )

Definition at line 367 of file controller_init.cc.

Here is the call graph for this function:

◆ ControllerWorkQueueProcess()

bool VNController::ControllerWorkQueueProcess ( ControllerWorkQueueDataType  data)

Definition at line 903 of file controller_init.cc.

Here is the call graph for this function:

◆ DeleteAgentXmppChannel()

void VNController::DeleteAgentXmppChannel ( uint8_t  idx)

Definition at line 454 of file controller_init.cc.

Here is the call graph for this function:

◆ DeleteConnectionInfo()

void VNController::DeleteConnectionInfo ( const std::string &  addr,
bool  is_dns 
) const
private

Definition at line 526 of file controller_init.cc.

Here is the call graph for this function:

◆ DelPeerWalkDone()

void VNController::DelPeerWalkDone ( AgentXmppChannel ch)

Definition at line 537 of file controller_init.cc.

Here is the call graph for this function:

◆ DelPeerWalkDoneProcess()

void VNController::DelPeerWalkDoneProcess ( AgentXmppChannel ch)

Definition at line 544 of file controller_init.cc.

Here is the call graph for this function:

◆ DisConnect()

void VNController::DisConnect ( )

Definition at line 477 of file controller_init.cc.

Here is the call graph for this function:

◆ DisConnectControllerIfmapServer()

void VNController::DisConnectControllerIfmapServer ( uint8_t  idx)

Definition at line 566 of file controller_init.cc.

Here is the call graph for this function:

◆ DisConnectDnsServer()

void VNController::DisConnectDnsServer ( uint8_t  idx)

Definition at line 754 of file controller_init.cc.

Here is the call graph for this function:

◆ DnsXmppServerConnect()

void VNController::DnsXmppServerConnect ( )

Definition at line 266 of file controller_init.cc.

Here is the call graph for this function:

◆ DnsXmppServerDisConnect()

void VNController::DnsXmppServerDisConnect ( )

Definition at line 429 of file controller_init.cc.

Here is the call graph for this function:

◆ EnableWorkQueue()

void VNController::EnableWorkQueue ( )
inline

Definition at line 213 of file controller_init.h.

Here is the call graph for this function:

◆ Enqueue()

void VNController::Enqueue ( ControllerWorkQueueDataType  data)

Definition at line 1009 of file controller_init.cc.

Here is the call graph for this function:

◆ fabric_multicast_label_range()

const FabricMulticastLabelRange& VNController::fabric_multicast_label_range ( uint8_t  idx) const
inline

Definition at line 181 of file controller_init.h.

◆ FillMcastLabelRange()

void VNController::FillMcastLabelRange ( uint32_t *  star_idx,
uint32_t *  end_idx,
uint8_t  idx 
) const

Definition at line 88 of file controller_init.cc.

Here is the call graph for this function:

◆ FindAgentDnsXmppChannel()

AgentDnsXmppChannel * VNController::FindAgentDnsXmppChannel ( const std::string &  server_ip)
private

Definition at line 739 of file controller_init.cc.

Here is the call graph for this function:

◆ FindAgentXmppChannel()

AgentXmppChannel * VNController::FindAgentXmppChannel ( const std::string &  server_ip)
private

Definition at line 501 of file controller_init.cc.

Here is the call graph for this function:

◆ FlushTimedOutChannels()

void VNController::FlushTimedOutChannels ( uint8_t  index)

Definition at line 558 of file controller_init.cc.

Here is the call graph for this function:

◆ GetActiveXmppChannel()

AgentXmppChannel * VNController::GetActiveXmppChannel ( )

Definition at line 868 of file controller_init.cc.

Here is the call graph for this function:

◆ GetTunnelMac() [1/2]

MacAddress VNController::GetTunnelMac ( const autogen::EnetNextHopType &  nh)

Definition at line 1045 of file controller_init.cc.

◆ GetTunnelMac() [2/2]

MacAddress VNController::GetTunnelMac ( const autogen::NextHopType &  nh)

Definition at line 1049 of file controller_init.cc.

◆ GetTypeBitmap() [1/3]

TunnelType::TypeBmap VNController::GetTypeBitmap ( const autogen::EnetTunnelEncapsulationListType &  encap)

Definition at line 1053 of file controller_init.cc.

Here is the call graph for this function:

◆ GetTypeBitmap() [2/3]

TunnelType::TypeBmap VNController::GetTypeBitmap ( const autogen::McastTunnelEncapsulationListType &  encap)

Definition at line 1095 of file controller_init.cc.

Here is the call graph for this function:

◆ GetTypeBitmap() [3/3]

TunnelType::TypeBmap VNController::GetTypeBitmap ( const autogen::TunnelEncapsulationListType &  encap)

Definition at line 1075 of file controller_init.cc.

Here is the call graph for this function:

◆ GracefulRestartConfigListener()

void VNController::GracefulRestartConfigListener ( )

Definition at line 1111 of file controller_init.cc.

Here is the call graph for this function:

◆ increment_multicast_sequence_number()

void VNController::increment_multicast_sequence_number ( )
inline

Definition at line 157 of file controller_init.h.

◆ IsWorkQueueEmpty()

bool VNController::IsWorkQueueEmpty ( ) const

Definition at line 1041 of file controller_init.cc.

Here is the call graph for this function:

◆ MakeConnectionPrefix()

const string VNController::MakeConnectionPrefix ( bool  is_dns) const
private

Definition at line 516 of file controller_init.cc.

Here is the call graph for this function:

◆ multicast_sequence_number()

uint64_t VNController::multicast_sequence_number ( )
inline

Definition at line 158 of file controller_init.h.

◆ ReConnect()

void VNController::ReConnect ( )

Definition at line 644 of file controller_init.cc.

Here is the call graph for this function:

◆ ReConnectDnsServer()

void VNController::ReConnectDnsServer ( )

Definition at line 631 of file controller_init.cc.

Here is the call graph for this function:

◆ ReConnectXmppServer()

void VNController::ReConnectXmppServer ( )

Definition at line 618 of file controller_init.cc.

Here is the call graph for this function:

◆ RegisterControllerChangeCallback()

void VNController::RegisterControllerChangeCallback ( XmppChannelDownCb  xmpp_channel_down_cb)
inline

Definition at line 184 of file controller_init.h.

◆ RxXmppMessageTrace()

bool VNController::RxXmppMessageTrace ( uint8_t  peer_index,
const std::string &  to_address,
int  port,
int  size,
const std::string &  msg,
const XmppStanza::XmppMessage xmpp_msg 
)

Definition at line 1013 of file controller_init.cc.

◆ SetAgentMcastLabelRange()

void VNController::SetAgentMcastLabelRange ( uint8_t  idx)

Definition at line 107 of file controller_init.cc.

Here is the call graph for this function:

◆ SetDscpConfig()

void VNController::SetDscpConfig ( XmppChannelConfig xmpp_cfg) const
private

Definition at line 140 of file controller_init.cc.

Here is the call graph for this function:

◆ StartDelPeerWalk()

void VNController::StartDelPeerWalk ( AgentXmppChannelPtr  ch)

Definition at line 440 of file controller_init.cc.

Here is the call graph for this function:

◆ StartEndOfRibTxTimer()

void VNController::StartEndOfRibTxTimer ( )

Definition at line 881 of file controller_init.cc.

Here is the call graph for this function:

◆ StopEndOfRibTx()

void VNController::StopEndOfRibTx ( )

Definition at line 891 of file controller_init.cc.

Here is the call graph for this function:

◆ TxXmppMessageTrace()

bool VNController::TxXmppMessageTrace ( uint8_t  peer_index,
const std::string &  to_address,
int  port,
int  size,
const std::string &  msg,
const XmppStanza::XmppMessage xmpp_msg 
)

Definition at line 1031 of file controller_init.cc.

◆ VerifyXmppServerTimeout()

bool VNController::VerifyXmppServerTimeout ( uint32_t  to)

Definition at line 404 of file controller_init.cc.

Here is the call graph for this function:

◆ XmppMessageProcess()

bool VNController::XmppMessageProcess ( ControllerXmppDataType  data)

Definition at line 969 of file controller_init.cc.

Here is the call graph for this function:

◆ XmppServerConnect()

void VNController::XmppServerConnect ( )

Definition at line 152 of file controller_init.cc.

Here is the call graph for this function:

◆ XmppServerDisConnect()

void VNController::XmppServerDisConnect ( )

Definition at line 386 of file controller_init.cc.

Here is the call graph for this function:

◆ XmppServerUpdate()

void VNController::XmppServerUpdate ( uint8_t  time_out)

Definition at line 418 of file controller_init.cc.

Here is the call graph for this function:

Member Data Documentation

◆ agent_

Agent* VNController::agent_
private

Definition at line 227 of file controller_init.h.

◆ agent_ifmap_vm_export_

boost::scoped_ptr<AgentIfMapVmExport> VNController::agent_ifmap_vm_export_
private

Definition at line 229 of file controller_init.h.

◆ controller_list_chksum_

uint32_t VNController::controller_list_chksum_
private

Definition at line 233 of file controller_init.h.

◆ delpeer_walks_

AgentXmppChannelList VNController::delpeer_walks_
private

Definition at line 236 of file controller_init.h.

◆ disconnect_

bool VNController::disconnect_
private

Definition at line 237 of file controller_init.h.

◆ dns_list_chksum_

uint32_t VNController::dns_list_chksum_
private

Definition at line 234 of file controller_init.h.

◆ fabric_multicast_label_range_

FabricMulticastLabelRange VNController::fabric_multicast_label_range_[MAX_XMPP_SERVERS]
private

Definition at line 231 of file controller_init.h.

◆ multicast_sequence_number_

uint64_t VNController::multicast_sequence_number_
private

Definition at line 228 of file controller_init.h.

◆ timed_out_channels_

AgentXmppChannelList VNController::timed_out_channels_[MAX_XMPP_SERVERS]
private

Definition at line 235 of file controller_init.h.

◆ work_queue_

WorkQueue<ControllerWorkQueueDataType> VNController::work_queue_
private

Definition at line 230 of file controller_init.h.

◆ xmpp_channel_down_cb_

XmppChannelDownCb VNController::xmpp_channel_down_cb_
private

Definition at line 232 of file controller_init.h.


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