diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-09-01 17:21:25 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-09-01 17:21:25 +0200 |
commit | 11d6b62db969bdd808d0f56706cb18f113927a31 (patch) | |
tree | 8aa7d8fb611c3da6a3523cb78a082f62ffd0dac8 /src/libimcv/ietf/ietf_attr.c | |
parent | bba25e2ff6c4a193acb54560ea4417537bd2954e (diff) | |
download | vyos-strongswan-11d6b62db969bdd808d0f56706cb18f113927a31.tar.gz vyos-strongswan-11d6b62db969bdd808d0f56706cb18f113927a31.zip |
New upstream version 5.6.0
Diffstat (limited to 'src/libimcv/ietf/ietf_attr.c')
-rw-r--r-- | src/libimcv/ietf/ietf_attr.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/libimcv/ietf/ietf_attr.c b/src/libimcv/ietf/ietf_attr.c index cfac6ed17..9e3e83d4d 100644 --- a/src/libimcv/ietf/ietf_attr.c +++ b/src/libimcv/ietf/ietf_attr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2015 Andreas Steffen + * Copyright (C) 2011-2017 Andreas Steffen * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it @@ -25,10 +25,14 @@ #include "ietf/ietf_attr_product_info.h" #include "ietf/ietf_attr_remediation_instr.h" #include "ietf/ietf_attr_string_version.h" +#include "ietf/swima/ietf_swima_attr_req.h" +#include "ietf/swima/ietf_swima_attr_sw_inv.h" +#include "ietf/swima/ietf_swima_attr_sw_ev.h" #include "generic/generic_attr_bool.h" -ENUM(ietf_attr_names, IETF_ATTR_TESTING, IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED, +ENUM_BEGIN(ietf_attr_names, IETF_ATTR_TESTING, + IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED, "Testing", "Attribute Request", "Product Information", @@ -43,6 +47,20 @@ ENUM(ietf_attr_names, IETF_ATTR_TESTING, IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED, "Forwarding Enabled", "Factory Default Password Enabled", ); +ENUM_NEXT(ietf_attr_names, IETF_ATTR_SW_REQUEST, + IETF_ATTR_SRC_METADATA_RESP, + IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED, + "SW Request", + "SW Identifier Inventory", + "SW Identifier Events", + "SW Inventory", + "SW Events", + "SW Subscription Status Request", + "SW Subscription Status Response", + "SW Source Metadata Request", + "SW Source Metadata Response", +); +ENUM_END(ietf_attr_names, IETF_ATTR_SRC_METADATA_RESP); /** * See header @@ -79,8 +97,23 @@ pa_tnc_attr_t* ietf_attr_create_from_data(uint32_t type, size_t length, 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: + 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); + case IETF_ATTR_SW_INVENTORY: + return ietf_swima_attr_sw_inv_create_from_data(length, value, FALSE); + case IETF_ATTR_SW_ID_EVENTS: + return ietf_swima_attr_sw_ev_create_from_data(length, value, TRUE); + case IETF_ATTR_SW_EVENTS: + return ietf_swima_attr_sw_ev_create_from_data(length, value, FALSE); case IETF_ATTR_TESTING: case IETF_ATTR_RESERVED: + /* unsupported IETF/SWIMA attributes */ + case IETF_ATTR_SUBSCRIPTION_STATUS_REQ: + case IETF_ATTR_SUBSCRIPTION_STATUS_RESP: + case IETF_ATTR_SRC_METADATA_REQ: + case IETF_ATTR_SRC_METADATA_RESP: default: return NULL; } |