aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/ita/ita_attr_command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/ita/ita_attr_command.c')
-rw-r--r--src/libimcv/ita/ita_attr_command.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/libimcv/ita/ita_attr_command.c b/src/libimcv/ita/ita_attr_command.c
index d5a2bfcac..d43e4777b 100644
--- a/src/libimcv/ita/ita_attr_command.c
+++ b/src/libimcv/ita/ita_attr_command.c
@@ -33,14 +33,9 @@ struct private_ita_attr_command_t {
ita_attr_command_t public;
/**
- * Attribute vendor ID
+ * Vendor-specific attribute type
*/
- pen_t vendor_id;
-
- /**
- * Attribute type
- */
- u_int32_t type;
+ pen_type_t type;
/**
* Attribute value
@@ -63,13 +58,7 @@ struct private_ita_attr_command_t {
refcount_t ref;
};
-METHOD(pa_tnc_attr_t, get_vendor_id, pen_t,
- private_ita_attr_command_t *this)
-{
- return this->vendor_id;
-}
-
-METHOD(pa_tnc_attr_t, get_type, u_int32_t,
+METHOD(pa_tnc_attr_t, get_type, pen_type_t,
private_ita_attr_command_t *this)
{
return this->type;
@@ -148,7 +137,6 @@ pa_tnc_attr_t *ita_attr_command_create(char *command)
INIT(this,
.public = {
.pa_tnc_attribute = {
- .get_vendor_id = _get_vendor_id,
.get_type = _get_type,
.get_value = _get_value,
.get_noskip_flag = _get_noskip_flag,
@@ -160,8 +148,7 @@ pa_tnc_attr_t *ita_attr_command_create(char *command)
},
.get_command = _get_command,
},
- .vendor_id = PEN_ITA,
- .type = ITA_ATTR_COMMAND,
+ .type = { PEN_ITA, ITA_ATTR_COMMAND },
.command = strdup(command),
.ref = 1,
);
@@ -179,7 +166,6 @@ pa_tnc_attr_t *ita_attr_command_create_from_data(chunk_t data)
INIT(this,
.public = {
.pa_tnc_attribute = {
- .get_vendor_id = _get_vendor_id,
.get_type = _get_type,
.get_value = _get_value,
.build = _build,
@@ -189,8 +175,7 @@ pa_tnc_attr_t *ita_attr_command_create_from_data(chunk_t data)
},
.get_command = _get_command,
},
- .vendor_id = PEN_ITA,
- .type = ITA_ATTR_COMMAND,
+ .type = {PEN_ITA, ITA_ATTR_COMMAND },
.value = chunk_clone(data),
.ref = 1,
);