Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_Server::InternalVerifier Class Reference

This is a short-lived server that runs the protocol to establish a connecting server's identity. More...

#include <InternalVerifier.h>

Inheritance diagram for CODEX_Server::InternalVerifier:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Server::InternalVerifier:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InternalVerifier (int port, const CODEX_Quorum::SocketBuilder &socketBuilder, CODEX_Quorum::SocketBase *socket)
 Constructor.
virtual ~InternalVerifier ()
 Virtual destructor.
void disable ()
 Override the default.
void processRequest (CODEX_Quorum::SocketBase::StateType s)
virtual void enable ()
 Create a socket and begin listening.
int port () const
 The port on which the server is listening.
virtual int set_fd (fd_set *fd_bitmap, SocketBase::StateType s)
 Set the bitmap for this socket.
virtual bool isset_fd (const fd_set *fd_bitmap, SocketBase::StateType s)
 Whether the bitmap is set for this socket.
virtual void processRequest (SocketBase::StateType s)=0
 Process incoming requests.

Protected Member Functions

SocketBasesocket () const
 Returns the socket on which this server is listening.
const SocketBuilder & builder () const
 Returns the SocketBuilder for this server.
void setSocket (SocketBase *socket)
 Set a SocketBase for this server.

Detailed Description

This is a short-lived server that runs the protocol to establish a connecting server's identity.

The protocol is a simple challenge-response, with this local server denoted L and the remote server R.

  1. L selects a random nonce n and sends it to R.
  2. R composes a message containing its name and n, which it signs and returns to L. Including the nonce prevents replay attacks.

Definition at line 37 of file InternalVerifier.h.


Constructor & Destructor Documentation

InternalVerifier::InternalVerifier int  port,
const CODEX_Quorum::SocketBuilder socketBuilder,
CODEX_Quorum::SocketBase socket
 

Constructor.

Parameters:
port The port on which to listen.
socketBuilder Not used, but required by base class.
socket An already-configured socket for the connection.

Definition at line 26 of file InternalVerifier.cc.

References CODEX_Server::ServerState::addServer(), CODEX_Server::ServerState::instance(), and CODEX_Quorum::LocalServer::setSocket().


Member Function Documentation

const SocketBuilder& CODEX_Quorum::LocalServer::builder  )  const [inline, protected, inherited]
 

Returns the SocketBuilder for this server.

Definition at line 120 of file LocalServer.h.

Referenced by CODEX_KeyService::ClientServer::processRequest().

void LocalServer::enable  )  [virtual, inherited]
 

Create a socket and begin listening.

Derived classes should reimplement this to perform other service initialization tasks needed. This base-class version should be called explicitly, to ensure the necessary base class initialization.

Definition at line 41 of file LocalServer.cc.

References CODEX_Quorum::SocketBase::setup().

bool LocalServer::isset_fd const fd_set *  fd_bitmap,
SocketBase::StateType  s
[virtual, inherited]
 

Whether the bitmap is set for this socket.

Some types of sockets may need to know the operation being tested.

Definition at line 76 of file LocalServer.cc.

References CODEX_Quorum::SocketBase::isset_fd().

virtual void CODEX_Quorum::LocalServer::processRequest SocketBase::StateType  s  )  [pure virtual, inherited]
 

Process incoming requests.

Derived classes must implement this routine, which is called whenever a connection is made.

Attention:
No further connections may be handled, nor any other actions taken, until this function returns. Consequently, if you do not want your program to block on a request, you must implement some concurrency mechanism, such as an event model or threads. This class makes no assumptions about concurrency.

Implemented in CODEX_Quorum::EchoServer.

int LocalServer::set_fd fd_set *  fd_bitmap,
SocketBase::StateType  s
[virtual, inherited]
 

Set the bitmap for this socket.

Some types of sockets may need to know the operation being tested.

Definition at line 69 of file LocalServer.cc.

References CODEX_Quorum::SocketBase::set_fd().

void CODEX_Quorum::LocalServer::setSocket SocketBase socket  )  [inline, protected, inherited]
 

Set a SocketBase for this server.

Useful for servers that clone themselves.

Definition at line 126 of file LocalServer.h.

References CODEX_Quorum::LocalServer::socket().

Referenced by CODEX_KeyService::ClientActivity::ClientActivity(), and InternalVerifier().


The documentation for this class was generated from the following files:
Generated on Fri May 6 17:42:40 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1