print PEN value 0xfffffe as Unassigned
[strongswan.git] / src / libstrongswan / pen / pen.h
1 /*
2 * Copyright (C) 2011-2012 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 pen pen
18 * @ingroup libstrongswan
19 *
20 * @defgroup pent pen
21 * @{ @ingroup pen
22 */
23
24 #ifndef PEN_H_
25 #define PEN_H_
26
27 #include <library.h>
28
29 typedef enum pen_t pen_t;
30 typedef struct pen_type_t pen_type_t;
31
32 enum pen_t {
33 PEN_IETF = 0x000000, /* 0 */
34 PEN_IBM = 0x000002, /* 2 */
35 PEN_MICROSOFT = 0x000137, /* 311 */
36 PEN_REDHAT = 0x000908, /* 2312 */
37 PEN_OSC = 0x002358, /* 9048 */
38 PEN_DEBIAN = 0x002572, /* 9586 */
39 PEN_GOOGLE = 0x002B79, /* 11129 */
40 PEN_TCG = 0x005597, /* 21911 */
41 PEN_CANONICAL = 0x007132, /* 28978 */
42 PEN_FEDORA = 0x0076C1, /* 30401 */
43 PEN_FHH = 0x0080ab, /* 32939 */
44 PEN_ITA = 0x00902a, /* 36906 */
45 PEN_OPENPTS = 0x00950e, /* 38158 */
46 PEN_UNASSIGNED = 0xfffffe, /* 16777214 */
47 PEN_RESERVED = 0xffffff, /* 16777215 */
48 };
49
50 /**
51 * Vendor specific type
52 */
53 struct pen_type_t {
54 pen_t vendor_id;
55 u_int32_t type;
56 };
57
58 /**
59 * Create a pen_type_t struct
60 */
61 static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t type)
62 {
63 pen_type_t pen_type = {vendor_id, type};
64 return pen_type;
65 }
66
67 /**
68 * enum names for pen_t.
69 */
70 extern enum_name_t *pen_names;
71
72 #endif /** PEN_H_ @}*/