Defined PWG HCD IF-M attributes
[strongswan.git] / src / libimcv / pwg / pwg_attr.c
1 /*
2 * Copyright (C) 2015 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 #include "pwg_attr.h"
17
18 ENUM_BEGIN(pwg_attr_names, PWG_HCD_ATTRS_NATURAL_LANG,
19 PWG_HCD_VENDOR_SMI_CODE,
20 "HCD AttributesNaturalLanguage",
21 "HCD MachineTypeModel",
22 "HCD VendorName",
23 "HCD VendorSMICode");
24 ENUM_NEXT(pwg_attr_names, PWG_HCD_DEFAULT_PWD_ENABLED,
25 PWG_HCD_FORWARDING_ENABLED,
26 PWG_HCD_VENDOR_SMI_CODE,
27 "HCD DefaultPasswordEnabled",
28 "HCD FirewallSetting",
29 "HCD ForwardingEnabled");
30 ENUM_NEXT(pwg_attr_names, PWG_HCD_PSTN_FAX_ENABLED,
31 PWG_HCD_PSTN_FAX_ENABLED,
32 PWG_HCD_FORWARDING_ENABLED,
33 "HCD PSTNFaxEnabled");
34 ENUM_NEXT(pwg_attr_names, PWG_HCD_TIME_SOURCE,
35 PWG_HCD_TIME_SOURCE,
36 PWG_HCD_PSTN_FAX_ENABLED,
37 "HCD TimeSource");
38 ENUM_NEXT(pwg_attr_names, PWG_HCD_FIRMWARE_NAME,
39 PWG_HCD_FIRMWARE_VERSION,
40 PWG_HCD_TIME_SOURCE,
41 "HCD FirmwareName",
42 "HCD FirmwarePatches",
43 "HCD FirmwareStringVersion",
44 "HCD FirmwareVersion");
45 ENUM_NEXT(pwg_attr_names, PWG_HCD_RESIDENT_APP_NAME,
46 PWG_HCD_RESIDENT_APP_VERSION,
47 PWG_HCD_FIRMWARE_VERSION,
48 "HCD ResidentApplicationName",
49 "HCD ResidentApplicationPatches",
50 "HCD ResidentApplicationStringVersion",
51 "HCD ResidentApplicationVersion");
52 ENUM_NEXT(pwg_attr_names, PWG_HCD_USER_APP_NAME,
53 PWG_HCD_USER_APP_PERSIST_ENABLED,
54 PWG_HCD_RESIDENT_APP_VERSION,
55 "HCD UserApplicationName",
56 "HCD UserApplicationPatches",
57 "HCD UserApplicationStringVersion",
58 "HCD UserApplicationVersion",
59 "HCD UserApplicationEnabled",
60 "HCD UserApplicationPersistenceEnabled");
61 ENUM_NEXT(pwg_attr_names, PWG_HCD_CERTIFICATION_STATE,
62 PWG_HCD_CONFIGURATION_STATE,
63 PWG_HCD_USER_APP_PERSIST_ENABLED,
64 "HCD CertificationState",
65 "HCD ConfigurationState");
66 ENUM_END(pwg_attr_names, PWG_HCD_CONFIGURATION_STATE);
67
68 /**
69 * See header
70 */
71 pa_tnc_attr_t* pwg_attr_create_from_data(u_int32_t type, size_t length, chunk_t value)
72 {
73 switch (type)
74 {
75 case PWG_HCD_ATTRS_NATURAL_LANG:
76 case PWG_HCD_MACHINE_TYPE_MODEL:
77 case PWG_HCD_VENDOR_NAME:
78 case PWG_HCD_VENDOR_SMI_CODE:
79 case PWG_HCD_DEFAULT_PWD_ENABLED:
80 case PWG_HCD_FIREWALL_SETTING:
81 case PWG_HCD_FORWARDING_ENABLED:
82 case PWG_HCD_PSTN_FAX_ENABLED:
83 case PWG_HCD_TIME_SOURCE:
84 case PWG_HCD_FIRMWARE_NAME:
85 case PWG_HCD_FIRMWARE_PATCHES:
86 case PWG_HCD_FIRMWARE_STRING_VERSION:
87 case PWG_HCD_FIRMWARE_VERSION:
88 case PWG_HCD_RESIDENT_APP_NAME:
89 case PWG_HCD_RESIDENT_APP_PATCHES:
90 case PWG_HCD_RESIDENT_APP_STRING_VERSION:
91 case PWG_HCD_RESIDENT_APP_VERSION:
92 case PWG_HCD_USER_APP_NAME:
93 case PWG_HCD_USER_APP_PATCHES:
94 case PWG_HCD_USER_APP_STRING_VERSION:
95 case PWG_HCD_USER_APP_VERSION:
96 case PWG_HCD_USER_APP_ENABLE:
97 case PWG_HCD_USER_APP_PERSIST_ENABLED:
98 case PWG_HCD_CERTIFICATION_STATE:
99 case PWG_HCD_CONFIGURATION_STATE:
100 default:
101 return NULL;
102 }
103 }