Moved data structures to new collections subfolder

This commit is contained in:
Tobias Brunner
2012-10-24 16:00:49 +02:00
parent fdee6b5f5a
commit 12642a6831
229 changed files with 338 additions and 332 deletions
+4 -4
View File
@@ -19,7 +19,7 @@
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
#include <utils/linked_list.h>
#include <collections/linked_list.h>
#include <debug.h>
@@ -114,12 +114,12 @@ METHOD(pa_tnc_attr_t, build, void,
{
return;
}
writer = bio_writer_create(ATTR_REQUEST_ENTRY_SIZE *
writer = bio_writer_create(ATTR_REQUEST_ENTRY_SIZE *
this->list->get_count(this->list));
enumerator = this->list->create_enumerator(this->list);
while (enumerator->enumerate(enumerator, &entry))
{
{
writer->write_uint32(writer, entry->vendor_id);
writer->write_uint32(writer, entry->type);
}
@@ -161,7 +161,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
reader = bio_reader_create(this->value);
while (count--)
{
reader->read_uint8 (reader, &reserved);
reader->read_uint8 (reader, &reserved);
reader->read_uint24(reader, &vendor_id);
reader->read_uint32(reader, &type);
@@ -20,7 +20,7 @@
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
#include <utils/linked_list.h>
#include <collections/linked_list.h>
#include <debug.h>
@@ -87,7 +87,7 @@ struct package_entry_t {
chunk_t version;
};
/**
/**
* Free a package entry
*/
static void free_package_entry(package_entry_t *entry)
@@ -169,7 +169,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
reader->read_uint16(reader, &reserved);
reader->read_uint16(reader, &count);
*offset = INSTALLED_PACKAGES_MIN_SIZE;
while (reader->remaining(reader))
{
if (!reader->read_data8(reader, &name))
@@ -190,7 +190,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
{
DBG1(DBG_TNC, "insufficient data for IETF installed package version");
goto end;
}
}
pos = memchr(version.ptr, '\0', version.len);
if (pos)
{
@@ -199,8 +199,8 @@ METHOD(pa_tnc_attr_t, process, status_t,
goto end;
}
*offset += 1 + version.len;
entry = malloc_thing(package_entry_t);
entry = malloc_thing(package_entry_t);
entry->name = chunk_clone(name);
entry->version = chunk_clone(version);
this->packages->insert_last(this->packages, entry);
@@ -216,7 +216,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
end:
reader->destroy(reader);
return status;
return status;
}
METHOD(pa_tnc_attr_t, get_ref, pa_tnc_attr_t*,
@@ -249,7 +249,7 @@ METHOD(ietf_attr_installed_packages_t, add, void,
entry = malloc_thing(package_entry_t);
entry->name = chunk_clone(name);
entry->version = chunk_clone(version);
this->packages->insert_last(this->packages, entry);
this->packages->insert_last(this->packages, entry);
}
/**
+4 -4
View File
@@ -17,7 +17,7 @@
#include <pa_tnc/pa_tnc_msg.h>
#include <bio/bio_writer.h>
#include <bio/bio_reader.h>
#include <utils/linked_list.h>
#include <collections/linked_list.h>
#include <debug.h>
@@ -152,7 +152,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
while (reader->remaining(reader))
{
entry = malloc_thing(port_entry_t);
entry = malloc_thing(port_entry_t);
reader->read_uint8 (reader, &blocked);
entry->blocked = blocked & 0x01;
reader->read_uint8 (reader, &entry->protocol);
@@ -161,7 +161,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
}
reader->destroy(reader);
return SUCCESS;
return SUCCESS;
}
METHOD(pa_tnc_attr_t, get_ref, pa_tnc_attr_t*,
@@ -192,7 +192,7 @@ METHOD(ietf_attr_port_filter_t, add_port, void,
entry->blocked = blocked;
entry->protocol = protocol;
entry->port = port;
this->ports->insert_last(this->ports, entry);
this->ports->insert_last(this->ports, entry);
}
/**