openikev2::NetworkControllerImpl Class Reference

This abstract class represents a NetworkController concrete implementation. More...

#include <networkcontrollerimpl.h>

Inheritance diagram for openikev2::NetworkControllerImpl:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void initialize ()
 Initializes the NetworkController implementation.
virtual auto_ptr< IpAddressgetIpAddress (uint16_t port)=0
 Creates a new IpAddress, setting its port number.
virtual auto_ptr< IpAddressgetIpAddress (string address, uint16_t port)=0
 Creates a new IpAddress, setting its address in text format and its port number.
virtual 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.
virtual auto_ptr< UdpSocketgetUdpSocket (uint16_t port)=0
 Return an object that allow us to send and receive messages throw all the detected interfaces by a specific port.
virtual auto_ptr< EapClientControllergetEapClientController (Payload_EAP::EAP_TYPE eap_type)=0
 Creates a new EAP_Client_Controller for the specified EAP authentication type.
virtual auto_ptr< EapServerControllergetEapServerController (const ID &initiator_id)=0
 Creates a new EAP_Server_Controller.
virtual auto_ptr< Payload_CONFprocessConfigurationRequest (IkeSaController &ike_sa_controller, ChildSa &child_sa, Payload_CONF &configuration_request)=0
 Processes a Configuration request payload.
virtual auto_ptr< Payload_CONFcreateConfigurationRequest (IkeSaController &ike_sa_controller)=0
 Creates the Configuration request payload.
virtual void processConfigurationResponse (IkeSaController &ike_sa_controller, ChildSa &child_sa, Payload_CONF &configuration_response)=0
 Process the Configuration response payload.
virtual void unsetConfiguration (IkeSaController &ike_sa_controller)=0
 Deletes all the Address Configuration status associated to the IKE_SA.
virtual void addNotifyRequests (Message &message, IkeSaController &ike_sa_controller, ChildSa *child_sa)
 Adds notification requets to the message.
virtual NotifyControllergetNotifyController (uint16_t type)
 Gets the adecuated NotifyController for such notification type.
virtual void registerNotifyController (uint16_t type, auto_ptr< NotifyController > notify_controller)
 Registers a NotifyController object for determinated notification type.
virtual void sendMessage (Message &message, Cipher *cipher)
 Sends a Message to the peer thru the socket.
virtual void addSrcAddress (auto_ptr< IpAddress > new_src_address)
 Adds a new source address to receive from.
virtual void removeSrcAddress (const IpAddress &src_address)
 Removes a source address to receive from.
virtual void run ()
 Main execution method of the thread.

Protected Member Functions

virtual auto_ptr< Messagereceive ()
 Receives a Message from the socket.
void send_INVALID_IKE_SPI (Message &received_message)
 Sends a response exchange with a NOTIFY payload indicating a INVALID_IKE_SPI condition.
void send_COOKIE (Message &received_message, auto_ptr< Payload_NOTIFY > cookie_notify)
 Sends a response Message with a COOKIE notification Payload.

Protected Attributes

map< uint16_t, NotifyController * > notify_controllers
 NotifyController collection.
auto_ptr< UdpSocketudp_socket
 UDP Socket to perform networking operations.

Detailed Description

This abstract class represents a NetworkController concrete implementation.

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


Member Function Documentation

void openikev2::NetworkControllerImpl::send_INVALID_IKE_SPI ( Message received_message  )  [protected]

Sends a response exchange with a NOTIFY payload indicating a INVALID_IKE_SPI condition.

Parameters:
received_message The received request

void openikev2::NetworkControllerImpl::send_COOKIE ( Message received_message,
auto_ptr< Payload_NOTIFY cookie_notify 
) [protected]

Sends a response Message with a COOKIE notification Payload.

Parameters:
received_message The received request
cookie_notify COOKIE notification payload to be included in the response

virtual auto_ptr<IpAddress> openikev2::NetworkControllerImpl::getIpAddress ( uint16_t  port  )  [pure virtual]

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

virtual auto_ptr<IpAddress> openikev2::NetworkControllerImpl::getIpAddress ( string  address,
uint16_t  port 
) [pure virtual]

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

virtual auto_ptr<IpAddress> openikev2::NetworkControllerImpl::getIpAddress ( uint16_t  family,
auto_ptr< ByteArray data,
uint16_t  port 
) [pure virtual]

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

Parameters:
family Address family
data Address data
port Port
Returns:
The new IpAddress object

virtual auto_ptr<UdpSocket> openikev2::NetworkControllerImpl::getUdpSocket ( uint16_t  port  )  [pure virtual]

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

virtual auto_ptr<EapClientController> openikev2::NetworkControllerImpl::getEapClientController ( Payload_EAP::EAP_TYPE  eap_type  )  [pure virtual]

Creates a new EAP_Client_Controller for the specified EAP authentication type.

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

virtual auto_ptr<EapServerController> openikev2::NetworkControllerImpl::getEapServerController ( const ID initiator_id  )  [pure virtual]

Creates a new EAP_Server_Controller.

Parameters:
initiator_id Initiator ID
Returns:
A new EapServerController.

virtual auto_ptr<Payload_CONF> openikev2::NetworkControllerImpl::processConfigurationRequest ( IkeSaController ike_sa_controller,
ChildSa child_sa,
Payload_CONF configuration_request 
) [pure virtual]

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.

virtual auto_ptr<Payload_CONF> openikev2::NetworkControllerImpl::createConfigurationRequest ( IkeSaController ike_sa_controller  )  [pure virtual]

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.

virtual void openikev2::NetworkControllerImpl::processConfigurationResponse ( IkeSaController ike_sa_controller,
ChildSa child_sa,
Payload_CONF configuration_response 
) [pure virtual]

Process the Configuration response payload.

Parameters:
ike_sa_controller IkeSaController
child_sa Child SA
configuration_response Received Payload_CONF response

virtual void openikev2::NetworkControllerImpl::unsetConfiguration ( IkeSaController ike_sa_controller  )  [pure virtual]

Deletes all the Address Configuration status associated to the IKE_SA.

Parameters:
ike_sa_controller IkeSaController

void openikev2::NetworkControllerImpl::addNotifyRequests ( Message message,
IkeSaController ike_sa_controller,
ChildSa child_sa 
) [virtual]

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::NetworkControllerImpl::getNotifyController ( uint16_t  type  )  [virtual]

Gets the adecuated NotifyController for such notification type.

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

void openikev2::NetworkControllerImpl::registerNotifyController ( uint16_t  type,
auto_ptr< NotifyController notify_controller 
) [virtual]

Registers a NotifyController object for determinated notification type.

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

void openikev2::NetworkControllerImpl::sendMessage ( Message message,
Cipher cipher 
) [virtual]

Sends a Message to the peer thru the socket.

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

void openikev2::NetworkControllerImpl::addSrcAddress ( auto_ptr< IpAddress new_src_address  )  [virtual]

Adds a new source address to receive from.

Parameters:
new_src_address New source address

void openikev2::NetworkControllerImpl::removeSrcAddress ( const IpAddress src_address  )  [virtual]

Removes a source address to receive from.

Parameters:
src_address Source address to be removed

void openikev2::NetworkControllerImpl::run (  )  [virtual]

Main execution method of the thread.

This method is executed allways when executeRunnable() is called. Each concrete Thread musts implement this method

Implements openikev2::Runnable.


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