OpenSDN source code
BgpAsAService Class Reference

#include <bgp_as_service.h>

Collaboration diagram for BgpAsAService:

Classes

struct  BgpAsAServiceEntry
 
struct  BgpAsAServiceList
 

Public Types

typedef boost::function< void(boost::uuids::uuid, uint32_t)> ServiceDeleteCb
 
typedef boost::function< void(const boost::uuids::uuid &, uint32_t, const boost::uuids::uuid &, bool)> HealthCheckCb
 
typedef std::set< BgpAsAServiceEntry, BgpAsAServiceEntryBgpAsAServiceEntryList
 
typedef BgpAsAServiceEntryList::iterator BgpAsAServiceEntryListIterator
 
typedef BgpAsAServiceEntryList::const_iterator BgpAsAServiceEntryListConstIterator
 
typedef std::map< boost::uuids::uuid, BgpAsAServiceList * > BgpAsAServiceEntryMap
 
typedef BgpAsAServiceEntryMap::iterator BgpAsAServiceEntryMapIterator
 
typedef BgpAsAServiceEntryMap::const_iterator BgpAsAServiceEntryMapConstIterator
 
typedef std::map< uint32_t, IndexVector< boost::uuids::uuid > * > BgpAsAServicePortMap
 
typedef BgpAsAServicePortMap::iterator BgpAsAServicePortMapIterator
 
typedef BgpAsAServicePortMap::const_iterator BgpAsAServicePortMapConstIterator
 

Public Member Functions

 BgpAsAService (const Agent *agent)
 
 ~BgpAsAService ()
 
bool IsBgpService (const VmInterface *vm_intf, const IpAddress &source_ip, const IpAddress &dest_ip) const
 
bool GetBgpRouterServiceDestination (const VmInterface *vm_intf, const IpAddress &source, const IpAddress &dest, IpAddress *nat_server, uint32_t *sport, uint32_t *dport) const
 
bool GetBgpHealthCheck (const VmInterface *vm_intf, boost::uuids::uuid *health_check_uuid) const
 
size_t AllocateBgpVmiServicePortIndex (const uint32_t sport, const boost::uuids::uuid vm_uuid)
 
void FreeBgpVmiServicePortIndex (const uint32_t sport)
 
uint32_t AddBgpVmiServicePortIndex (const uint32_t source_port, const boost::uuids::uuid vm_uuid)
 
void ProcessConfig (const std::string &vrf_name, std::list< IFMapNode * > &bgp_router_node_list, std::list< IFMapNode * > &bgp_as_service_node_list, const boost::uuids::uuid &vmi_uuid)
 
void DeleteVmInterface (const boost::uuids::uuid &vmi_uuid)
 
const BgpAsAService::BgpAsAServiceEntryMapbgp_as_a_service_map () const
 
const BgpAsAService::BgpAsAServicePortMapbgp_as_a_service_port_map () const
 
void RegisterServiceDeleteCb (ServiceDeleteCb callback)
 
void RegisterHealthCheckCb (HealthCheckCb callback)
 
bool IsConfigured ()
 
BGPaaServiceParameters::BGPaaServicePortRangePair bgp_as_a_service_port_range () const
 
void UpdateBgpAsAServiceSessionInfo ()
 

Static Public Attributes

static const uint32_t DefaultBgpPort = 179
 

Private Member Functions

void StartHealthCheck (const boost::uuids::uuid &vm_uuid, const BgpAsAServiceEntryList &list)
 
void BuildBgpAsAServiceInfo (IFMapNode *bgp_as_a_service_node, std::list< IFMapNode * > &bgp_router_nodes, BgpAsAServiceEntryList &new_list, const std::string &vrf_name, const boost::uuids::uuid &vm_uuid)
 
 DISALLOW_COPY_AND_ASSIGN (BgpAsAService)
 

Private Attributes

const Agentagent_
 
BgpAsAServiceEntryMap bgp_as_a_service_entry_map_
 
BgpAsAServicePortMap bgp_as_a_service_port_map_
 
std::vector< ServiceDeleteCbservice_delete_cb_list_
 
std::vector< HealthCheckCbhealth_check_cb_list_
 
BGPaaServiceParameters bgp_as_a_service_parameters_
 

Detailed Description

Definition at line 67 of file bgp_as_service.h.

Member Typedef Documentation

◆ BgpAsAServiceEntryList

◆ BgpAsAServiceEntryListConstIterator

typedef BgpAsAServiceEntryList::const_iterator BgpAsAService::BgpAsAServiceEntryListConstIterator

Definition at line 123 of file bgp_as_service.h.

◆ BgpAsAServiceEntryListIterator

typedef BgpAsAServiceEntryList::iterator BgpAsAService::BgpAsAServiceEntryListIterator

Definition at line 122 of file bgp_as_service.h.

◆ BgpAsAServiceEntryMap

◆ BgpAsAServiceEntryMapConstIterator

typedef BgpAsAServiceEntryMap::const_iterator BgpAsAService::BgpAsAServiceEntryMapConstIterator

Definition at line 139 of file bgp_as_service.h.

◆ BgpAsAServiceEntryMapIterator

typedef BgpAsAServiceEntryMap::iterator BgpAsAService::BgpAsAServiceEntryMapIterator

Definition at line 138 of file bgp_as_service.h.

◆ BgpAsAServicePortMap

Definition at line 141 of file bgp_as_service.h.

◆ BgpAsAServicePortMapConstIterator

typedef BgpAsAServicePortMap::const_iterator BgpAsAService::BgpAsAServicePortMapConstIterator

Definition at line 143 of file bgp_as_service.h.

◆ BgpAsAServicePortMapIterator

typedef BgpAsAServicePortMap::iterator BgpAsAService::BgpAsAServicePortMapIterator

Definition at line 142 of file bgp_as_service.h.

◆ HealthCheckCb

typedef boost::function<void(const boost::uuids::uuid &, uint32_t, const boost::uuids::uuid &, bool)> BgpAsAService::HealthCheckCb

Definition at line 72 of file bgp_as_service.h.

◆ ServiceDeleteCb

typedef boost::function<void(boost::uuids::uuid, uint32_t)> BgpAsAService::ServiceDeleteCb

Definition at line 70 of file bgp_as_service.h.

Constructor & Destructor Documentation

◆ BgpAsAService()

BgpAsAService::BgpAsAService ( const Agent agent)

Definition at line 40 of file bgp_as_service.cc.

◆ ~BgpAsAService()

BgpAsAService::~BgpAsAService ( )

Definition at line 47 of file bgp_as_service.cc.

Member Function Documentation

◆ AddBgpVmiServicePortIndex()

uint32_t BgpAsAService::AddBgpVmiServicePortIndex ( const uint32_t  source_port,
const boost::uuids::uuid  vm_uuid 
)

Definition at line 505 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ AllocateBgpVmiServicePortIndex()

size_t BgpAsAService::AllocateBgpVmiServicePortIndex ( const uint32_t  sport,
const boost::uuids::uuid  vm_uuid 
)

Definition at line 490 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ bgp_as_a_service_map()

const BgpAsAService::BgpAsAServiceEntryMap & BgpAsAService::bgp_as_a_service_map ( ) const

Definition at line 50 of file bgp_as_service.cc.

◆ bgp_as_a_service_port_map()

const BgpAsAService::BgpAsAServicePortMap & BgpAsAService::bgp_as_a_service_port_map ( ) const

Definition at line 54 of file bgp_as_service.cc.

◆ bgp_as_a_service_port_range()

BGPaaServiceParameters::BGPaaServicePortRangePair BgpAsAService::bgp_as_a_service_port_range ( ) const
inline

Definition at line 185 of file bgp_as_service.h.

◆ BuildBgpAsAServiceInfo()

void BgpAsAService::BuildBgpAsAServiceInfo ( IFMapNode bgp_as_a_service_node,
std::list< IFMapNode * > &  bgp_router_nodes,
BgpAsAServiceEntryList new_list,
const std::string &  vrf_name,
const boost::uuids::uuid vm_uuid 
)
private

Definition at line 159 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ DeleteVmInterface()

void BgpAsAService::DeleteVmInterface ( const boost::uuids::uuid vmi_uuid)

Definition at line 406 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

BgpAsAService::DISALLOW_COPY_AND_ASSIGN ( BgpAsAService  )
private

◆ FreeBgpVmiServicePortIndex()

void BgpAsAService::FreeBgpVmiServicePortIndex ( const uint32_t  sport)

Definition at line 466 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ GetBgpHealthCheck()

bool BgpAsAService::GetBgpHealthCheck ( const VmInterface vm_intf,
boost::uuids::uuid health_check_uuid 
) const

Definition at line 609 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ GetBgpRouterServiceDestination()

bool BgpAsAService::GetBgpRouterServiceDestination ( const VmInterface vm_intf,
const IpAddress source,
const IpAddress dest,
IpAddress nat_server,
uint32_t *  sport,
uint32_t *  dport 
) const

Definition at line 525 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ IsBgpService()

bool BgpAsAService::IsBgpService ( const VmInterface vm_intf,
const IpAddress source_ip,
const IpAddress dest_ip 
) const

Definition at line 434 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ IsConfigured()

bool BgpAsAService::IsConfigured ( )
inline

Definition at line 177 of file bgp_as_service.h.

◆ ProcessConfig()

void BgpAsAService::ProcessConfig ( const std::string &  vrf_name,
std::list< IFMapNode * > &  bgp_router_node_list,
std::list< IFMapNode * > &  bgp_as_service_node_list,
const boost::uuids::uuid vmi_uuid 
)

Definition at line 315 of file bgp_as_service.cc.

Here is the call graph for this function:

◆ RegisterHealthCheckCb()

void BgpAsAService::RegisterHealthCheckCb ( HealthCheckCb  callback)
inline

Definition at line 173 of file bgp_as_service.h.

◆ RegisterServiceDeleteCb()

void BgpAsAService::RegisterServiceDeleteCb ( ServiceDeleteCb  callback)
inline

Definition at line 170 of file bgp_as_service.h.

◆ StartHealthCheck()

void BgpAsAService::StartHealthCheck ( const boost::uuids::uuid vm_uuid,
const BgpAsAServiceEntryList list 
)
private

Definition at line 112 of file bgp_as_service.cc.

◆ UpdateBgpAsAServiceSessionInfo()

void BgpAsAService::UpdateBgpAsAServiceSessionInfo ( )

Definition at line 635 of file bgp_as_service.cc.

Here is the call graph for this function:

Member Data Documentation

◆ agent_

const Agent* BgpAsAService::agent_
private

Definition at line 200 of file bgp_as_service.h.

◆ bgp_as_a_service_entry_map_

BgpAsAServiceEntryMap BgpAsAService::bgp_as_a_service_entry_map_
private

Definition at line 201 of file bgp_as_service.h.

◆ bgp_as_a_service_parameters_

BGPaaServiceParameters BgpAsAService::bgp_as_a_service_parameters_
private

Definition at line 205 of file bgp_as_service.h.

◆ bgp_as_a_service_port_map_

BgpAsAServicePortMap BgpAsAService::bgp_as_a_service_port_map_
private

Definition at line 202 of file bgp_as_service.h.

◆ DefaultBgpPort

const uint32_t BgpAsAService::DefaultBgpPort = 179
static

Definition at line 69 of file bgp_as_service.h.

◆ health_check_cb_list_

std::vector<HealthCheckCb> BgpAsAService::health_check_cb_list_
private

Definition at line 204 of file bgp_as_service.h.

◆ service_delete_cb_list_

std::vector<ServiceDeleteCb> BgpAsAService::service_delete_cb_list_
private

Definition at line 203 of file bgp_as_service.h.


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