"Forwarding Enabled",
"Factory Default Password Enabled",
);
-ENUM_NEXT(ietf_attr_names, IETF_ATTR_SW_REQUEST,
+ENUM_NEXT(ietf_attr_names, IETF_ATTR_SWIMA_REQUEST,
IETF_ATTR_SRC_METADATA_RESP,
IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED,
"SW Request",
case IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED:
return generic_attr_bool_create_from_data(length, value,
pen_type_create(PEN_IETF, type));
- case IETF_ATTR_SW_REQUEST:
+ case IETF_ATTR_SWIMA_REQUEST:
return ietf_swima_attr_req_create_from_data(length, value);
case IETF_ATTR_SW_ID_INVENTORY:
return ietf_swima_attr_sw_inv_create_from_data(length, value, TRUE);
IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED = 12,
/* draft-ietf-sacm-nea-swid-patnc */
- IETF_ATTR_SW_REQUEST = 17,
+ IETF_ATTR_SWIMA_REQUEST = 17,
IETF_ATTR_SW_ID_INVENTORY = 18,
IETF_ATTR_SW_ID_EVENTS = 19,
IETF_ATTR_SW_INVENTORY = 20,
"Version Not Supported",
"Attribute Type Not Supported"
);
-ENUM_NEXT(pa_tnc_error_code_names, PA_ERROR_SW,
- PA_ERROR_SW_SUBSCRIPTION_ID_REUSE,
+ENUM_NEXT(pa_tnc_error_code_names, PA_ERROR_SWIMA,
+ PA_ERROR_SWIMA_SUBSCRIPTION_ID_REUSE,
PA_ERROR_ATTR_TYPE_NOT_SUPPORTED,
- "SW Error",
- "SW Subscription Denied",
- "SW Response Too Large",
- "SW Subscription Fulfillment Error",
- "SW Subscription ID Reuse"
+ "SWIMA Error",
+ "SWIMA Subscription Denied",
+ "SWIMA Response Too Large",
+ "SWIMA Subscription Fulfillment Error",
+ "SWIMA Subscription ID Reuse"
);
-ENUM_END(pa_tnc_error_code_names, PA_ERROR_SW_SUBSCRIPTION_ID_REUSE);
+ENUM_END(pa_tnc_error_code_names, PA_ERROR_SWIMA_SUBSCRIPTION_ID_REUSE);
typedef struct private_ietf_attr_pa_tnc_error_t private_ietf_attr_pa_tnc_error_t;
enum pa_tnc_error_code_t {
/* RFC 5792 PA-TNC */
- PA_ERROR_RESERVED = 0,
- PA_ERROR_INVALID_PARAMETER = 1,
- PA_ERROR_VERSION_NOT_SUPPORTED = 2,
- PA_ERROR_ATTR_TYPE_NOT_SUPPORTED = 3,
- PA_ERROR_PA_TNC_MSG_ROOF = 3,
+ PA_ERROR_RESERVED = 0,
+ PA_ERROR_INVALID_PARAMETER = 1,
+ PA_ERROR_VERSION_NOT_SUPPORTED = 2,
+ PA_ERROR_ATTR_TYPE_NOT_SUPPORTED = 3,
+ PA_ERROR_PA_TNC_MSG_ROOF = 3,
/* draft-ietf-sacm-nea-swid-patnc (SWIMA) */
- PA_ERROR_SW = 32,
- PA_ERROR_SW_SUBSCRIPTION_DENIED = 33,
- PA_ERROR_SW_RESPONSE_TOO_LARGE = 34,
- PA_ERROR_SW_SUBSCRIPTION_FULFILLMENT = 35,
- PA_ERROR_SW_SUBSCRIPTION_ID_REUSE = 36
+ PA_ERROR_SWIMA = 32,
+ PA_ERROR_SWIMA_SUBSCRIPTION_DENIED = 33,
+ PA_ERROR_SWIMA_RESPONSE_TOO_LARGE = 34,
+ PA_ERROR_SWIMA_SUBSCRIPTION_FULFILLMENT = 35,
+ PA_ERROR_SWIMA_SUBSCRIPTION_ID_REUSE = 36
};
/**
.set_targets = _set_targets,
.get_targets = _get_targets,
},
- .type = { PEN_IETF, IETF_ATTR_SW_REQUEST },
+ .type = { PEN_IETF, IETF_ATTR_SWIMA_REQUEST },
.flags = flags & SW_REQ_RESERVED_MASK,
.request_id = request_id,
.targets = swima_inventory_create(),
.set_targets = _set_targets,
.get_targets = _get_targets,
},
- .type = { PEN_IETF, IETF_ATTR_SW_REQUEST },
+ .type = { PEN_IETF, IETF_ATTR_SWIMA_REQUEST },
.length = length,
.value = chunk_clone(data),
.targets = swima_inventory_create(),
static const char imc_name[] = "SWIMA";
static pen_type_t msg_types[] = {
- { PEN_IETF, PA_SUBTYPE_IETF_SW }
+ { PEN_IETF, PA_SUBTYPE_IETF_SWIMA }
};
static imc_agent_t *imc_swima;
{
snprintf(error_msg, msg_len, "failed to collect SW%s events, "
"fallback to SW%s inventory", id_str, id_str);
- attr = swima_error_create(PA_ERROR_SW, request_id, 0, error_msg);
+ attr = swima_error_create(PA_ERROR_SWIMA, request_id, 0, error_msg);
msg->add_attribute(msg, attr);
}
else {
{
snprintf(error_msg, msg_len, "failed to collect SW%s inventory",
id_str);
- attr = swima_error_create(PA_ERROR_SW, request_id, 0, error_msg);
+ attr = swima_error_create(PA_ERROR_SWIMA, request_id, 0, error_msg);
}
else
{
type = attr->get_type(attr);
- if (type.vendor_id != PEN_IETF || type.type != IETF_ATTR_SW_REQUEST)
+ if (type.vendor_id != PEN_IETF || type.type != IETF_ATTR_SWIMA_REQUEST)
{
continue;
}
if (flags & (IETF_SWIMA_ATTR_REQ_FLAG_S | IETF_SWIMA_ATTR_REQ_FLAG_C))
{
- attr = swima_error_create(PA_ERROR_SW_SUBSCRIPTION_DENIED,
+ attr = swima_error_create(PA_ERROR_SWIMA_SUBSCRIPTION_DENIED,
request_id, 0, "no subscription available yet");
out_msg->add_attribute(out_msg, attr);
break;
/* Subscribed PA-TNC message subtypes */
static pen_type_t msg_types[] = {
- { PEN_IETF, PA_SUBTYPE_IETF_SW }
+ { PEN_IETF, PA_SUBTYPE_IETF_SWIMA }
};
/**
reader->destroy(reader);
continue;
}
- if (error_code.type == PA_ERROR_SW_RESPONSE_TOO_LARGE)
+ if (error_code.type == PA_ERROR_SWIMA_RESPONSE_TOO_LARGE)
{
if (!reader->read_uint32(reader, &max_attr_size))
{
START_TEST(test_imcv_swima_sw_req)
{
pen_type_t type;
- pen_type_t pen_type = { PEN_IETF, IETF_ATTR_SW_REQUEST };
+ pen_type_t pen_type = { PEN_IETF, IETF_ATTR_SWIMA_REQUEST };
pa_tnc_attr_t *attr, *attr1, *attr2;
ietf_swima_attr_req_t *c_attr;
swima_record_t *target;
writer = bio_writer_create(4);
writer->write_uint32(writer, request_id);
- if (code == PA_ERROR_SW_RESPONSE_TOO_LARGE)
+ if (code == PA_ERROR_SWIMA_RESPONSE_TOO_LARGE)
{
writer->write_uint32(writer, max_attr_size);
}
#include "tncif_pa_subtypes.h"
/* IETF PA Subtype names */
-ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_SW,
+ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_SWIMA,
"Testing",
"Operating System",
"Anti-Virus",
"IDPS",
"VPN",
"NEA Client",
- "Software"
+ "SWIMA"
);
ENUM_NEXT(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY, PA_SUBTYPE_IETF_ANY,
- PA_SUBTYPE_IETF_SW,
+ PA_SUBTYPE_IETF_SWIMA,
"ANY"
);
ENUM_END(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY);
PA_SUBTYPE_IETF_IDPS = 0x06,
PA_SUBTYPE_IETF_VPN = 0x07,
PA_SUBTYPE_IETF_NEA_CLIENT = 0x08,
- PA_SUBTYPE_IETF_SW = 0x09,
+ PA_SUBTYPE_IETF_SWIMA = 0x09,
PA_SUBTYPE_IETF_ANY = 0xff
};