Defined generic boolean PA-TNC attribute
[strongswan.git] / src / libimcv / pwg / pwg_attr.c
index 5fd887b..9056a28 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "pwg_attr.h"
 
+#include <generic/generic_attr_bool.h>
+
 ENUM_BEGIN(pwg_attr_names,     PWG_HCD_ATTRS_NATURAL_LANG,
                                                        PWG_HCD_VENDOR_SMI_CODE,
        "HCD AttributesNaturalLanguage",
@@ -72,17 +74,21 @@ pa_tnc_attr_t* pwg_attr_create_from_data(u_int32_t type, size_t length, chunk_t
 {
        switch (type)
        {
+               case PWG_HCD_DEFAULT_PWD_ENABLED:
+               case PWG_HCD_FORWARDING_ENABLED:
+               case PWG_HCD_USER_APP_ENABLED:
+               case PWG_HCD_USER_APP_PERSIST_ENABLED:
+               case PWG_HCD_PSTN_FAX_ENABLED:
+                       return generic_attr_bool_create_from_data(length, value,
+                                                                       pen_type_create(PEN_PWG, type));
                case PWG_HCD_ATTRS_NATURAL_LANG:
                case PWG_HCD_MACHINE_TYPE_MODEL:
                case PWG_HCD_VENDOR_NAME:
                case PWG_HCD_VENDOR_SMI_CODE:
-               case PWG_HCD_DEFAULT_PWD_ENABLED:
                case PWG_HCD_FIREWALL_SETTING:
-               case PWG_HCD_FORWARDING_ENABLED:
-       case PWG_HCD_PSTN_FAX_ENABLED:
                case PWG_HCD_TIME_SOURCE:
-       case PWG_HCD_FIRMWARE_NAME:
-       case PWG_HCD_FIRMWARE_PATCHES:
+               case PWG_HCD_FIRMWARE_NAME:
+               case PWG_HCD_FIRMWARE_PATCHES:
                case PWG_HCD_FIRMWARE_STRING_VERSION:
                case PWG_HCD_FIRMWARE_VERSION:
                case PWG_HCD_RESIDENT_APP_NAME:
@@ -93,8 +99,6 @@ pa_tnc_attr_t* pwg_attr_create_from_data(u_int32_t type, size_t length, chunk_t
                case PWG_HCD_USER_APP_PATCHES:
                case PWG_HCD_USER_APP_STRING_VERSION:
                case PWG_HCD_USER_APP_VERSION:
-               case PWG_HCD_USER_APP_ENABLE:
-               case PWG_HCD_USER_APP_PERSIST_ENABLED:
                case PWG_HCD_CERTIFICATION_STATE:
                case PWG_HCD_CONFIGURATION_STATE:
                default: