openikev2::ConfigurationAttribute Class Reference

This class represents a Configuration Attribute in a Payload_CONF. More...

#include <configurationattribute.h>

Inheritance diagram for openikev2::ConfigurationAttribute:

Inheritance graph
[legend]
List of all members.

Public Types

enum  CONFIGURATION_ATTRIBUTE_TYPE {
  INTERNAL_IP4_ADDRESS = 1, INTERNAL_IP4_NETMASK = 2, INTERNAL_IP4_DNS = 3, INTERNAL_IP4_NBNS = 4,
  INTERNAL_ADDRESS_EXPIRY = 5, INTERNAL_IP4_DHCP = 6, APPLICATION_VERSION = 7, INTERNAL_IP6_ADDRESS = 8,
  INTERNAL_IP6_DNS = 10, INTERNAL_IP6_NBNS = 11, INTERNAL_IP6_DHCP = 12, INTERNAL_IP4_SUBNET = 13,
  SUPPORTED_ATTRIBUTES = 14, INTERNAL_IP6_SUBNET = 15
}
 < Configuration attribute type More...

Public Member Functions

 ConfigurationAttribute (CONFIGURATION_ATTRIBUTE_TYPE type, auto_ptr< ByteArray > value)
 Creates a new ConfigurationAttribute settings its value.
 ConfigurationAttribute (ByteBuffer &binary_representation)
 Creates a new ConfigurationAttribute based on its binary representation.
virtual auto_ptr< ConfigurationAttributeclone ()
 Creates a clone of this ConfigurationAttribute.
virtual void getBinaryRepresentation (ByteBuffer &byte_buffer) const
 Appends the binary representation at the end of byte_buffer.
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 string CONFIGURATION_ATTRIBUTE_TYPE_STR (CONFIGURATION_ATTRIBUTE_TYPE conf_attr)
 Returns the textual representation of a CONFIGURATION_ATTRIBUTE_TYPE value.

Public Attributes

CONFIGURATION_ATTRIBUTE_TYPE type
 Configuration attribute type.
auto_ptr< ByteArrayvalue
 Value of the configuration attribute.

Static Protected Member Functions

static void checkLength (CONFIGURATION_ATTRIBUTE_TYPE type, uint16_t len)
 Checks the if the length is valid for this kind of attribute.

Detailed Description

This class represents a Configuration Attribute in a Payload_CONF.

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


Member Enumeration Documentation

enum openikev2::ConfigurationAttribute::CONFIGURATION_ATTRIBUTE_TYPE

< Configuration attribute type

Enumerator:
INTERNAL_IP4_ADDRESS  Internal IPv4 address.
INTERNAL_IP4_NETMASK  Internal IPv4 netmask.
INTERNAL_IP4_DNS  Internal IPv4 DNS address.
INTERNAL_IP4_NBNS  Internal IPv4 NBNS address.
INTERNAL_ADDRESS_EXPIRY  Internal address time expiration.
INTERNAL_IP4_DHCP  Internal IPv4 DHCP sever.
INTERNAL_IP6_ADDRESS  Internal IPv6 address.
INTERNAL_IP6_DNS  Internal IPv6 DNS address.
INTERNAL_IP6_NBNS  Internal IPv6 NBNS address.
INTERNAL_IP6_DHCP  Internal IPv6 DHCP sever.
INTERNAL_IP4_SUBNET  Internal IPv4 subnet.
INTERNAL_IP6_SUBNET  Internal IPv6 subnet.


Constructor & Destructor Documentation

openikev2::ConfigurationAttribute::ConfigurationAttribute ( CONFIGURATION_ATTRIBUTE_TYPE  type,
auto_ptr< ByteArray value 
)

Creates a new ConfigurationAttribute settings its value.

Parameters:
type Type of the ConfigurationAttribute
value Value of the ConfigurationAttribute

openikev2::ConfigurationAttribute::ConfigurationAttribute ( ByteBuffer binary_representation  ) 

Creates a new ConfigurationAttribute based on its binary representation.

Parameters:
binary_representation Buffer with its read pointer at begin of a Configuration Attribute


Member Function Documentation

void openikev2::ConfigurationAttribute::checkLength ( CONFIGURATION_ATTRIBUTE_TYPE  type,
uint16_t  len 
) [static, protected]

Checks the if the length is valid for this kind of attribute.

Parameters:
type Attribute type
len Attribute len

string openikev2::ConfigurationAttribute::CONFIGURATION_ATTRIBUTE_TYPE_STR ( CONFIGURATION_ATTRIBUTE_TYPE  conf_attr  )  [static]

Returns the textual representation of a CONFIGURATION_ATTRIBUTE_TYPE value.

Parameters:
conf_attr CONFIGURATION_ATTRIBUTE_TYPE value
Returns:
Textual respresentation

auto_ptr< ConfigurationAttribute > openikev2::ConfigurationAttribute::clone (  )  [virtual]

Creates a clone of this ConfigurationAttribute.

Returns:
The created ConfigurationAttribute

void openikev2::ConfigurationAttribute::getBinaryRepresentation ( ByteBuffer byte_buffer  )  const [virtual]

Appends the binary representation at the end of byte_buffer.

Parameters:
byte_buffer ByteBuffer to append the binary representation

string openikev2::ConfigurationAttribute::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