- source code documentation improved
This commit is contained in:
+18
-15
@@ -38,32 +38,34 @@
|
||||
#define GENERATOR_DATA_BUFFER_INCREASE_VALUE 1000
|
||||
|
||||
/**
|
||||
* @brief A generator_t object which generates payloads of specific type
|
||||
*A generator_t object which generates payloads of specific type.
|
||||
*/
|
||||
typedef struct generator_s generator_t;
|
||||
|
||||
struct generator_s {
|
||||
|
||||
/**
|
||||
* @brief Generates a specific payload from given data struct
|
||||
* @brief Generates a specific payload from given data struct.
|
||||
*
|
||||
* Remember: Header and substructures are also seen as payloads
|
||||
* Remember: Header and substructures are also handled as payloads.
|
||||
*
|
||||
* @param generator generator object
|
||||
* @param payload_type payload type to generate using the given data struct
|
||||
* @param[in] data_struct Data struct where the needed data for generating are stored
|
||||
* @param[out] output pointer to a chunk_t where the data are generated to
|
||||
* @return SUCCESSFUL if succeeded,
|
||||
* NOT_SUPPORTED if payload_type is not supported
|
||||
* OUT_OF_RES if out of ressources
|
||||
* @param generator generator_t object
|
||||
* @param payload_type payload type to generate using the given data struct
|
||||
* @param[in] data_struct data struct where the needed data for generating are stored
|
||||
* @param[out] output pointer to a chunk_t where the data are generated to
|
||||
* @return
|
||||
* - SUCCESSFUL if succeeded
|
||||
* - NOT_SUPPORTED if payload_type is not supported
|
||||
* - OUT_OF_RES if out of ressources
|
||||
*/
|
||||
status_t (*generate_payload) (generator_t *this,payload_type_t payload_type,void * data_struct, chunk_t *data);
|
||||
|
||||
/**
|
||||
* @brief Destroys a generator object
|
||||
* @brief Destroys a generator_t object.
|
||||
*
|
||||
* @param generator generator object
|
||||
* @return SUCCESSFUL if succeeded, FAILED otherwise
|
||||
* @param generator generator_t object
|
||||
*
|
||||
* @return always success
|
||||
*/
|
||||
status_t (*destroy) (generator_t *this);
|
||||
};
|
||||
@@ -71,8 +73,9 @@ struct generator_s {
|
||||
/**
|
||||
* Constructor to create a generator
|
||||
*
|
||||
* @param payload_infos pointer to the payload_info_t-array containing
|
||||
* all the payload informations needed to automatic generate a specific payload
|
||||
* @param payload_infos pointer to the payload_info_t-array containing
|
||||
* all the payload informations needed to
|
||||
* automatic generate a specific payload
|
||||
*/
|
||||
generator_t * generator_create(payload_info_t ** payload_infos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user