5 #ifndef vnsw_agent_bgp_as_service_hpp
6 #define vnsw_agent_bgp_as_service_hpp
55 #define BGP_ROUTER_CONFIG_NAME "bgp-router"
56 #define BGP_AS_SERVICE_CONFIG_NAME "bgp-as-a-service"
57 #define BGPAAS_CONTROL_NODE_ZONE_CONFIG_NAME "bgpaas-control-node-zone"
58 #define VALID_BGP_ROUTER_TYPE "bgpaas-client"
61 #define BGPASASERVICETRACE(obj, ...) \
63 BgpAsAService##obj::TraceMsg(BgpAsAServiceTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
82 bool health_check_configured,
85 uint64_t hc_delay_usecs,
86 uint64_t hc_timeout_usecs,
88 const std::string &primary_control_node_zone,
89 const std::string &secondary_control_node_zone);
155 uint32_t *sport, uint32_t *dport)
const;
164 std::list<IFMapNode *> &bgp_router_node_list,
165 std::list<IFMapNode *> &bgp_as_service_node_list,
195 std::list<IFMapNode *> &bgp_router_nodes,
197 const std::string &vrf_name,
bool new_health_check_add_
bool GetBgpRouterServiceDestination(const VmInterface *vm_intf, const IpAddress &source, const IpAddress &dest, IpAddress *nat_server, uint32_t *sport, uint32_t *dport) const
std::string secondary_control_node_zone_
bool operator()(const BgpAsAServiceEntry &lhs, const BgpAsAServiceEntry &rhs) const
bool IsLess(const BgpAsAServiceEntry *rhs) const
BgpAsAServiceEntryList::iterator BgpAsAServiceEntryListIterator
std::string primary_control_node_zone_
BGPaaServiceParameters bgp_as_a_service_parameters_
const BgpAsAService::BgpAsAServiceEntryMap & bgp_as_a_service_map() const
std::map< boost::uuids::uuid, BgpAsAServiceList * > BgpAsAServiceEntryMap
void RegisterHealthCheckCb(HealthCheckCb callback)
boost::asio::ip::address IpAddress
SandeshTraceBufferPtr BgpAsAServiceTraceBuf
std::map< uint32_t, IndexVector< boost::uuids::uuid > * > BgpAsAServicePortMap
boost::uuids::uuid health_check_uuid_
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
BGPaaServiceParameters::BGPaaServicePortRangePair bgp_as_a_service_port_range() const
boost::function< void(boost::uuids::uuid, uint32_t)> ServiceDeleteCb
BgpAsAServiceEntryList list_
DISALLOW_COPY_AND_ASSIGN(BgpAsAService)
BgpAsAServiceEntryMap::const_iterator BgpAsAServiceEntryMapConstIterator
void RegisterServiceDeleteCb(ServiceDeleteCb callback)
bool old_health_check_delete_
bool health_check_configured_
BgpAsAServiceEntryMap bgp_as_a_service_entry_map_
std::string primary_bgp_peer_
boost::uuids::uuid old_health_check_uuid_
std::vector< ServiceDeleteCb > service_delete_cb_list_
void UpdateBgpAsAServiceSessionInfo()
BgpAsAServicePortMap bgp_as_a_service_port_map_
uint64_t hc_timeout_usecs_
BgpAsAServicePortMap::const_iterator BgpAsAServicePortMapConstIterator
bool GetBgpHealthCheck(const VmInterface *vm_intf, boost::uuids::uuid *health_check_uuid) const
bool operator==(const BgpAsAServiceEntry &rhs) const
static const uint32_t DefaultBgpPort
std::vector< HealthCheckCb > health_check_cb_list_
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)
const BgpAsAService::BgpAsAServicePortMap & bgp_as_a_service_port_map() const
BgpAsAServicePortMap::iterator BgpAsAServicePortMapIterator
BgpAsAService(const Agent *agent)
void Remove(BgpAsAServiceEntryListIterator &it)
BgpAsAServiceList(BgpAsAServiceEntryList list)
void Update(const BgpAsAServiceEntry *lhs, const BgpAsAServiceEntry *rhs)
std::pair< uint16_t, uint16_t > BGPaaServicePortRangePair
void StartHealthCheck(const boost::uuids::uuid &vm_uuid, const BgpAsAServiceEntryList &list)
void Insert(const BgpAsAServiceEntry *rhs)
size_t AllocateBgpVmiServicePortIndex(const uint32_t sport, const boost::uuids::uuid vm_uuid)
std::string secondary_bgp_peer_
boost::function< void(const boost::uuids::uuid &, uint32_t, const boost::uuids::uuid &, bool)> HealthCheckCb
bool IsBgpService(const VmInterface *vm_intf, const IpAddress &source_ip, const IpAddress &dest_ip) const
BgpAsAServiceEntryMap::iterator BgpAsAServiceEntryMapIterator
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)
void DeleteVmInterface(const boost::uuids::uuid &vmi_uuid)
uint32_t AddBgpVmiServicePortIndex(const uint32_t source_port, const boost::uuids::uuid vm_uuid)
std::set< BgpAsAServiceEntry, BgpAsAServiceEntry > BgpAsAServiceEntryList
BgpAsAServiceEntryList::const_iterator BgpAsAServiceEntryListConstIterator
void FreeBgpVmiServicePortIndex(const uint32_t sport)
bool IsControlNodeZoneConfigured() const