OpenSDN source code
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, ChangeCbCallbacks
 

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

◆ Callbacks

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

Definition at line 97 of file bfd_session.h.

Constructor & Destructor Documentation

◆ Session() [1/2]

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:

◆ ~Session()

BFD::Session::~Session ( )
virtual

Definition at line 49 of file bfd_session.cc.

Here is the call graph for this function:

◆ Session() [2/2]

BFD::Session::Session ( )
inline

Definition at line 84 of file bfd_session.h.

Member Function Documentation

◆ CallStateChangeCallbacks()

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

Definition at line 297 of file bfd_session.cc.

Here is the call graph for this function:

◆ config()

SessionConfig BFD::Session::config ( ) const

Definition at line 285 of file bfd_session.cc.

◆ detection_time()

TimeInterval BFD::Session::detection_time ( )

Definition at line 245 of file bfd_session.cc.

◆ GetRandomLocalEndPoint()

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

◆ GetRandomLocalPort()

uint16_t BFD::Session::GetRandomLocalPort ( ) const
private

Definition at line 44 of file bfd_session.cc.

◆ InitPollSequence()

void BFD::Session::InitPollSequence ( )

Definition at line 151 of file bfd_session.cc.

Here is the call graph for this function:

◆ key()

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

Definition at line 271 of file bfd_session.cc.

◆ local_discriminator()

Discriminator BFD::Session::local_discriminator ( ) const

Definition at line 293 of file bfd_session.cc.

◆ local_state()

BFDState BFD::Session::local_state ( ) const

Definition at line 143 of file bfd_session.cc.

Here is the call graph for this function:

◆ local_state_non_locking()

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

Definition at line 139 of file bfd_session.cc.

◆ PreparePacket()

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:

◆ ProcessControlPacket()

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

Definition at line 173 of file bfd_session.cc.

Here is the call graph for this function:

◆ RecvTimerExpired()

bool BFD::Session::RecvTimerExpired ( )
protected

Definition at line 66 of file bfd_session.cc.

Here is the call graph for this function:

◆ reference_count()

int BFD::Session::reference_count ( )

Definition at line 320 of file bfd_session.cc.

◆ RegisterChangeCallback()

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

Definition at line 305 of file bfd_session.cc.

◆ remote_state()

BFDRemoteSessionState BFD::Session::remote_state ( ) const

Definition at line 289 of file bfd_session.cc.

◆ ScheduleRecvDeadlineTimer()

void BFD::Session::ScheduleRecvDeadlineTimer ( )
private

Definition at line 131 of file bfd_session.cc.

Here is the call graph for this function:

◆ ScheduleSendTimer()

void BFD::Session::ScheduleSendTimer ( )
private

Definition at line 98 of file bfd_session.cc.

Here is the call graph for this function:

◆ SendPacket()

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:

◆ SendTimerExpired()

bool BFD::Session::SendTimerExpired ( )
private

Definition at line 54 of file bfd_session.cc.

Here is the call graph for this function:

◆ Stats()

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

Definition at line 73 of file bfd_session.h.

◆ Stop()

void BFD::Session::Stop ( )

Definition at line 275 of file bfd_session.cc.

Here is the call graph for this function:

◆ toString()

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

Definition at line 80 of file bfd_session.cc.

Here is the call graph for this function:

◆ tx_interval()

TimeInterval BFD::Session::tx_interval ( )

Definition at line 251 of file bfd_session.cc.

◆ UnregisterChangeCallback()

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

Definition at line 309 of file bfd_session.cc.

◆ Up()

bool BFD::Session::Up ( ) const

Definition at line 324 of file bfd_session.cc.

Here is the call graph for this function:

◆ UpdateConfig()

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

Definition at line 313 of file bfd_session.cc.

Here is the call graph for this function:

Member Data Documentation

◆ callbacks_

Callbacks BFD::Session::callbacks_
private

Definition at line 124 of file bfd_session.h.

◆ communicator_

Connection* BFD::Session::communicator_
private

Definition at line 119 of file bfd_session.h.

◆ currentConfig_

SessionConfig BFD::Session::currentConfig_
private

Definition at line 114 of file bfd_session.h.

◆ key_

SessionKey BFD::Session::key_
private

Definition at line 111 of file bfd_session.h.

◆ local_endpoint_

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

Definition at line 120 of file bfd_session.h.

◆ localDiscriminator_

Discriminator BFD::Session::localDiscriminator_
private

Definition at line 110 of file bfd_session.h.

◆ nextConfig_

SessionConfig BFD::Session::nextConfig_
private

Definition at line 115 of file bfd_session.h.

◆ pollSequence_

bool BFD::Session::pollSequence_
private

Definition at line 118 of file bfd_session.h.

◆ recvTimer_

Timer* BFD::Session::recvTimer_
private

Definition at line 113 of file bfd_session.h.

◆ remote_endpoint_

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

Definition at line 121 of file bfd_session.h.

◆ remoteSession_

BFDRemoteSessionState BFD::Session::remoteSession_
private

Definition at line 116 of file bfd_session.h.

◆ sendTimer_

Timer* BFD::Session::sendTimer_
private

Definition at line 112 of file bfd_session.h.

◆ sm_

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

Definition at line 117 of file bfd_session.h.

◆ started_

bool BFD::Session::started_
private

Definition at line 122 of file bfd_session.h.

◆ stats_

BFDStats BFD::Session::stats_
private

Definition at line 125 of file bfd_session.h.

◆ stopped_

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: