Whitespace and comment cleanups in pen.[ch]

This commit is contained in:
Martin Willi 2013-01-31 15:23:25 +01:00
parent f838f457a8
commit 9db54bbcd4
2 changed files with 28 additions and 20 deletions

View file

@ -22,7 +22,7 @@ ENUM_NEXT(pen_names, PEN_IBM, PEN_IBM, PEN_IETF,
ENUM_NEXT(pen_names, PEN_MICROSOFT, PEN_MICROSOFT, PEN_IBM,
"Microsoft");
ENUM_NEXT(pen_names, PEN_REDHAT, PEN_REDHAT, PEN_MICROSOFT,
"Redhat");
"Redhat");
ENUM_NEXT(pen_names, PEN_OSC, PEN_OSC, PEN_REDHAT,
"OSC");
ENUM_NEXT(pen_names, PEN_DEBIAN, PEN_DEBIAN, PEN_OSC,
@ -32,7 +32,7 @@ ENUM_NEXT(pen_names, PEN_GOOGLE, PEN_GOOGLE, PEN_DEBIAN,
ENUM_NEXT(pen_names, PEN_TCG, PEN_TCG, PEN_GOOGLE,
"TCG");
ENUM_NEXT(pen_names, PEN_CANONICAL, PEN_CANONICAL, PEN_TCG,
"Canonical");
"Canonical");
ENUM_NEXT(pen_names, PEN_FEDORA, PEN_FEDORA, PEN_CANONICAL,
"Fedora Project");
ENUM_NEXT(pen_names, PEN_FHH, PEN_FHH, PEN_FEDORA,
@ -45,4 +45,3 @@ ENUM_NEXT(pen_names, PEN_UNASSIGNED, PEN_RESERVED, PEN_OPENPTS,
"Unassigned",
"Reserved");
ENUM_END(pen_names, PEN_RESERVED);

View file

@ -29,26 +29,31 @@
typedef enum pen_t pen_t;
typedef struct pen_type_t pen_type_t;
/**
* Private enterprise numbers allocated by IANA.
*
* http://www.iana.org/assignments/enterprise-numbers
*/
enum pen_t {
PEN_IETF = 0x000000, /* 0 */
PEN_IBM = 0x000002, /* 2 */
PEN_MICROSOFT = 0x000137, /* 311 */
PEN_REDHAT = 0x000908, /* 2312 */
PEN_OSC = 0x002358, /* 9048 */
PEN_DEBIAN = 0x002572, /* 9586 */
PEN_GOOGLE = 0x002B79, /* 11129 */
PEN_TCG = 0x005597, /* 21911 */
PEN_CANONICAL = 0x007132, /* 28978 */
PEN_FEDORA = 0x0076C1, /* 30401 */
PEN_FHH = 0x0080ab, /* 32939 */
PEN_ITA = 0x00902a, /* 36906 */
PEN_OPENPTS = 0x00950e, /* 38158 */
PEN_UNASSIGNED = 0xfffffe, /* 16777214 */
PEN_RESERVED = 0xffffff, /* 16777215 */
PEN_IETF = 0x000000, /* 0 */
PEN_IBM = 0x000002, /* 2 */
PEN_MICROSOFT = 0x000137, /* 311 */
PEN_REDHAT = 0x000908, /* 2312 */
PEN_OSC = 0x002358, /* 9048 */
PEN_DEBIAN = 0x002572, /* 9586 */
PEN_GOOGLE = 0x002B79, /* 11129 */
PEN_TCG = 0x005597, /* 21911 */
PEN_CANONICAL = 0x007132, /* 28978 */
PEN_FEDORA = 0x0076C1, /* 30401 */
PEN_FHH = 0x0080ab, /* 32939 */
PEN_ITA = 0x00902a, /* 36906 */
PEN_OPENPTS = 0x00950e, /* 38158 */
PEN_UNASSIGNED = 0xfffffe, /* 16777214 */
PEN_RESERVED = 0xffffff, /* 16777215 */
};
/**
* Vendor specific type
* Vendor specific type in vendor specific namespace.
*/
struct pen_type_t {
pen_t vendor_id;
@ -57,10 +62,14 @@ struct pen_type_t {
/**
* Create a pen_type_t struct
*
* @param vendor_id vendor ID to create a pen_type_t
* @param type type to create a pen_type_t
* @return created pen_type_t
*/
static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t type)
{
pen_type_t pen_type = {vendor_id, type};
pen_type_t pen_type = { vendor_id, type };
return pen_type;
}