openikev2::ChildSa Class Reference

This class represents a CHILD_SA. More...

#include <childsa.h>

Inheritance diagram for openikev2::ChildSa:

Inheritance graph
[legend]
List of all members.

Public Types

enum  CHILD_SA_STATE {
  CHILD_SA_CREATING, CHILD_SA_ESTABLISHED, CHILD_SA_DELETING, CHILD_SA_REKEYED,
  CHILD_SA_REKEYING
}
 ChildSa states. More...

Public Member Functions

 ChildSa (bool child_sa_initiator)
 Creates a new empty ChildSa.
 ChildSa (uint32_t spi_in, uint32_t spi_out, Enums::IPSEC_MODE mode, Enums::PROTOCOL_ID ipsec_protocol, bool child_sa_initiator)
 Creates a new ChildSa setting its parameters.
virtual ProposalgetProposal () const
 Gets the proposal to be used for this ChildSa.
virtual IpsecConfigurationgetIpsecConfiguration () const
 Gets the IPsec configuration of this ChildSa.
virtual void setProposal (auto_ptr< Proposal > new_proposal)
 Changes the ChildSa proposal.
virtual void setIpsecConfiguration (auto_ptr< IpsecConfiguration > ipsec_configuration)
 Changes the entire IpsecConfiguration of the CHILD_SA.
virtual bool equals (const ChildSa &other) const
 Indicates if a ChildSa is equal to another.
virtual auto_ptr< ChildSaclone () const
 Creates a clone of this ChildSa.
virtual void setState (CHILD_SA_STATE next_state)
 Sets the state for this ChildSa.
virtual auto_ptr< ByteArraygetId () const
 Gets the ChildSa ID (the inbound SPI).
virtual CHILD_SA_STATE getState () const
 Gets the ChildSa state.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Static Public Member Functions

static ChildSahasMinNonce (const ChildSa &child_sa1, const ChildSa &child_sa2)
 Determines what ChildSa has the minimal nonce value.

Public Attributes

uint32_t inbound_spi
 SPI of the inbound IPsec SA.
uint32_t outbound_spi
 SPI of the outbound IPsec SA.
bool child_sa_initiator
 Indicates if we are the initiators of this ChildSa.
auto_ptr< Payload_TSmy_traffic_selector
 My traffic selector for this ChildSa.
auto_ptr< Payload_TSpeer_traffic_selector
 Peer traffic selector for this ChildSa.
auto_ptr< ByteArraymy_nonce
 My nonce for this ChildSa.
auto_ptr< ByteArraypeer_nonce
 Peer nonce for this ChildSa.
auto_ptr< KeyRingkeyring
 Keyring for this ChildSa.
auto_ptr< DiffieHellmanpfs_dh
 DiffieHellman object for this ChildSa when PFS is desired.
Enums::IPSEC_MODE mode
 IPsec mode of the ChildSa.
Enums::PROTOCOL_ID ipsec_protocol
 IPsec protocol ID.
uint32_t reqid
 Request ID of the ChildSa.
auto_ptr< AttributeMapattributemap
 Extra Attributes.

Static Protected Member Functions

static string CHILD_SA_STATE_STR (CHILD_SA_STATE state)
 Returns the textual representation of a CHILD_SA_STATE value.

Protected Attributes

auto_ptr< IpsecConfigurationipsec_configuration
 IPsec configuration to be used with this ChildSa.
CHILD_SA_STATE state
 ChildSa state.

Detailed Description

This class represents a CHILD_SA.

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


Member Enumeration Documentation

enum openikev2::ChildSa::CHILD_SA_STATE

ChildSa states.

Enumerator:
CHILD_SA_CREATING  ChildSa is not yet created.
CHILD_SA_ESTABLISHED  ChildSa is established.
CHILD_SA_DELETING  A delete informational has been sent for this ChildSa.
CHILD_SA_REKEYED  The ChildSa has been rekeyed (usually by the other peer).
CHILD_SA_REKEYING  The ChildSa is being rekeyed and it is waiting for the response.


Constructor & Destructor Documentation

openikev2::ChildSa::ChildSa ( bool  child_sa_initiator  ) 

Creates a new empty ChildSa.

Parameters:
child_sa_initiator Indicates if we are the initiators of this ChildSa

openikev2::ChildSa::ChildSa ( uint32_t  spi_in,
uint32_t  spi_out,
Enums::IPSEC_MODE  mode,
Enums::PROTOCOL_ID  ipsec_protocol,
bool  child_sa_initiator 
)

Creates a new ChildSa setting its parameters.

Parameters:
spi_in Inbound SPI
spi_out Outbound SPI
mode IPsec mode
ipsec_protocol IPsec protocol
child_sa_initiator Indicates if we are the initiators of this ChildSa


Member Function Documentation

string openikev2::ChildSa::CHILD_SA_STATE_STR ( CHILD_SA_STATE  state  )  [static, protected]

Returns the textual representation of a CHILD_SA_STATE value.

Parameters:
state CHILD_SA_STATE value
Returns:
Textual respresentation

ChildSa & openikev2::ChildSa::hasMinNonce ( const ChildSa child_sa1,
const ChildSa child_sa2 
) [static]

Determines what ChildSa has the minimal nonce value.

Parameters:
child_sa1 ChildSa object to compare its nonces
child_sa2 ChildSa object to compare its nonces
Returns:
The ChildSa with the minimal nonce value

Proposal & openikev2::ChildSa::getProposal (  )  const [virtual]

Gets the proposal to be used for this ChildSa.

Returns:
ChildSa proposal

IpsecConfiguration & openikev2::ChildSa::getIpsecConfiguration (  )  const [virtual]

Gets the IPsec configuration of this ChildSa.

Returns:
IPsec configuration

void openikev2::ChildSa::setProposal ( auto_ptr< Proposal new_proposal  )  [virtual]

Changes the ChildSa proposal.

Parameters:
new_proposal New proposal to use with this ChildSa.

void openikev2::ChildSa::setIpsecConfiguration ( auto_ptr< IpsecConfiguration ipsec_configuration  )  [virtual]

Changes the entire IpsecConfiguration of the CHILD_SA.

Parameters:
ipsec_configuration New IPsec configuration to be established

bool openikev2::ChildSa::equals ( const ChildSa other  )  const [virtual]

Indicates if a ChildSa is equal to another.

Parameters:
other Other ChildSa
Returns:
TRUE if both are equals. FALSE otherwise.

auto_ptr< ChildSa > openikev2::ChildSa::clone (  )  const [virtual]

Creates a clone of this ChildSa.

Returns:
The new ChildSa.

void openikev2::ChildSa::setState ( CHILD_SA_STATE  next_state  )  [virtual]

Sets the state for this ChildSa.

Parameters:
next_state The new state

auto_ptr< ByteArray > openikev2::ChildSa::getId (  )  const [virtual]

Gets the ChildSa ID (the inbound SPI).

Returns:
The ChildSa ID

ChildSa::CHILD_SA_STATE openikev2::ChildSa::getState (  )  const [virtual]

Gets the ChildSa state.

Returns:
The current state

string openikev2::ChildSa::toStringTab ( uint8_t  tabs  )  const [virtual]

Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Parameters:
tabs Num of tabs preceding the textual representation.
Returns:
Textual tabulated represetation of the object.

Implements openikev2::Printable.


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