Completed implementation of PWG HCD attributes
[strongswan.git] / src / libimcv / pwg / pwg_attr.h
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 /**
17 * @defgroup pwg_attr pwg_attr
18 * @{ @ingroup libimcv
19 */
20
21 #ifndef PWG_ATTR_H_
22 #define PWG_ATTR_H_
23
24 #include <pa_tnc/pa_tnc_attr.h>
25 #include <library.h>
26
27 typedef enum pwg_attr_t pwg_attr_t;
28
29 /**
30 * PWG HCD IF-M Attributes (Hardcopy Device Health Assessment TNC Binding)
31 */
32 enum pwg_attr_t {
33 PWG_HCD_ATTRS_NATURAL_LANG = 0x00000001, /* 1 */
34 PWG_HCD_MACHINE_TYPE_MODEL = 0x00000002, /* 2 */
35 PWG_HCD_VENDOR_NAME = 0x00000003, /* 3 */
36 PWG_HCD_VENDOR_SMI_CODE = 0x00000004, /* 4 */
37 PWG_HCD_DEFAULT_PWD_ENABLED = 0x00000014, /* 20 */
38 PWG_HCD_FIREWALL_SETTING = 0x00000015, /* 21 */
39 PWG_HCD_FORWARDING_ENABLED = 0x00000016, /* 22 */
40 PWG_HCD_PSTN_FAX_ENABLED = 0x00000028, /* 40 */
41 PWG_HCD_TIME_SOURCE = 0x00000032, /* 50 ??? */
42 PWG_HCD_FIRMWARE_NAME = 0x0000003C, /* 60 */
43 PWG_HCD_FIRMWARE_PATCHES = 0x0000003D, /* 61 */
44 PWG_HCD_FIRMWARE_STRING_VERSION = 0x0000003E, /* 62 */
45 PWG_HCD_FIRMWARE_VERSION = 0x0000003F, /* 63 */
46 PWG_HCD_RESIDENT_APP_NAME = 0x00000050, /* 80 */
47 PWG_HCD_RESIDENT_APP_PATCHES = 0x00000051, /* 81 */
48 PWG_HCD_RESIDENT_APP_STRING_VERSION = 0x00000052, /* 82 */
49 PWG_HCD_RESIDENT_APP_VERSION = 0x00000053, /* 83 */
50 PWG_HCD_USER_APP_NAME = 0x00000064, /* 100 */
51 PWG_HCD_USER_APP_PATCHES = 0x00000065, /* 101 */
52 PWG_HCD_USER_APP_STRING_VERSION = 0x00000066, /* 102 */
53 PWG_HCD_USER_APP_VERSION = 0x00000067, /* 103 */
54 PWG_HCD_USER_APP_ENABLED = 0x00000068, /* 104 */
55 PWG_HCD_USER_APP_PERSIST_ENABLED = 0x00000069, /* 105 */
56 PWG_HCD_CERTIFICATION_STATE = 0x000000C8, /* 200 */
57 PWG_HCD_CONFIGURATION_STATE = 0x000000C9, /* 201 */
58 };
59
60 /**
61 * enum name for pwg_attr_t.
62 */
63 extern enum_name_t *pwg_attr_names;
64
65 /**
66 * Create a TCG PA-TNC attribute from data
67 *
68 * @param type attribute type
69 * @param length attribute length
70 * @param value attribute value or segment
71 */
72 pa_tnc_attr_t* pwg_attr_create_from_data(u_int32_t type, size_t length,
73 chunk_t value);
74
75 #endif /** PWG_ATTR_H_ @}*/