|
Public Types |
| enum | EXCHANGE_TYPE { IKE_SA_INIT = 34,
IKE_AUTH,
CREATE_CHILD_SA,
INFORMATIONAL
} |
| | Exhange types. More...
|
| enum | MESSAGE_TYPE { REQUEST = 0,
RESPONSE
} |
| | Message types. More...
|
Public Member Functions |
| | Message (auto_ptr< IpAddress > src_addr, auto_ptr< IpAddress > dst_addr, uint64_t spi_i, uint64_t spi_r, uint8_t major_version, uint8_t minor_version, EXCHANGE_TYPE exchange_type, MESSAGE_TYPE message_type, bool is_initiator, bool can_use_higher_major_version, uint32_t message_id) |
| | Creates a new Message, setting its attributes.
|
| | Message (auto_ptr< IpAddress > src_addr, auto_ptr< IpAddress > dst_addr, ByteBuffer &byte_buffer) |
| | Creates a new Message based on its binary representation.
|
| | Message (const Message &other) |
| | Creates a new Message cloning another one.
|
| vector< Payload * > | getPayloadsByType (Payload::PAYLOAD_TYPE type) const |
| | Gets all the Payloads of the indicated type found in the Message.
|
| Payload * | getFirstPayloadByType (Payload::PAYLOAD_TYPE type) const |
| | Gets the first Payload with that type found in the Message.
|
| Payload & | getUniquePayloadByType (Payload::PAYLOAD_TYPE type) const |
| | Gets the unique Payload with the indicated type found in the Message.
|
| vector< Payload_NOTIFY * > | getNotifiesByType (Payload_NOTIFY::NOTIFY_TYPE notification_type) const |
| | Gets a collection of all the notification payloads of the indicated type.
|
| Payload_NOTIFY * | getFirstNotifyByType (Payload_NOTIFY::NOTIFY_TYPE notification_type) const |
| | Gets the first notification payload of the indicated type.
|
| Payload_NOTIFY & | getUniqueNotifyByType (Payload_NOTIFY::NOTIFY_TYPE notification_type) const |
| | Gets the unique notification payload with the indicated notification type found in the Message.
|
| void | addPayload (auto_ptr< Payload > payload, bool is_encrypted) |
| | Adds a Payload to the Message.
|
| void | replaceFirstPayloadByType (Payload::PAYLOAD_TYPE type, auto_ptr< Payload > new_payload) |
| | Replaces the first payload of the indicated type.
|
| void | replaceFirstNotifyByType (Payload_NOTIFY::NOTIFY_TYPE notify_type, auto_ptr< Payload_NOTIFY > new_payload) |
| | Replaces the first notify payload of the indicated type.
|
| void | addPayloadNotify (auto_ptr< Payload_NOTIFY > notify_payload, bool is_encrypted) |
| | Adds a notification payload.
|
| void | addPayloadsNotify (AutoVector< Payload_NOTIFY > notifies, bool is_encrypted) |
| | Add a notification payload collection.
|
| ByteArray & | getBinaryRepresentation (Cipher *cipher) |
| | Gets the binary representation of the Message.
|
| void | decryptPayloadSK (Cipher *cipher) |
| | Decrypts the Payload_SK and generates the contained Payloads The geneated Payloads are stored into the encrypted_payloads collection.
|
| bool | checkIntegrity (Cipher *cipher) const |
| | Checks the Message integrity.
|
| auto_ptr< Message > | clone () const |
| | Clone this message.
|
| IpAddress & | getSrcAddress () const |
| | Gets the source addres of the Message.
|
| IpAddress & | getDstAddress () const |
| | Gets the destiantion addres of the Message.
|
| 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 | EXCHANGE_TYPE_STR (EXCHANGE_TYPE exchange_type) |
| | Translates from exchange type IDs to strings in order to be easily recognized.
|
| static string | MESSAGE_TYPE_STR (MESSAGE_TYPE message_type) |
| | Translates from message type to strings in order to be easily recognized.
|
Public Attributes |
|
bool | can_use_higher_major_version |
| | This flag indicates that the transmiter is able to speaking a higher major version.
|
|
uint8_t | major_version |
| | Message protocol major version.
|
|
uint8_t | minor_version |
| | Message protocol minor version.
|
|
EXCHANGE_TYPE | exchange_type |
| | Message exchange type.
|
|
MESSAGE_TYPE | message_type |
| | Indicates if the message is a request or a response.
|
|
bool | is_initiator |
| | This flag indicates that the transmitter is the original initiator.
|
|
uint64_t | spi_i |
| | Initiator SPI.
|
|
uint64_t | spi_r |
| | Responder SPI.
|
|
uint32_t | message_id |
| | Message ID.
|
Static Protected Member Functions |
| static Payload::PAYLOAD_TYPE | generatePayloads (Payload::PAYLOAD_TYPE first_payload_type, ByteBuffer &byte_buffer, vector< Payload * > &payloads) |
| | Generates all the payloads based on its binary representation.
|
| static auto_ptr< ByteArray > | generateBinaryRepresentation (Payload::PAYLOAD_TYPE last_payload_type, const vector< Payload * > payloads) |
| | Generates the binary representation of a Payload collection.
|
Protected Attributes |
|
AutoVector< Payload > | unencrypted_payloads |
| | Unencrypted Payload collection.
|
|
AutoVector< Payload > | encrypted_payloads |
| | Encrypted Payload collection.
|
|
Payload::PAYLOAD_TYPE | first_payload_type |
| | The type of the first payload in the mensage.
|
|
Payload::PAYLOAD_TYPE | first_payload_type_sk |
| | The type of the first payload in the payload_sk.
|
|
auto_ptr< IpAddress > | src_addr |
| | Source address.
|
|
auto_ptr< IpAddress > | dst_addr |
| | Destination address.
|
|
auto_ptr< ByteArray > | binary_representation |
| | Message binary representation.
|
|
auto_ptr< Payload_SK > | payload_sk |
| | Message Payload_SK.
|