unit-tests: Fix "using integer constants in boolean context" warning
[strongswan.git] / src / libtncif / tncif_pa_subtypes.h
1 /*
2 * Copyright (C) 2011-2017 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 tncif_pa_subtypes tncif_pa_subtypes
18 * @{ @ingroup libtncif
19 */
20
21 #ifndef TNCIF_PA_SUBTYPES_H_
22 #define TNCIF_PA_SUBTYPES_H_
23
24 typedef enum pa_subtype_ietf_t pa_subtype_ietf_t;
25 typedef enum pa_subtype_tcg_t pa_subtype_tcg_t;
26 typedef enum pa_subtype_pwg_t pa_subtype_pwg_t;
27 typedef enum pa_subtype_fhh_t pa_subtype_fhh_t;
28 typedef enum pa_subtype_ita_t pa_subtype_ita_t;
29
30 #include <library.h>
31 #include <pen/pen.h>
32
33 /**
34 * PA-TNC IETF Standard Subtypes as defined in section 3.5 of RFC 5792
35 */
36 enum pa_subtype_ietf_t {
37 PA_SUBTYPE_IETF_TESTING = 0x00,
38 PA_SUBTYPE_IETF_OPERATING_SYSTEM = 0x01,
39 PA_SUBTYPE_IETF_ANTI_VIRUS = 0x02,
40 PA_SUBTYPE_IETF_ANTI_SPYWARE = 0x03,
41 PA_SUBTYPE_IETF_ANTI_MALWARE = 0x04,
42 PA_SUBTYPE_IETF_FIREWALL = 0x05,
43 PA_SUBTYPE_IETF_IDPS = 0x06,
44 PA_SUBTYPE_IETF_VPN = 0x07,
45 PA_SUBTYPE_IETF_NEA_CLIENT = 0x08,
46 PA_SUBTYPE_IETF_SWIMA = 0x09,
47 PA_SUBTYPE_IETF_ANY = 0xff
48 };
49
50 /**
51 * enum name for pa_subtype_ietf_t.
52 */
53 extern enum_name_t *pa_subtype_ietf_names;
54
55 /**
56 * PA-TNC TCG Subtypes
57 */
58 enum pa_subtype_tcg_t {
59 PA_SUBTYPE_TCG_PTS = 0x01,
60 PA_SUBTYPE_TCG_SCAP = 0x02,
61 PA_SUBTYPE_TCG_SWID = 0x03,
62 PA_SUBTYPE_TCG_ANY = 0xff
63 };
64
65 /**
66 * enum name for pa_subtype_tcg_t.
67 */
68 extern enum_name_t *pa_subtype_tcg_names;
69
70 /**
71 * PA-TNC PWG Subtypes
72 */
73 enum pa_subtype_pwg_t {
74 PA_SUBTYPE_PWG_HCD_TESTING = 0x00,
75 PA_SUBTYPE_PWG_HCD_OTHER = 0x01,
76 PA_SUBTYPE_PWG_HCD_UNKNOWN = 0x02,
77 PA_SUBTYPE_PWG_HCD_CONSOLE = 0x04,
78 PA_SUBTYPE_PWG_HCD_SYSTEM = 0x05,
79 PA_SUBTYPE_PWG_HCD_COVER = 0x06,
80 PA_SUBTYPE_PWG_HCD_INPUT_TRAY = 0x08,
81 PA_SUBTYPE_PWG_HCD_OUTPUT_TRAY = 0x09,
82 PA_SUBTYPE_PWG_HCD_MARKER = 0x0a,
83 PA_SUBTYPE_PWG_HCD_MEDIA_PATH = 0x0d,
84 PA_SUBTYPE_PWG_HCD_CHANNEL = 0x0e,
85 PA_SUBTYPE_PWG_HCD_INTERPRETER = 0x0f,
86 PA_SUBTYPE_PWG_HCD_FINISHER = 0x1e,
87 PA_SUBTYPE_PWG_HCD_INTERFACE = 0x28,
88 PA_SUBTYPE_PWG_HCD_SCANNER = 0x32,
89 PA_SUBTYPE_PWG_ANY = 0xff
90 };
91
92 /**
93 * enum name for pa_subtype_pwg_t.
94 */
95 extern enum_name_t *pa_subtype_pwg_names;
96
97 /**
98 * PA-TNC FHH Subtypes
99 */
100 enum pa_subtype_fhh_t {
101 PA_SUBTYPE_FHH_HOSTSCANNER = 0x30,
102 PA_SUBTYPE_FHH_DUMMY = 0x31,
103 PA_SUBTYPE_FHH_PLATID = 0x33,
104 PA_SUBTYPE_FHH_ATTESTATION = 0x34,
105 PA_SUBTYPE_FHH_CLAMAV = 0x41,
106 PA_SUBTYPE_FHH_ANY = 0xff
107 };
108
109 /**
110 * enum name for pa_subtype_fhh_t.
111 */
112 extern enum_name_t *pa_subtype_fhh_names;
113
114 /**
115 * PA-TNC ITA-HSR Subtypes
116 */
117 enum pa_subtype_ita_t {
118 PA_SUBTYPE_ITA_TEST = 0x01,
119 PA_SUBTYPE_ITA_ECHO = 0x02,
120 PA_SUBTYPE_ITA_ANY = 0xff
121 };
122
123 /**
124 * enum name for pa_subtype_ita_t.
125 */
126 extern enum_name_t *pa_subtype_ita_names;
127
128 /**
129 * Return the pa_subtype_names for a given PEN
130 *
131 * @param pen Private Enterprise Number (PEN)
132 * @return pa_subtype_names if found, NULL else
133 */
134 extern enum_name_t* get_pa_subtype_names(pen_t pen);
135
136 #endif /** TNCIF_PA_SUBTYPES_H_ @}*/