* by calling get_length()!
*
* @param this calling transform_substructure_t object
- * @param iterator the created iterator is stored at the pointed pointer
* @param[in] forward iterator direction (TRUE: front to end)
+ * @return created iterator_t object.
*/
- void (*create_transform_attribute_iterator) (transform_substructure_t *this,iterator_t **iterator, bool forward);
+ iterator_t * (*create_transform_attribute_iterator) (transform_substructure_t *this, bool forward);
/**
* @brief Adds a transform_attribute_t object to this object.
* @brief Sets the next_payload field of this substructure
*
* If this is the last transform, next payload field is set to 0,
- * otherwise to 3 (payload type of transform in IKEv1)
+ * otherwise to 3
*
* @param this calling transform_substructure_t object
* @param is_last When TRUE, next payload field is set to 0, otherwise to 3
* @brief Clones an transform_substructure_t object.
*
* @param this transform_substructure_t object to clone
- * @param clone pointer to a transform_substructure_t object pointer
- * where the new object is stored to.
+ * @return cloned transform_substructure_t object
*/
- void (*clone) (transform_substructure_t *this,transform_substructure_t **clone);
+ transform_substructure_t* (*clone) (transform_substructure_t *this);
/**
* @brief Destroys an transform_substructure_t object.
};
/**
- * @brief Creates an empty transform_substructure_t object
+ * @brief Creates an empty transform_substructure_t object.
*
* @return created transform_substructure_t object
*
*/
transform_substructure_t *transform_substructure_create();
+/**
+ * @brief Creates an empty transform_substructure_t object.
+ *
+ * The key length is used for the transport types ENCRYPTION_ALGORITHM,
+ * PSEUDO_RANDOM_FUNCTION, INTEGRITY_ALGORITHM. For all
+ * other transport types the key_length parameter is not used
+ *
+ * @return created transform_substructure_t object
+ * @param transform_type type of transform to create
+ * @param transform_id transform id specifying the specific algorithm of a transform type
+ * @param key_length Key length for key lenght attribute
+ *
+ * @ingroup payloads
+ */
+transform_substructure_t *transform_substructure_create_type(transform_type_t transform_type, u_int16_t transform_id, u_int16_t key_length);
+
#endif /*TRANSFORM_SUBSTRUCTURE_H_*/