Whitespace and comment cleanups in pen.[ch]
authorMartin Willi <martin@revosec.ch>
Thu, 31 Jan 2013 14:23:25 +0000 (15:23 +0100)
committerMartin Willi <martin@revosec.ch>
Thu, 14 Feb 2013 16:17:07 +0000 (17:17 +0100)
src/libstrongswan/pen/pen.c
src/libstrongswan/pen/pen.h

index b853739..f6997d1 100644 (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);
-
index 351c71b..0edff61 100644 (file)
 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;
 }