openikev2::NetworkController Class Reference

This class allows to perform network operations using several concrete implementations. More...

#include <networkcontroller.h>

List of all members.

Static Public Member Functions

static void setImplementation (auto_ptr< NetworkControllerImpl > impl)
 Establish the NetworkController concrete implementation.
static auto_ptr< IpAddressgetIpAddress (uint16_t port)
 Creates a new IpAddress, setting its port number.
static auto_ptr< IpAddressgetIpAddress (string address, uint16_t port)
 Creates a new IpAddress, setting its address in text format and its port number.
static auto_ptr< IpAddressgetIpAddress (uint16_t family, auto_ptr< ByteArray > data, uint16_t port=0)
 Creates a new IpAddress, setting its family, the address data and the port.
static auto_ptr< UdpSocketgetUdpSocket (uint16_t port)
 Return an object that allow us to send and receive messages throw all the detected interfaces by a specific port.
static auto_ptr< EapClientControllergetEapClientController (Payload_EAP::EAP_TYPE eap_type)
 Creates a new EAP_Client_Controller for the specified EAP authentication type.
static auto_ptr< EapServerControllergetEapServerController (const ID &initiator_id)
 Creates a new EAP_Server_Controller.
static auto_ptr< Payload_CONFprocessConfigurationRequest (IkeSaController &ike_sa_controller, ChildSa &child_sa, Payload_CONF &configuration_request)
 Processes a Configuration request payload.
static auto_ptr< Payload_CONFcreateConfigurationRequest (IkeSaController &ike_sa_controller)
 Creates the Configuration request payload.
static void processConfigurationResponse (IkeSaController &ike_sa_controller, ChildSa &child_sa, Payload_CONF &configuration_response)
 Process the Configuration response payload.
static void unsetConfiguration (IkeSaController &ike_sa_controller)
 Deletes all the Address Configuration status associated to the IKE_SA.
static void addNotifyRequests (Message &message, IkeSaController &ike_sa_controller, ChildSa *child_sa)
 Adds notification requets to the message.
static NotifyControllergetNotifyController (uint16_t type)
 Gets the adecuated NotifyController for such notification type.
static void registerNotifyController (uint16_t type, auto_ptr< NotifyController > notify_controller)
 Registers a NotifyController object for determinated notification type.
static void sendMessage (Message &message, Cipher *cipher)
 Sends a Message to the peer thru the socket.
static void startThread ()
static void addSrcAddress (auto_ptr< IpAddress > new_src_address)
 Adds a new source address to receive from.
static void removeSrcAddress (const IpAddress &src_address)
 Removes a source address to receive from.
static void close ()
 Deletes the instance of the network controller implementation and set it to NULL.

Static Protected Attributes

static auto_ptr< NetworkControllerImplimplementation
 Instance of the implementation of Network Controller.


Detailed Description

This class allows to perform network operations using several concrete implementations.

Author:
Alejandro Perez Mendez, Pedro J. Fernandez Ruiz <alejandro_perez@dif.um.es, pedroj.fernandez@dif.um.es>


Member Function Documentation

void openikev2::NetworkController::setImplementation ( auto_ptr< NetworkControllerImpl impl  )  [static]

Establish the NetworkController concrete implementation.

Parameters:
impl concrete implementation

auto_ptr< IpAddress > openikev2::NetworkController::getIpAddress ( uint16_t  port  )  [static]

Creates a new IpAddress, setting its port number.

Address will be set to "INADDR_ANY" in case of IPv4 and to "in6addr_any" in case of IPv6

Parameters:
port Port number
Returns:
The new IpAddress object

auto_ptr< IpAddress > openikev2::NetworkController::getIpAddress ( string  address,
uint16_t  port 
) [static]

Creates a new IpAddress, setting its address in text format and its port number.

Parameters:
address Text representation of the address. It can be a name or an IPv4 / IPv6 number.
port Port number.
Returns:
The new IpAddress object

auto_ptr< IpAddress > openikev2::NetworkController::getIpAddress ( uint16_t  family,
auto_ptr< ByteArray data,
uint16_t  port = 0 
) [static]

Creates a new IpAddress, setting its family, the address data and the port.

Parameters:
family Address family
data Address data
port Port (default 0 = ANY)
Returns:
The new IpAddress object

auto_ptr< UdpSocket > openikev2::NetworkController::getUdpSocket ( uint16_t  port  )  [static]

Return an object that allow us to send and receive messages throw all the detected interfaces by a specific port.

Parameters:
port Port
Returns:
The UdpSocket object

auto_ptr< EapClientController > openikev2::NetworkController::getEapClientController ( Payload_EAP::EAP_TYPE  eap_type  )  [static]

Creates a new EAP_Client_Controller for the specified EAP authentication type.

Parameters:
eap_type EAP Authentication type
Returns:
A new EAP_Client_Controller.

auto_ptr< EapServerController > openikev2::NetworkController::getEapServerController ( const ID initiator_id  )  [static]

Creates a new EAP_Server_Controller.

Parameters:
initiator_id Initiator ID
Returns:
A new EapServerController.

auto_ptr< Payload_CONF > openikev2::NetworkController::processConfigurationRequest ( IkeSaController ike_sa_controller,
ChildSa child_sa,
Payload_CONF configuration_request 
) [static]

Processes a Configuration request payload.

Parameters:
ike_sa_controller IkeSaController
configuration_request Received Payload_CONF request
Returns:
The Payload_CONF to be included in the response. NULL if some error was found.

auto_ptr< Payload_CONF > openikev2::NetworkController::createConfigurationRequest ( IkeSaController ike_sa_controller  )  [static]

Creates the Configuration request payload.

Parameters:
ike_sa_controller IkeSaController
Returns:
The Payload_CONF to be included in the request. NULL if no configuration will be requested.

void openikev2::NetworkController::processConfigurationResponse ( IkeSaController ike_sa_controller,
ChildSa child_sa,
Payload_CONF configuration_response 
) [static]

Process the Configuration response payload.

Parameters:
ike_sa_controller IkeSaController
child_sa Child SA
configuration_response Received Payload_CONF response

void openikev2::NetworkController::unsetConfiguration ( IkeSaController ike_sa_controller  )  [static]

Deletes all the Address Configuration status associated to the IKE_SA.

Parameters:
ike_sa_controller IkeSaController

void openikev2::NetworkController::addNotifyRequests ( Message message,
IkeSaController ike_sa_controller,
ChildSa child_sa 
) [static]

Adds notification requets to the message.

Parameters:
message Message to add the notify request payloads
ike_sa_controller IKE SA Controller
child_sa CHILD_SA related with the notification (NULL if there is no related CHILD_SA)

NotifyController * openikev2::NetworkController::getNotifyController ( uint16_t  type  )  [static]

Gets the adecuated NotifyController for such notification type.

Parameters:
type Notification type
Returns:
NotifyController object or NULL if not found

void openikev2::NetworkController::registerNotifyController ( uint16_t  type,
auto_ptr< NotifyController notify_controller 
) [static]

Registers a NotifyController object for determinated notification type.

Parameters:
type Notification type
notify_controller NotifyController object to be registered.

void openikev2::NetworkController::sendMessage ( Message message,
Cipher cipher 
) [static]

Sends a Message to the peer thru the socket.

Parameters:
message Message to be sent
cipher Cipher to be used

void openikev2::NetworkController::addSrcAddress ( auto_ptr< IpAddress new_src_address  )  [static]

Adds a new source address to receive from.

Parameters:
new_src_address New source address

void openikev2::NetworkController::removeSrcAddress ( const IpAddress src_address  )  [static]

Removes a source address to receive from.

Parameters:
src_address Source address to be removed


Generated on Fri Jul 27 11:04:52 2007 for libopenikev2 by  doxygen 1.5.1