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

#include <bfd_proto.h>

Inheritance diagram for BfdProto:
Collaboration diagram for BfdProto:

Classes

class  BfdCommunicator
 
struct  BfdStats
 

Public Member Functions

 BfdProto (Agent *agent, boost::asio::io_context &io)
 
virtual ~BfdProto ()
 
ProtoHandlerAllocProtoHandler (boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
 
void Shutdown ()
 
bool Enqueue (boost::shared_ptr< PktInfo > msg)
 
void ProcessStats (PktStatsType::Type type)
 
bool ProcessBfdKeepAlive (boost::shared_ptr< PktInfo > msg)
 
void HandleReceiveSafe (boost::asio::const_buffer pkt, const boost::asio::ip::udp::endpoint &local_endpoint, const boost::asio::ip::udp::endpoint &remote_endpoint, const BFD::SessionIndex &session_index, uint8_t pkt_len, boost::system::error_code ec)
 
bool BfdHealthCheckSessionControl (HealthCheckTable::HealthCheckServiceAction action, HealthCheckInstanceService *service)
 
void NotifyHealthCheckInstanceService (uint32_t interface, IpAddress address, std::string &data)
 
BfdCommunicatorbfd_communicator ()
 
void IncrementSent ()
 
void IncrementReceived ()
 
void IncrementReceiveDropCount ()
 
void IncrementKaEnqueueCount ()
 
const BfdStatsGetStats () const
 
uint32_t ActiveSessions () 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)
 
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 kMultiplier = 2
 
static const uint32_t kMinRxInterval = 500000
 
static const uint32_t kMinTxInterval = 500000
 

Private Types

typedef std::map
< BfdSessionsKey,
HealthCheckInstanceService
*, BfdSessionsKeyCmp
Sessions
 
typedef std::pair
< BfdSessionsKey,
HealthCheckInstanceService * > 
SessionsPair
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (BfdProto)
 

Private Attributes

friend BfdCommunicator
 
tbb::mutex mutex_
 
tbb::mutex rx_mutex_
 
boost::shared_ptr< PktInfomsg_
 
BfdCommunicator communicator_
 
BFD::Serverserver_
 
BFD::Clientclient_
 
BfdHandler handler_
 
Sessions sessions_
 
BfdStats stats_
 

Additional Inherited Members

- Public Types inherited from Proto
typedef WorkQueue
< boost::shared_ptr< PktInfo > > 
ProtoWorkQueue
 
- 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 56 of file bfd_proto.h.

Member Typedef Documentation

Definition at line 136 of file bfd_proto.h.

Definition at line 137 of file bfd_proto.h.

Constructor & Destructor Documentation

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

Definition at line 20 of file bfd_proto.cc.

Here is the call graph for this function:

BfdProto::~BfdProto ( )
virtual

Definition at line 36 of file bfd_proto.cc.

Member Function Documentation

uint32_t BfdProto::ActiveSessions ( ) const
inline

Definition at line 131 of file bfd_proto.h.

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

Implements Proto.

Definition at line 39 of file bfd_proto.cc.

Here is the call graph for this function:

BfdCommunicator& BfdProto::bfd_communicator ( )
inline

Definition at line 124 of file bfd_proto.h.

bool BfdProto::BfdHealthCheckSessionControl ( HealthCheckTable::HealthCheckServiceAction  action,
HealthCheckInstanceService service 
)

Definition at line 61 of file bfd_proto.cc.

Here is the call graph for this function:

BfdProto::DISALLOW_COPY_AND_ASSIGN ( BfdProto  )
private
bool BfdProto::Enqueue ( boost::shared_ptr< PktInfo msg)
virtual

Reimplemented from Proto.

Definition at line 238 of file bfd_proto.cc.

Here is the call graph for this function:

const BfdStats& BfdProto::GetStats ( ) const
inline

Definition at line 130 of file bfd_proto.h.

void BfdProto::HandleReceiveSafe ( boost::asio::const_buffer  pkt,
const boost::asio::ip::udp::endpoint &  local_endpoint,
const boost::asio::ip::udp::endpoint &  remote_endpoint,
const BFD::SessionIndex session_index,
uint8_t  pkt_len,
boost::system::error_code  ec 
)

Definition at line 204 of file bfd_proto.cc.

Here is the call graph for this function:

void BfdProto::IncrementKaEnqueueCount ( )
inline

Definition at line 129 of file bfd_proto.h.

void BfdProto::IncrementReceived ( )
inline

Definition at line 127 of file bfd_proto.h.

void BfdProto::IncrementReceiveDropCount ( )
inline

Definition at line 128 of file bfd_proto.h.

void BfdProto::IncrementSent ( )
inline

Definition at line 126 of file bfd_proto.h.

void BfdProto::NotifyHealthCheckInstanceService ( uint32_t  interface,
IpAddress  address,
std::string &  data 
)

Definition at line 161 of file bfd_proto.cc.

bool BfdProto::ProcessBfdKeepAlive ( boost::shared_ptr< PktInfo msg)

Definition at line 262 of file bfd_proto.cc.

Here is the call graph for this function:

void BfdProto::ProcessStats ( PktStatsType::Type  type)
virtual

Reimplemented from Proto.

Definition at line 249 of file bfd_proto.cc.

Here is the call graph for this function:

void BfdProto::Shutdown ( )
inline

Definition at line 96 of file bfd_proto.h.

Here is the call graph for this function:

Member Data Documentation

friend BfdProto::BfdCommunicator
private

Definition at line 134 of file bfd_proto.h.

BFD::Client* BfdProto::client_
private

Definition at line 144 of file bfd_proto.h.

BfdCommunicator BfdProto::communicator_
private

Definition at line 142 of file bfd_proto.h.

BfdHandler BfdProto::handler_
private

Definition at line 145 of file bfd_proto.h.

const uint32_t BfdProto::kMinRxInterval = 500000
static

Definition at line 59 of file bfd_proto.h.

const uint32_t BfdProto::kMinTxInterval = 500000
static

Definition at line 60 of file bfd_proto.h.

const uint32_t BfdProto::kMultiplier = 2
static

Definition at line 58 of file bfd_proto.h.

boost::shared_ptr<PktInfo> BfdProto::msg_
private

Definition at line 141 of file bfd_proto.h.

tbb::mutex BfdProto::mutex_
private

Definition at line 139 of file bfd_proto.h.

tbb::mutex BfdProto::rx_mutex_
private

Definition at line 140 of file bfd_proto.h.

BFD::Server* BfdProto::server_
private

Definition at line 143 of file bfd_proto.h.

Sessions BfdProto::sessions_
private

Definition at line 146 of file bfd_proto.h.

BfdStats BfdProto::stats_
private

Definition at line 147 of file bfd_proto.h.


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