child-rekey: Don't change state to INSTALLED if it was already REKEYING
[strongswan.git] / src / libtncif / tncif_pa_subtypes.c
1 /*
2 * Copyright (C) 2010-2015 Andreas Steffen
3 *
4 * HSR Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 #include "tncif_pa_subtypes.h"
18
19 /* IETF PA Subtype names */
20 ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_NEA_CLIENT,
21 "Testing",
22 "Operating System",
23 "Anti-Virus",
24 "Anti-Spyware",
25 "Anti-Malware",
26 "Firewall",
27 "IDPS",
28 "VPN",
29 "NEA Client"
30 );
31 ENUM_NEXT(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY, PA_SUBTYPE_IETF_ANY,
32 PA_SUBTYPE_IETF_NEA_CLIENT,
33 "ANY"
34 );
35 ENUM_END(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY);
36
37 /* TCG PA Subtype names */
38 ENUM_BEGIN(pa_subtype_tcg_names, PA_SUBTYPE_TCG_PTS, PA_SUBTYPE_TCG_SWID,
39 "PTS",
40 "SCAP",
41 "SWID"
42 );
43 ENUM_NEXT(pa_subtype_tcg_names, PA_SUBTYPE_TCG_ANY, PA_SUBTYPE_TCG_ANY,
44 PA_SUBTYPE_TCG_SWID,
45 "ANY"
46 );
47 ENUM_END(pa_subtype_tcg_names, PA_SUBTYPE_TCG_ANY);
48
49 /* PWG PA Subtype names */
50 ENUM_BEGIN(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_TESTING,
51 PA_SUBTYPE_PWG_HCD_UNKNOWN,
52 "HCD Testing",
53 "HCD Other",
54 "HCD Unknown"
55 );
56 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_CONSOLE,
57 PA_SUBTYPE_PWG_HCD_COVER,
58 PA_SUBTYPE_PWG_HCD_UNKNOWN,
59 "HCD Console",
60 "HCD System",
61 "HCD Cover"
62 );
63 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_INPUT_TRAY,
64 PA_SUBTYPE_PWG_HCD_MARKER,
65 PA_SUBTYPE_PWG_HCD_COVER,
66 "HCD Input Tray",
67 "HCD Output Tray",
68 "HCD Marker"
69 );
70 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_MEDIA_PATH,
71 PA_SUBTYPE_PWG_HCD_INTERPRETER,
72 PA_SUBTYPE_PWG_HCD_MARKER,
73 "HCD Media Path",
74 "HCD Channel",
75 "HCD Interpreter"
76 );
77 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_FINISHER,
78 PA_SUBTYPE_PWG_HCD_FINISHER,
79 PA_SUBTYPE_PWG_HCD_INTERPRETER,
80 "HCD Finisher"
81 );
82 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_INTERFACE,
83 PA_SUBTYPE_PWG_HCD_INTERFACE,
84 PA_SUBTYPE_PWG_HCD_FINISHER,
85 "HCD Interface"
86 );
87 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_SCANNER,
88 PA_SUBTYPE_PWG_HCD_SCANNER,
89 PA_SUBTYPE_PWG_HCD_INTERFACE,
90 "HCD Scanner"
91 );
92 ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_ANY, PA_SUBTYPE_PWG_ANY,
93 PA_SUBTYPE_PWG_HCD_SCANNER,
94 "ANY"
95 );
96 ENUM_END(pa_subtype_pwg_names, PA_SUBTYPE_PWG_ANY);
97
98 /* FHH PA Subtype names */
99 ENUM_BEGIN(pa_subtype_fhh_names, PA_SUBTYPE_FHH_HOSTSCANNER, PA_SUBTYPE_FHH_DUMMY,
100 "HostScanner",
101 "Dummy"
102 );
103 ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_PLATID, PA_SUBTYPE_FHH_ATTESTATION,
104 PA_SUBTYPE_FHH_DUMMY,
105 "PlatformID",
106 "Attestation"
107 );
108 ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_CLAMAV, PA_SUBTYPE_FHH_CLAMAV,
109 PA_SUBTYPE_FHH_ATTESTATION,
110 "ClamAV"
111 );
112 ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_ANY, PA_SUBTYPE_FHH_ANY,
113 PA_SUBTYPE_FHH_CLAMAV,
114 "ANY"
115 );
116 ENUM_END(pa_subtype_fhh_names, PA_SUBTYPE_FHH_ANY);
117
118 /* ITA-HSR PA Subtype names */
119 ENUM_BEGIN(pa_subtype_ita_names, PA_SUBTYPE_ITA_TEST, PA_SUBTYPE_ITA_ECHO,
120 "Test",
121 "Echo"
122 );
123 ENUM_NEXT(pa_subtype_ita_names, PA_SUBTYPE_ITA_ANY, PA_SUBTYPE_ITA_ANY,
124 PA_SUBTYPE_ITA_ECHO,
125 "ANY"
126 );
127 ENUM_END(pa_subtype_ita_names, PA_SUBTYPE_ITA_ANY);
128
129 /**
130 * See header
131 */
132 enum_name_t* get_pa_subtype_names(pen_t pen)
133 {
134 switch (pen)
135 {
136 case PEN_IETF:
137 return pa_subtype_ietf_names;
138 case PEN_TCG:
139 return pa_subtype_tcg_names;
140 case PEN_PWG:
141 return pa_subtype_pwg_names;
142 case PEN_FHH:
143 return pa_subtype_fhh_names;
144 case PEN_ITA:
145 return pa_subtype_ita_names;
146 default:
147 break;
148 }
149 return NULL;
150 }