OpenSDN source code
BFD::Server Class Reference

#include <bfd_server.h>

Collaboration diagram for BFD::Server:

Classes

struct  Event
 
class  SessionManager
 

Public Member Functions

 Server (EventManager *evm, Connection *communicator)
 
virtual ~Server ()
 
ResultCode ProcessControlPacketActual (const ControlPacket *packet)
 
void ProcessControlPacket (const boost::asio::ip::udp::endpoint &local_endpoint, const boost::asio::ip::udp::endpoint &remote_endpoint, const SessionIndex &session_index, const boost::asio::const_buffer &recv_buffer, std::size_t bytes_transferred, const boost::system::error_code &error)
 
ResultCode ConfigureSession (const SessionKey &key, const SessionConfig &config, Discriminator *assignedDiscriminator)
 
ResultCode RemoveSessionReference (const SessionKey &key)
 
SessionSessionByKey (const boost::asio::ip::address &address, const SessionIndex &index=SessionIndex())
 
SessionSessionByKey (const SessionKey &key)
 
SessionSessionByKey (const SessionKey &key) const
 
Connectioncommunicator () const
 
void AddSession (const SessionKey &key, const SessionConfig &config, ChangeCb cb)
 
void DeleteSession (const SessionKey &key)
 
void DeleteClientSessions ()
 
SessionsGetSessions ()
 
WorkQueue< Event * > * event_queue ()
 

Private Types

enum  EventType {
  BEGIN_EVENT , ADD_CONNECTION = BEGIN_EVENT , DELETE_CONNECTION , DELETE_CLIENT_CONNECTIONS ,
  PROCESS_PACKET , END_EVENT = PROCESS_PACKET
}
 

Private Member Functions

void AddSession (Event *event)
 
void DeleteSession (Event *event)
 
void DeleteClientSessions (Event *event)
 
void ProcessControlPacket (Event *event)
 
void EnqueueEvent (Event *event)
 
bool EventCallback (Event *event)
 
SessionGetSession (const ControlPacket *packet)
 

Private Attributes

EventManagerevm_
 
Connectioncommunicator_
 
SessionManager session_manager_
 
boost::scoped_ptr< WorkQueue< Event * > > event_queue_
 
Sessions sessions_
 

Detailed Description

Definition at line 28 of file bfd_server.h.

Member Enumeration Documentation

◆ EventType

enum BFD::Server::EventType
private
Enumerator
BEGIN_EVENT 
ADD_CONNECTION 
DELETE_CONNECTION 
DELETE_CLIENT_CONNECTIONS 
PROCESS_PACKET 
END_EVENT 

Definition at line 94 of file bfd_server.h.

Constructor & Destructor Documentation

◆ Server()

BFD::Server::Server ( EventManager evm,
Connection communicator 
)

Definition at line 21 of file bfd_server.cc.

Here is the call graph for this function:

◆ ~Server()

BFD::Server::~Server ( )
virtual

Definition at line 31 of file bfd_server.cc.

Member Function Documentation

◆ AddSession() [1/2]

void BFD::Server::AddSession ( const SessionKey key,
const SessionConfig config,
ChangeCb  cb 
)

Definition at line 34 of file bfd_server.cc.

Here is the call graph for this function:

◆ AddSession() [2/2]

void BFD::Server::AddSession ( Event event)
private

Definition at line 39 of file bfd_server.cc.

Here is the call graph for this function:

◆ communicator()

Connection* BFD::Server::communicator ( ) const
inline

Definition at line 55 of file bfd_server.h.

◆ ConfigureSession()

ResultCode BFD::Server::ConfigureSession ( const SessionKey key,
const SessionConfig config,
Discriminator assignedDiscriminator 
)

Definition at line 235 of file bfd_server.cc.

Here is the call graph for this function:

◆ DeleteClientSessions() [1/2]

void BFD::Server::DeleteClientSessions ( )

Definition at line 66 of file bfd_server.cc.

Here is the call graph for this function:

◆ DeleteClientSessions() [2/2]

void BFD::Server::DeleteClientSessions ( Event event)
private

Definition at line 70 of file bfd_server.cc.

Here is the call graph for this function:

◆ DeleteSession() [1/2]

void BFD::Server::DeleteSession ( const SessionKey key)

Definition at line 51 of file bfd_server.cc.

Here is the call graph for this function:

◆ DeleteSession() [2/2]

void BFD::Server::DeleteSession ( Event event)
private

Definition at line 55 of file bfd_server.cc.

Here is the call graph for this function:

◆ EnqueueEvent()

void BFD::Server::EnqueueEvent ( Event event)
private

Definition at line 81 of file bfd_server.cc.

◆ event_queue()

WorkQueue<Event *>* BFD::Server::event_queue ( )
inline

Definition at line 61 of file bfd_server.h.

◆ EventCallback()

bool BFD::Server::EventCallback ( Event event)
private

Definition at line 85 of file bfd_server.cc.

Here is the call graph for this function:

◆ GetSession()

Session * BFD::Server::GetSession ( const ControlPacket packet)
private

Definition at line 104 of file bfd_server.cc.

Here is the call graph for this function:

◆ GetSessions()

Sessions* BFD::Server::GetSessions ( )
inline

Definition at line 60 of file bfd_server.h.

◆ ProcessControlPacket() [1/2]

void BFD::Server::ProcessControlPacket ( const boost::asio::ip::udp::endpoint &  local_endpoint,
const boost::asio::ip::udp::endpoint &  remote_endpoint,
const SessionIndex session_index,
const boost::asio::const_buffer &  recv_buffer,
std::size_t  bytes_transferred,
const boost::system::error_code &  error 
)

Definition at line 178 of file bfd_server.cc.

Here is the call graph for this function:

◆ ProcessControlPacket() [2/2]

void BFD::Server::ProcessControlPacket ( Event event)
private

Definition at line 188 of file bfd_server.cc.

Here is the call graph for this function:

◆ ProcessControlPacketActual()

ResultCode BFD::Server::ProcessControlPacketActual ( const ControlPacket packet)

Definition at line 209 of file bfd_server.cc.

Here is the call graph for this function:

◆ RemoveSessionReference()

ResultCode BFD::Server::RemoveSessionReference ( const SessionKey key)

Definition at line 242 of file bfd_server.cc.

Here is the call graph for this function:

◆ SessionByKey() [1/3]

Session * BFD::Server::SessionByKey ( const boost::asio::ip::address &  address,
const SessionIndex index = SessionIndex() 
)

Definition at line 165 of file bfd_server.cc.

Here is the call graph for this function:

◆ SessionByKey() [2/3]

Session * BFD::Server::SessionByKey ( const SessionKey key)

Definition at line 174 of file bfd_server.cc.

Here is the call graph for this function:

◆ SessionByKey() [3/3]

Session * BFD::Server::SessionByKey ( const SessionKey key) const

Definition at line 170 of file bfd_server.cc.

Here is the call graph for this function:

Member Data Documentation

◆ communicator_

Connection* BFD::Server::communicator_
private

Definition at line 144 of file bfd_server.h.

◆ event_queue_

boost::scoped_ptr<WorkQueue<Event *> > BFD::Server::event_queue_
private

Definition at line 146 of file bfd_server.h.

◆ evm_

EventManager* BFD::Server::evm_
private

Definition at line 143 of file bfd_server.h.

◆ session_manager_

SessionManager BFD::Server::session_manager_
private

Definition at line 145 of file bfd_server.h.

◆ sessions_

Sessions BFD::Server::sessions_
private

Definition at line 147 of file bfd_server.h.


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