Migrated generator_t to INIT/METHOD macros

This commit is contained in:
Martin Willi
2010-08-19 12:35:53 +02:00
parent 0cca7427c7
commit 92a4540aca
2 changed files with 32 additions and 53 deletions
+1 -13
View File
@@ -28,25 +28,13 @@ typedef struct generator_t generator_t;
#include <encoding/payloads/encodings.h>
#include <encoding/payloads/payload.h>
/**
* Generating is done in a data buffer.
* This is the start size of this buffer in bytes.
*/
#define GENERATOR_DATA_BUFFER_SIZE 500
/**
* Number of bytes to increase the buffer, if it is too small.
*/
#define GENERATOR_DATA_BUFFER_INCREASE_VALUE 500
/**
* A generator_t class used to generate IKEv2 payloads.
*
* After creation, multiple payloads can be generated with the generate_payload
* method. The generated bytes are appended. After all payloads are added,
* the write_to_chunk method writes out all generated data since
* the creation of the generator. After that, the generator must be destroyed.
* the creation of the generator.
* The generater uses a set of encoding rules, which it can get from
* the supplied payload. With this rules, the generater can generate
* the payload and all substructures automatically.