diff options
Diffstat (limited to 'src/libstrongswan/pen')
-rw-r--r-- | src/libstrongswan/pen/pen.c | 8 | ||||
-rw-r--r-- | src/libstrongswan/pen/pen.h | 22 |
2 files changed, 27 insertions, 3 deletions
diff --git a/src/libstrongswan/pen/pen.c b/src/libstrongswan/pen/pen.c index 3dd92218d..a80e949e3 100644 --- a/src/libstrongswan/pen/pen.c +++ b/src/libstrongswan/pen/pen.c @@ -17,7 +17,9 @@ ENUM_BEGIN(pen_names, PEN_IETF, PEN_IETF, "IETF"); -ENUM_NEXT(pen_names, PEN_MICROSOFT, PEN_MICROSOFT, PEN_IETF, +ENUM_NEXT(pen_names, PEN_IBM, PEN_IBM, PEN_IETF, + "IBM"); +ENUM_NEXT(pen_names, PEN_MICROSOFT, PEN_MICROSOFT, PEN_IBM, "Microsoft"); ENUM_NEXT(pen_names, PEN_OSC, PEN_OSC, PEN_MICROSOFT, "OSC"); @@ -27,7 +29,9 @@ ENUM_NEXT(pen_names, PEN_FHH, PEN_FHH, PEN_TCG, "FHH"); ENUM_NEXT(pen_names, PEN_ITA, PEN_ITA, PEN_FHH, "ITA-HSR"); -ENUM_NEXT(pen_names, PEN_RESERVED, PEN_RESERVED, PEN_ITA, +ENUM_NEXT(pen_names, PEN_OPENPTS, PEN_OPENPTS, PEN_ITA, + "OpenPTS"); +ENUM_NEXT(pen_names, PEN_RESERVED, PEN_RESERVED, PEN_OPENPTS, "Reserved"); ENUM_END(pen_names, PEN_RESERVED); diff --git a/src/libstrongswan/pen/pen.h b/src/libstrongswan/pen/pen.h index 396cc7199..78b6e4df2 100644 --- a/src/libstrongswan/pen/pen.h +++ b/src/libstrongswan/pen/pen.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Andreas Steffen + * Copyright (C) 2011-2012 Andreas Steffen * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it @@ -27,18 +27,38 @@ #include <library.h> typedef enum pen_t pen_t; +typedef struct pen_type_t pen_type_t; enum pen_t { PEN_IETF = 0x000000, /* 0 */ + PEN_IBM = 0x000002, /* 2 */ PEN_MICROSOFT = 0x000137, /* 311 */ PEN_OSC = 0x002358, /* 9048 */ PEN_TCG = 0x005597, /* 21911 */ PEN_FHH = 0x0080ab, /* 32939 */ PEN_ITA = 0x00902a, /* 36906 */ + PEN_OPENPTS = 0x00950e, /* 38158 */ PEN_RESERVED = 0xffffff, /* 16777215 */ }; /** + * Vendor specific type + */ +struct pen_type_t { + pen_t vendor_id; + u_int32_t type; +}; + +/** + * Create a pen_type_t struct + */ +static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t type) +{ + pen_type_t pen_type = {vendor_id, type}; + return pen_type; +} + +/** * enum names for pen_t. */ extern enum_name_t *pen_names; |