- moved linked_list_iterator_t to iterator_t, located in iterator.h
This commit is contained in:
@@ -870,7 +870,7 @@ static status_t generate_payload (private_generator_t *this,payload_t *payload)
|
||||
/* proposals are stored in a linked list and so accessed */
|
||||
linked_list_t *proposals = *((linked_list_t **)(this->data_struct + rules[i].offset));
|
||||
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
/* create forward iterator */
|
||||
status = proposals->create_iterator(proposals,&iterator,TRUE);
|
||||
if (status != SUCCESS)
|
||||
@@ -922,7 +922,7 @@ static status_t generate_payload (private_generator_t *this,payload_t *payload)
|
||||
u_int16_t length_of_proposal = PROPOSAL_SUBSTRUCTURE_HEADER_LENGTH + this->last_spi_size;
|
||||
u_int16_t int16_val;
|
||||
linked_list_t *transforms = *((linked_list_t **)(this->data_struct + rules[i].offset));
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
|
||||
/* create forward iterator */
|
||||
status = transforms->create_iterator(transforms,&iterator,TRUE);
|
||||
@@ -972,7 +972,7 @@ static status_t generate_payload (private_generator_t *this,payload_t *payload)
|
||||
u_int16_t int16_val;
|
||||
linked_list_t *transform_attributes =*((linked_list_t **)(this->data_struct + rules[i].offset));
|
||||
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
/* create forward iterator */
|
||||
status = transform_attributes->create_iterator(transform_attributes,&iterator,TRUE);
|
||||
if (status != SUCCESS)
|
||||
|
||||
@@ -445,7 +445,7 @@ static status_t get_destination(private_message_t *this, host_t **host)
|
||||
}
|
||||
|
||||
|
||||
static status_t get_payload_iterator(private_message_t *this, linked_list_iterator_t **iterator)
|
||||
static status_t get_payload_iterator(private_message_t *this, iterator_t **iterator)
|
||||
{
|
||||
return this->payloads->create_iterator(this->payloads, iterator, TRUE);
|
||||
}
|
||||
@@ -460,7 +460,7 @@ static status_t generate(private_message_t *this, packet_t **packet)
|
||||
generator_t *generator;
|
||||
ike_header_t *ike_header;
|
||||
payload_t *payload, *next_payload;
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
status_t status;
|
||||
|
||||
|
||||
@@ -692,7 +692,7 @@ static status_t parse_body (private_message_t *this)
|
||||
}
|
||||
else
|
||||
{
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
|
||||
status = this->payloads->create_iterator(this->payloads,&iterator,TRUE);
|
||||
if (status != SUCCESS)
|
||||
@@ -756,7 +756,7 @@ static status_t parse_body (private_message_t *this)
|
||||
*/
|
||||
static status_t destroy (private_message_t *this)
|
||||
{
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
|
||||
this->packet->destroy(this->packet);
|
||||
|
||||
@@ -814,7 +814,7 @@ message_t *message_create_from_packet(packet_t *packet)
|
||||
this->public.get_source = (status_t (*) (message_t*,host_t**)) get_source;
|
||||
this->public.set_destination = (status_t (*) (message_t*,host_t*)) set_destination;
|
||||
this->public.get_destination = (status_t (*) (message_t*,host_t**)) get_destination;
|
||||
this->public.get_payload_iterator = (status_t (*) (message_t *, linked_list_iterator_t **)) get_payload_iterator;
|
||||
this->public.get_payload_iterator = (status_t (*) (message_t *, iterator_t **)) get_payload_iterator;
|
||||
this->public.parse_header = (status_t (*) (message_t *)) parse_header;
|
||||
this->public.parse_body = (status_t (*) (message_t *)) parse_body;
|
||||
this->public.destroy = (status_t(*)(message_t*))destroy;
|
||||
|
||||
@@ -234,7 +234,7 @@ struct message_t {
|
||||
status_t (*set_source) (message_t *this, host_t *host);
|
||||
status_t (*get_destination) (message_t *this, host_t **host);
|
||||
status_t (*set_destination) (message_t *this, host_t *host);
|
||||
status_t (*get_payload_iterator) (message_t *this, linked_list_iterator_t **iterator);
|
||||
status_t (*get_payload_iterator) (message_t *this, iterator_t **iterator);
|
||||
|
||||
/**
|
||||
* @brief Destroys a message and all including objects
|
||||
|
||||
@@ -221,7 +221,7 @@ static size_t get_length(private_proposal_substructure_t *this)
|
||||
* Implements proposal_substructure_t's create_transform_substructure_iterator function.
|
||||
* See #proposal_substructure_s.create_transform_substructure_iterator for description.
|
||||
*/
|
||||
static status_t create_transform_substructure_iterator (private_proposal_substructure_t *this,linked_list_iterator_t **iterator,bool forward)
|
||||
static status_t create_transform_substructure_iterator (private_proposal_substructure_t *this,iterator_t **iterator,bool forward)
|
||||
{
|
||||
return (this->transforms->create_iterator(this->transforms,iterator,forward));
|
||||
}
|
||||
@@ -333,7 +333,7 @@ static chunk_t get_spi (private_proposal_substructure_t *this)
|
||||
*/
|
||||
static status_t compute_length (private_proposal_substructure_t *this)
|
||||
{
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
status_t status;
|
||||
size_t transforms_count = 0;
|
||||
size_t length = PROPOSAL_SUBSTRUCTURE_HEADER_LENGTH;
|
||||
@@ -365,7 +365,7 @@ static status_t compute_length (private_proposal_substructure_t *this)
|
||||
static status_t clone(private_proposal_substructure_t *this, private_proposal_substructure_t **clone)
|
||||
{
|
||||
private_proposal_substructure_t * new_clone;
|
||||
linked_list_iterator_t *transforms;
|
||||
iterator_t *transforms;
|
||||
status_t status;
|
||||
|
||||
new_clone = (private_proposal_substructure_t *) proposal_substructure_create();
|
||||
@@ -477,7 +477,7 @@ proposal_substructure_t *proposal_substructure_create()
|
||||
this->public.payload_interface.destroy = (status_t (*) (payload_t *))destroy;
|
||||
|
||||
/* public functions */
|
||||
this->public.create_transform_substructure_iterator = (status_t (*) (proposal_substructure_t *,linked_list_iterator_t **,bool)) create_transform_substructure_iterator;
|
||||
this->public.create_transform_substructure_iterator = (status_t (*) (proposal_substructure_t *,iterator_t **,bool)) create_transform_substructure_iterator;
|
||||
this->public.add_transform_substructure = (status_t (*) (proposal_substructure_t *,transform_substructure_t *)) add_transform_substructure;
|
||||
this->public.set_proposal_number = (status_t (*) (proposal_substructure_t *,u_int8_t))set_proposal_number;
|
||||
this->public.get_proposal_number = (u_int8_t (*) (proposal_substructure_t *)) get_proposal_number;
|
||||
|
||||
@@ -77,7 +77,7 @@ struct proposal_substructure_t {
|
||||
* - SUCCESS or
|
||||
* - OUT_OF_RES if iterator could not be created
|
||||
*/
|
||||
status_t (*create_transform_substructure_iterator) (proposal_substructure_t *this,linked_list_iterator_t **iterator, bool forward);
|
||||
status_t (*create_transform_substructure_iterator) (proposal_substructure_t *this,iterator_t **iterator, bool forward);
|
||||
|
||||
/**
|
||||
* @brief Adds a transform_substructure_t object to this object.
|
||||
|
||||
@@ -122,7 +122,7 @@ static status_t verify(private_sa_payload_t *this)
|
||||
{
|
||||
int proposal_number = 1;
|
||||
status_t status;
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
bool first = TRUE;
|
||||
|
||||
if (this->critical)
|
||||
@@ -253,7 +253,7 @@ static size_t get_length(private_sa_payload_t *this)
|
||||
* Implements sa_payload_t's create_proposal_substructure_iterator function.
|
||||
* See #sa_payload_s.create_proposal_substructure_iterator for description.
|
||||
*/
|
||||
static status_t create_proposal_substructure_iterator (private_sa_payload_t *this,linked_list_iterator_t **iterator,bool forward)
|
||||
static status_t create_proposal_substructure_iterator (private_sa_payload_t *this,iterator_t **iterator,bool forward)
|
||||
{
|
||||
return (this->proposals->create_iterator(this->proposals,iterator,forward));
|
||||
}
|
||||
@@ -276,7 +276,7 @@ static status_t add_proposal_substructure (private_sa_payload_t *this,proposal_s
|
||||
*/
|
||||
static status_t compute_length (private_sa_payload_t *this)
|
||||
{
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
status_t status;
|
||||
size_t length = SA_PAYLOAD_HEADER_LENGTH;
|
||||
status = this->proposals->create_iterator(this->proposals,&iterator,TRUE);
|
||||
@@ -318,7 +318,7 @@ sa_payload_t *sa_payload_create()
|
||||
this->public.payload_interface.destroy = (status_t (*) (payload_t *))destroy;
|
||||
|
||||
/* public functions */
|
||||
this->public.create_proposal_substructure_iterator = (status_t (*) (sa_payload_t *,linked_list_iterator_t **,bool)) create_proposal_substructure_iterator;
|
||||
this->public.create_proposal_substructure_iterator = (status_t (*) (sa_payload_t *,iterator_t **,bool)) create_proposal_substructure_iterator;
|
||||
this->public.add_proposal_substructure = (status_t (*) (sa_payload_t *,proposal_substructure_t *)) add_proposal_substructure;
|
||||
this->public.destroy = (status_t (*) (sa_payload_t *)) destroy;
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ struct sa_payload_t {
|
||||
* - SUCCESS or
|
||||
* - OUT_OF_RES if iterator could not be created
|
||||
*/
|
||||
status_t (*create_proposal_substructure_iterator) (sa_payload_t *this,linked_list_iterator_t **iterator, bool forward);
|
||||
status_t (*create_proposal_substructure_iterator) (sa_payload_t *this,iterator_t **iterator, bool forward);
|
||||
|
||||
/**
|
||||
* @brief Adds a proposal_substructure_t object to this object.
|
||||
|
||||
@@ -334,7 +334,7 @@ static size_t get_length(private_transform_substructure_t *this)
|
||||
* Implements transform_substructure_t's create_transform_attribute_iterator function.
|
||||
* See #transform_substructure_s.create_transform_attribute_iterator for description.
|
||||
*/
|
||||
static status_t create_transform_attribute_iterator (private_transform_substructure_t *this,linked_list_iterator_t **iterator,bool forward)
|
||||
static status_t create_transform_attribute_iterator (private_transform_substructure_t *this,iterator_t **iterator,bool forward)
|
||||
{
|
||||
return (this->attributes->create_iterator(this->attributes,iterator,forward));
|
||||
}
|
||||
@@ -423,7 +423,7 @@ static u_int16_t get_transform_id (private_transform_substructure_t *this)
|
||||
*/
|
||||
static status_t compute_length (private_transform_substructure_t *this)
|
||||
{
|
||||
linked_list_iterator_t *iterator;
|
||||
iterator_t *iterator;
|
||||
status_t status;
|
||||
size_t length = TRANSFORM_SUBSTRUCTURE_HEADER_LENGTH;
|
||||
status = this->attributes->create_iterator(this->attributes,&iterator,TRUE);
|
||||
@@ -451,7 +451,7 @@ static status_t compute_length (private_transform_substructure_t *this)
|
||||
static status_t clone(private_transform_substructure_t *this,transform_substructure_t **clone)
|
||||
{
|
||||
private_transform_substructure_t *new_clone;
|
||||
linked_list_iterator_t *attributes;
|
||||
iterator_t *attributes;
|
||||
status_t status;
|
||||
|
||||
new_clone = (private_transform_substructure_t *) transform_substructure_create();
|
||||
@@ -547,7 +547,7 @@ transform_substructure_t *transform_substructure_create()
|
||||
this->public.payload_interface.destroy = (status_t (*) (payload_t *))destroy;
|
||||
|
||||
/* public functions */
|
||||
this->public.create_transform_attribute_iterator = (status_t (*) (transform_substructure_t *,linked_list_iterator_t **,bool)) create_transform_attribute_iterator;
|
||||
this->public.create_transform_attribute_iterator = (status_t (*) (transform_substructure_t *,iterator_t **,bool)) create_transform_attribute_iterator;
|
||||
this->public.add_transform_attribute = (status_t (*) (transform_substructure_t *,transform_attribute_t *)) add_transform_attribute;
|
||||
this->public.set_is_last_transform = (status_t (*) (transform_substructure_t *,bool)) set_is_last_transform;
|
||||
this->public.get_is_last_transform = (bool (*) (transform_substructure_t *)) get_is_last_transform;
|
||||
|
||||
@@ -194,7 +194,7 @@ struct transform_substructure_t {
|
||||
* - SUCCESS or
|
||||
* - OUT_OF_RES if iterator could not be created
|
||||
*/
|
||||
status_t (*create_transform_attribute_iterator) (transform_substructure_t *this,linked_list_iterator_t **iterator, bool forward);
|
||||
status_t (*create_transform_attribute_iterator) (transform_substructure_t *this,iterator_t **iterator, bool forward);
|
||||
|
||||
/**
|
||||
* @brief Adds a transform_attribute_t object to this object.
|
||||
|
||||
Reference in New Issue
Block a user