diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-08-21 00:22:02 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-08-21 00:22:02 +0200 |
commit | ba922f99cb96073e5bb01b4409bcbfc92a4b82e1 (patch) | |
tree | 6d7f4dc1e2226850715205093cff18db04ba0f84 | |
parent | dbb7859f9f3a82da2c379d7f257a6810540e4dd8 (diff) | |
download | strongswan-ba922f99cb96073e5bb01b4409bcbfc92a4b82e1.tar.bz2 strongswan-ba922f99cb96073e5bb01b4409bcbfc92a4b82e1.tar.xz |
use pen_type_t for attribute request entries
-rw-r--r-- | src/libimcv/ietf/ietf_attr_attr_request.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/libimcv/ietf/ietf_attr_attr_request.c b/src/libimcv/ietf/ietf_attr_attr_request.c index 41040a5cf..c0dcd0983 100644 --- a/src/libimcv/ietf/ietf_attr_attr_request.c +++ b/src/libimcv/ietf/ietf_attr_attr_request.c @@ -24,7 +24,6 @@ #include <debug.h> typedef struct private_ietf_attr_attr_request_t private_ietf_attr_attr_request_t; -typedef struct entry_t entry_t; /** * PA-TNC Attribute Request type (see section 4.2.1 of RFC 5792) @@ -80,14 +79,6 @@ struct private_ietf_attr_attr_request_t { refcount_t ref; }; -/** - * Attribute type entry - */ -struct entry_t { - pen_t vendor_id; - u_int32_t type; -}; - METHOD(pa_tnc_attr_t, get_type, pen_type_t, private_ietf_attr_attr_request_t *this) { @@ -117,7 +108,7 @@ METHOD(pa_tnc_attr_t, build, void, { bio_writer_t *writer; enumerator_t *enumerator; - entry_t *entry; + pen_type_t *entry; if (this->value.ptr) { @@ -141,9 +132,9 @@ METHOD(pa_tnc_attr_t, build, void, METHOD(ietf_attr_attr_request_t, add, void, private_ietf_attr_attr_request_t *this, pen_t vendor_id, u_int32_t type) { - entry_t *entry; + pen_type_t *entry; - entry = malloc_thing(entry_t); + entry = malloc_thing(pen_type_t); entry->vendor_id = vendor_id; entry->type = type; this->list->insert_last(this->list, entry); @@ -211,22 +202,10 @@ METHOD(pa_tnc_attr_t, destroy, void, } } -/** - * Enumerate attribute type entries - */ -static bool entry_filter(void *null, entry_t **entry, pen_t *vendor_id, - void *i2, u_int32_t *type) -{ - *vendor_id = (*entry)->vendor_id; - *type = (*entry)->type; - return TRUE; -} - METHOD(ietf_attr_attr_request_t, create_enumerator, enumerator_t*, private_ietf_attr_attr_request_t *this) { - return enumerator_create_filter(this->list->create_enumerator(this->list), - (void*)entry_filter, NULL, NULL); + return this->list->create_enumerator(this->list); } /** |