OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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,
BgpAsAServiceEntry
BgpAsAServiceEntryList
 
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::BgpAsAServiceEntryMap
bgp_as_a_service_map () const
 
const
BgpAsAService::BgpAsAServicePortMap
bgp_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

typedef BgpAsAServiceEntryList::const_iterator BgpAsAService::BgpAsAServiceEntryListConstIterator

Definition at line 123 of file bgp_as_service.h.

typedef BgpAsAServiceEntryList::iterator BgpAsAService::BgpAsAServiceEntryListIterator

Definition at line 122 of file bgp_as_service.h.

typedef BgpAsAServiceEntryMap::const_iterator BgpAsAService::BgpAsAServiceEntryMapConstIterator

Definition at line 139 of file bgp_as_service.h.

typedef BgpAsAServiceEntryMap::iterator BgpAsAService::BgpAsAServiceEntryMapIterator

Definition at line 138 of file bgp_as_service.h.

Definition at line 141 of file bgp_as_service.h.

typedef BgpAsAServicePortMap::const_iterator BgpAsAService::BgpAsAServicePortMapConstIterator

Definition at line 143 of file bgp_as_service.h.

typedef BgpAsAServicePortMap::iterator BgpAsAService::BgpAsAServicePortMapIterator

Definition at line 142 of file bgp_as_service.h.

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.

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 ( const Agent agent)

Definition at line 40 of file bgp_as_service.cc.

BgpAsAService::~BgpAsAService ( )

Definition at line 47 of file bgp_as_service.cc.

Member Function Documentation

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:

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:

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

Definition at line 50 of file bgp_as_service.cc.

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

Definition at line 54 of file bgp_as_service.cc.

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

Definition at line 185 of file bgp_as_service.h.

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:

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:

BgpAsAService::DISALLOW_COPY_AND_ASSIGN ( BgpAsAService  )
private
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:

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:

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:

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:

bool BgpAsAService::IsConfigured ( )
inline

Definition at line 177 of file bgp_as_service.h.

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:

void BgpAsAService::RegisterHealthCheckCb ( HealthCheckCb  callback)
inline

Definition at line 173 of file bgp_as_service.h.

void BgpAsAService::RegisterServiceDeleteCb ( ServiceDeleteCb  callback)
inline

Definition at line 170 of file bgp_as_service.h.

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

Definition at line 112 of file bgp_as_service.cc.

void BgpAsAService::UpdateBgpAsAServiceSessionInfo ( )

Definition at line 635 of file bgp_as_service.cc.

Here is the call graph for this function:

Member Data Documentation

const Agent* BgpAsAService::agent_
private

Definition at line 200 of file bgp_as_service.h.

BgpAsAServiceEntryMap BgpAsAService::bgp_as_a_service_entry_map_
private

Definition at line 201 of file bgp_as_service.h.

BGPaaServiceParameters BgpAsAService::bgp_as_a_service_parameters_
private

Definition at line 205 of file bgp_as_service.h.

BgpAsAServicePortMap BgpAsAService::bgp_as_a_service_port_map_
private

Definition at line 202 of file bgp_as_service.h.

const uint32_t BgpAsAService::DefaultBgpPort = 179
static

Definition at line 69 of file bgp_as_service.h.

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

Definition at line 204 of file bgp_as_service.h.

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: