OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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

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

Definition at line 21 of file bfd_server.cc.

Here is the call graph for this function:

BFD::Server::~Server ( )
virtual

Definition at line 31 of file bfd_server.cc.

Member Function Documentation

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:

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

Definition at line 39 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 55 of file bfd_server.h.

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:

void BFD::Server::DeleteClientSessions ( )

Definition at line 66 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 70 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 51 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 55 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 81 of file bfd_server.cc.

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

Definition at line 61 of file bfd_server.h.

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

Definition at line 85 of file bfd_server.cc.

Here is the call graph for this function:

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:

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

Definition at line 60 of file bfd_server.h.

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:

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

Definition at line 188 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 209 of file bfd_server.cc.

Here is the call graph for this function:

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

Definition at line 242 of file bfd_server.cc.

Here is the call graph for this function:

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:

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

Definition at line 174 of file bfd_server.cc.

Here is the call graph for this function:

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

Connection* BFD::Server::communicator_
private

Definition at line 144 of file bfd_server.h.

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

Definition at line 146 of file bfd_server.h.

EventManager* BFD::Server::evm_
private

Definition at line 143 of file bfd_server.h.

SessionManager BFD::Server::session_manager_
private

Definition at line 145 of file bfd_server.h.

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: