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

#include <bfd_session.h>

Collaboration diagram for BFD::Session:

Public Member Functions

 Session (Discriminator localDiscriminator, const SessionKey &key, EventManager *evm, const SessionConfig &config, Connection *communicator)
 
virtual ~Session ()
 
void Stop ()
 
ResultCode ProcessControlPacket (const ControlPacket *packet)
 
void InitPollSequence ()
 
void RegisterChangeCallback (ClientId client_id, ChangeCb cb)
 
void UnregisterChangeCallback (ClientId client_id)
 
void UpdateConfig (const SessionConfig &config)
 
std::string toString () const
 
const SessionKeykey () const
 
BFDState local_state () const
 
SessionConfig config () const
 
BFDRemoteSessionState remote_state () const
 
Discriminator local_discriminator () const
 
bool Up () const
 
BFDStatsStats ()
 
TimeInterval detection_time ()
 
TimeInterval tx_interval ()
 
int reference_count ()
 
 Session ()
 

Protected Member Functions

bool RecvTimerExpired ()
 

Private Types

typedef std::map< ClientId,
ChangeCb
Callbacks
 

Private Member Functions

bool SendTimerExpired ()
 
void ScheduleSendTimer ()
 
void ScheduleRecvDeadlineTimer ()
 
void PreparePacket (const SessionConfig &config, ControlPacket *packet)
 
void SendPacket (const ControlPacket *packet)
 
void CallStateChangeCallbacks (const SessionKey &key, const BFD::BFDState &new_state)
 
boost::asio::ip::udp::endpoint GetRandomLocalEndPoint () const
 
uint16_t GetRandomLocalPort () const
 
BFDState local_state_non_locking () const
 

Private Attributes

Discriminator localDiscriminator_
 
SessionKey key_
 
TimersendTimer_
 
TimerrecvTimer_
 
SessionConfig currentConfig_
 
SessionConfig nextConfig_
 
BFDRemoteSessionState remoteSession_
 
boost::scoped_ptr< StateMachinesm_
 
bool pollSequence_
 
Connectioncommunicator_
 
boost::asio::ip::udp::endpoint local_endpoint_
 
boost::asio::ip::udp::endpoint remote_endpoint_
 
bool started_
 
bool stopped_
 
Callbacks callbacks_
 
BFDStats stats_
 

Detailed Description

Definition at line 52 of file bfd_session.h.

Member Typedef Documentation

typedef std::map<ClientId, ChangeCb> BFD::Session::Callbacks
private

Definition at line 97 of file bfd_session.h.

Constructor & Destructor Documentation

BFD::Session::Session ( Discriminator  localDiscriminator,
const SessionKey key,
EventManager evm,
const SessionConfig config,
Connection communicator 
)

Definition at line 19 of file bfd_session.cc.

Here is the call graph for this function:

BFD::Session::~Session ( )
virtual

Definition at line 49 of file bfd_session.cc.

Here is the call graph for this function:

BFD::Session::Session ( )
inline

Definition at line 84 of file bfd_session.h.

Member Function Documentation

void BFD::Session::CallStateChangeCallbacks ( const SessionKey key,
const BFD::BFDState new_state 
)
private

Definition at line 297 of file bfd_session.cc.

SessionConfig BFD::Session::config ( ) const

Definition at line 285 of file bfd_session.cc.

TimeInterval BFD::Session::detection_time ( )

Definition at line 245 of file bfd_session.cc.

boost::asio::ip::udp::endpoint BFD::Session::GetRandomLocalEndPoint ( ) const
private
uint16_t BFD::Session::GetRandomLocalPort ( ) const
private

Definition at line 44 of file bfd_session.cc.

void BFD::Session::InitPollSequence ( )

Definition at line 151 of file bfd_session.cc.

Here is the call graph for this function:

const SessionKey & BFD::Session::key ( ) const

Definition at line 271 of file bfd_session.cc.

Discriminator BFD::Session::local_discriminator ( ) const

Definition at line 293 of file bfd_session.cc.

BFDState BFD::Session::local_state ( ) const

Definition at line 143 of file bfd_session.cc.

Here is the call graph for this function:

BFDState BFD::Session::local_state_non_locking ( ) const
private

Definition at line 139 of file bfd_session.cc.

void BFD::Session::PreparePacket ( const SessionConfig config,
ControlPacket packet 
)
private

Definition at line 161 of file bfd_session.cc.

Here is the call graph for this function:

ResultCode BFD::Session::ProcessControlPacket ( const ControlPacket packet)

Definition at line 173 of file bfd_session.cc.

Here is the call graph for this function:

bool BFD::Session::RecvTimerExpired ( )
protected

Definition at line 66 of file bfd_session.cc.

Here is the call graph for this function:

int BFD::Session::reference_count ( )

Definition at line 320 of file bfd_session.cc.

void BFD::Session::RegisterChangeCallback ( ClientId  client_id,
ChangeCb  cb 
)

Definition at line 305 of file bfd_session.cc.

BFDRemoteSessionState BFD::Session::remote_state ( ) const

Definition at line 289 of file bfd_session.cc.

void BFD::Session::ScheduleRecvDeadlineTimer ( )
private

Definition at line 131 of file bfd_session.cc.

Here is the call graph for this function:

void BFD::Session::ScheduleSendTimer ( )
private

Definition at line 98 of file bfd_session.cc.

Here is the call graph for this function:

void BFD::Session::SendPacket ( const ControlPacket packet)
private

Definition at line 225 of file bfd_session.cc.

Here is the call graph for this function:

bool BFD::Session::SendTimerExpired ( )
private

Definition at line 54 of file bfd_session.cc.

Here is the call graph for this function:

BFDStats& BFD::Session::Stats ( )
inline

Definition at line 73 of file bfd_session.h.

void BFD::Session::Stop ( )

Definition at line 275 of file bfd_session.cc.

Here is the call graph for this function:

std::string BFD::Session::toString ( ) const

Definition at line 80 of file bfd_session.cc.

Here is the call graph for this function:

TimeInterval BFD::Session::tx_interval ( )

Definition at line 251 of file bfd_session.cc.

void BFD::Session::UnregisterChangeCallback ( ClientId  client_id)

Definition at line 309 of file bfd_session.cc.

bool BFD::Session::Up ( ) const

Definition at line 324 of file bfd_session.cc.

Here is the call graph for this function:

void BFD::Session::UpdateConfig ( const SessionConfig config)

Definition at line 313 of file bfd_session.cc.

Member Data Documentation

Callbacks BFD::Session::callbacks_
private

Definition at line 124 of file bfd_session.h.

Connection* BFD::Session::communicator_
private

Definition at line 119 of file bfd_session.h.

SessionConfig BFD::Session::currentConfig_
private

Definition at line 114 of file bfd_session.h.

SessionKey BFD::Session::key_
private

Definition at line 111 of file bfd_session.h.

boost::asio::ip::udp::endpoint BFD::Session::local_endpoint_
private

Definition at line 120 of file bfd_session.h.

Discriminator BFD::Session::localDiscriminator_
private

Definition at line 110 of file bfd_session.h.

SessionConfig BFD::Session::nextConfig_
private

Definition at line 115 of file bfd_session.h.

bool BFD::Session::pollSequence_
private

Definition at line 118 of file bfd_session.h.

Timer* BFD::Session::recvTimer_
private

Definition at line 113 of file bfd_session.h.

boost::asio::ip::udp::endpoint BFD::Session::remote_endpoint_
private

Definition at line 121 of file bfd_session.h.

BFDRemoteSessionState BFD::Session::remoteSession_
private

Definition at line 116 of file bfd_session.h.

Timer* BFD::Session::sendTimer_
private

Definition at line 112 of file bfd_session.h.

boost::scoped_ptr<StateMachine> BFD::Session::sm_
private

Definition at line 117 of file bfd_session.h.

bool BFD::Session::started_
private

Definition at line 122 of file bfd_session.h.

BFDStats BFD::Session::stats_
private

Definition at line 125 of file bfd_session.h.

bool BFD::Session::stopped_
private

Definition at line 123 of file bfd_session.h.


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