openikev2::Payload_TS Class Reference

This class represents a Traffic Selector Payload. More...

#include <payload_ts.h>

Inheritance diagram for openikev2::Payload_TS:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Payload_TS (const Payload_TS &other)
 Creates a new Payload_TS from other.
virtual void addTrafficSelector (auto_ptr< TrafficSelector > traffic_selector)
 Adds a TrafficSelector to the Payload.
virtual bool operator== (const Payload_TS &other) const
 Compares this Payload_TS with another.
virtual bool hasTrafficSelector (const TrafficSelector &traffic_selector) const
 Indicates if the Payload_TS has the indicated traffic_selector.
vector< TrafficSelector * > getTrafficSelectors () const
 Gets the internal traffic selectors of the payload.
virtual void getBinaryRepresentation (ByteBuffer &byte_buffer) const
 Appends the binary representation of the Payload at the end of the buffer, without the fixed header.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.
virtual auto_ptr< Payloadclone () const
 Cets a clone of this payload.

Protected Member Functions

 Payload_TS ()
 Creates a new empty Payload_TS.
 Payload_TS (ByteBuffer &byte_buffer)
 Creates a new Payload_TS based on its binary representation.
 Payload_TS (auto_ptr< TrafficSelector > traffic_selector)
 Creates a new Payload_TS inserting the indicated TrafficSelector.

Protected Attributes

AutoVector< TrafficSelectortraffic_selectors
 Collection of TrafficSelector objects.

Detailed Description

This class represents a Traffic Selector Payload.

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


Constructor & Destructor Documentation

openikev2::Payload_TS::Payload_TS ( ByteBuffer byte_buffer  )  [protected]

Creates a new Payload_TS based on its binary representation.

Parameters:
byte_buffer Buffer with its read pointer at the "payload length" field

openikev2::Payload_TS::Payload_TS ( auto_ptr< TrafficSelector traffic_selector  )  [protected]

Creates a new Payload_TS inserting the indicated TrafficSelector.

Parameters:
traffic_selector TrafficSelector to be inserted.

openikev2::Payload_TS::Payload_TS ( const Payload_TS other  ) 

Creates a new Payload_TS from other.

Parameters:
other Other Payload_TS to be cloned.


Member Function Documentation

void openikev2::Payload_TS::addTrafficSelector ( auto_ptr< TrafficSelector traffic_selector  )  [virtual]

Adds a TrafficSelector to the Payload.

Parameters:
traffic_selector TrafficSelector to be added.

bool openikev2::Payload_TS::operator== ( const Payload_TS other  )  const [virtual]

Compares this Payload_TS with another.

Parameters:
other Other Payload_TS
Returns:
TRUE if payloads are equals. FALSE otherwise.

bool openikev2::Payload_TS::hasTrafficSelector ( const TrafficSelector traffic_selector  )  const [virtual]

Indicates if the Payload_TS has the indicated traffic_selector.

Parameters:
traffic_selector Traffic selector
Returns:
TRUE if found. FALSE otherwise

vector< TrafficSelector * > openikev2::Payload_TS::getTrafficSelectors (  )  const

Gets the internal traffic selectors of the payload.

Returns:
The traffic selectors

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

Appends the binary representation of the Payload at the end of the buffer, without the fixed header.

Parameters:
byte_buffer Byte buffer where append the binary representation

Implements openikev2::Payload.

string openikev2::Payload_TS::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::Payload.

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

Cets a clone of this payload.

Returns:
Clone of the payload.

Implements openikev2::Payload.


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