- removed memory allocation checks!!!
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
/**
|
||||
* @file notify_payload.h
|
||||
*
|
||||
* @brief Declaration of the class notify_payload_t.
|
||||
*
|
||||
* An object of this type represents an IKEv2 Notify-Payload.
|
||||
*
|
||||
* See section 3.10 of Draft for details of this payload type.
|
||||
* @brief Interface of notify_payload_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,26 +29,32 @@
|
||||
#include <utils/linked_list.h>
|
||||
|
||||
/**
|
||||
* Critical flag must not be set
|
||||
* Critical flag must not be set.
|
||||
*
|
||||
* @ingroup payloads
|
||||
*/
|
||||
#define NOTIFY_PAYLOAD_CRITICAL_FLAG FALSE;
|
||||
|
||||
/**
|
||||
* Notify payload length in bytes without any spi and notification data
|
||||
* Notify payload length in bytes without any spi and notification data.
|
||||
*
|
||||
* @ingroup payloads
|
||||
*/
|
||||
#define NOTIFY_PAYLOAD_HEADER_LENGTH 8
|
||||
|
||||
typedef struct notify_payload_t notify_payload_t;
|
||||
|
||||
/**
|
||||
* Object representing an IKEv2-Notify Payload
|
||||
* Object representing an IKEv2-Notify Payload.
|
||||
*
|
||||
* The Notify Payload format is described in Draft section 3.10.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @ingroup payloads
|
||||
*/
|
||||
struct notify_payload_t {
|
||||
/**
|
||||
* implements payload_t interface
|
||||
* The payload_t interface.
|
||||
*/
|
||||
payload_t payload_interface;
|
||||
|
||||
@@ -69,9 +71,8 @@ struct notify_payload_t {
|
||||
*
|
||||
* @param this calling notify_payload_t object
|
||||
* @param protocol_id protocol id to set
|
||||
* @return SUCCESS
|
||||
*/
|
||||
status_t (*set_protocol_id) (notify_payload_t *this, u_int8_t protocol_id);
|
||||
void (*set_protocol_id) (notify_payload_t *this, u_int8_t protocol_id);
|
||||
|
||||
/**
|
||||
* @brief Gets the notify message type of this payload.
|
||||
@@ -86,9 +87,8 @@ struct notify_payload_t {
|
||||
*
|
||||
* @param this calling notify_payload_t object
|
||||
* @param notify_message_type notify message type to set
|
||||
* @return SUCCESS
|
||||
*/
|
||||
status_t (*set_notify_message_type) (notify_payload_t *this, u_int16_t notify_message_type);
|
||||
void (*set_notify_message_type) (notify_payload_t *this, u_int16_t notify_message_type);
|
||||
|
||||
/**
|
||||
* @brief Returns the currently set spi of this payload.
|
||||
@@ -107,11 +107,8 @@ struct notify_payload_t {
|
||||
*
|
||||
* @param this calling notify_payload_t object
|
||||
* @param spi chunk_t pointing to the value to set
|
||||
* @return
|
||||
* - SUCCESS or
|
||||
* - OUT_OF_RES
|
||||
*/
|
||||
status_t (*set_spi) (notify_payload_t *this, chunk_t spi);
|
||||
void (*set_spi) (notify_payload_t *this, chunk_t spi);
|
||||
|
||||
/**
|
||||
* @brief Returns the currently set notification data of payload.
|
||||
@@ -130,28 +127,23 @@ struct notify_payload_t {
|
||||
*
|
||||
* @param this calling notify_payload_t object
|
||||
* @param notification_data chunk_t pointing to the value to set
|
||||
* @return
|
||||
* - SUCCESS or
|
||||
* - OUT_OF_RES
|
||||
*/
|
||||
status_t (*set_notification_data) (notify_payload_t *this, chunk_t notification_data);
|
||||
void (*set_notification_data) (notify_payload_t *this, chunk_t notification_data);
|
||||
|
||||
/**
|
||||
* @brief Destroys an notify_payload_t object.
|
||||
*
|
||||
* @param this notify_payload_t object to destroy
|
||||
* @return
|
||||
* SUCCESS in any case
|
||||
*/
|
||||
status_t (*destroy) (notify_payload_t *this);
|
||||
void (*destroy) (notify_payload_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Creates an empty notify_payload_t object
|
||||
*
|
||||
* @return
|
||||
* - created notify_payload_t object, or
|
||||
* - NULL if failed
|
||||
* @return created notify_payload_t object
|
||||
*
|
||||
* @ingroup payloads
|
||||
*/
|
||||
notify_payload_t *notify_payload_create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user