Added IKEv1 payload identifiers
authorMartin Willi <martin@revosec.ch>
Tue, 15 Nov 2011 13:47:20 +0000 (14:47 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:30:39 +0000 (17:30 +0100)
src/libcharon/encoding/payloads/payload.c
src/libcharon/encoding/payloads/payload.h

index d1e677d..93b3641 100644 (file)
 
 ENUM_BEGIN(payload_type_names, NO_PAYLOAD, NO_PAYLOAD,
        "NO_PAYLOAD");
-ENUM_NEXT(payload_type_names, SECURITY_ASSOCIATION, EXTENSIBLE_AUTHENTICATION, NO_PAYLOAD,
+ENUM_NEXT(payload_type_names, SECURITY_ASSOCIATION_V1, VENDOR_ID_V1, NO_PAYLOAD,
+       "SECURITY_ASSOCIATION_V1",
+       "PROPOSAL_V1",
+       "TRANSFORM_V1",
+       "KEY_EXCHANGE_V1",
+       "ID_V1",
+       "CERTIFICATE_V1",
+       "CERTIFICATE_REQUEST_V1",
+       "HASH_V1",
+       "SIGNATURE_V1",
+       "NONCE_V1",
+       "NOTIFICATION_V1",
+       "DELETE_V1",
+       "VENDOR_ID_V1");
+ENUM_NEXT(payload_type_names, SECURITY_ASSOCIATION, EXTENSIBLE_AUTHENTICATION, VENDOR_ID_V1,
        "SECURITY_ASSOCIATION",
        "KEY_EXCHANGE",
        "ID_INITIATOR",
@@ -80,7 +94,21 @@ ENUM_END(payload_type_names, CONFIGURATION_ATTRIBUTE);
 /* short forms of payload names */
 ENUM_BEGIN(payload_type_short_names, NO_PAYLOAD, NO_PAYLOAD,
        "--");
-ENUM_NEXT(payload_type_short_names, SECURITY_ASSOCIATION, EXTENSIBLE_AUTHENTICATION, NO_PAYLOAD,
+ENUM_NEXT(payload_type_short_names, SECURITY_ASSOCIATION_V1, VENDOR_ID_V1, NO_PAYLOAD,
+       "SA",
+       "PROP",
+       "TRANS",
+       "KE",
+       "ID",
+       "CERT",
+       "CERTREQ",
+       "HASH",
+       "SIG",
+       "No",
+       "NO",
+       "D",
+       "V");
+ENUM_NEXT(payload_type_short_names, SECURITY_ASSOCIATION, EXTENSIBLE_AUTHENTICATION, VENDOR_ID_V1,
        "SA",
        "KE",
        "IDi",
index ad3023f..021383a 100644 (file)
@@ -31,12 +31,12 @@ typedef struct payload_t payload_t;
 
 
 /**
- * Payload-Types of a IKEv2-Message.
+ * Payload-Types of an IKE message.
  *
  * Header and substructures are also defined as
  * payload types with values from PRIVATE USE space.
  */
-enum payload_type_t{
+enum payload_type_t {
 
        /**
         * End of payload list in next_payload
@@ -46,6 +46,71 @@ enum payload_type_t{
        /**
         * The security association (SA) payload containing proposals.
         */
+       SECURITY_ASSOCIATION_V1 = 1,
+
+       /**
+        * The proposal payload, containing transforms.
+        */
+       PROPOSAL_V1 = 2,
+
+       /**
+        * The transform payload.
+        */
+       TRANSFORM_V1 = 3,
+
+       /**
+        * The key exchange (KE) payload containing diffie-hellman values.
+        */
+       KEY_EXCHANGE_V1 = 4,
+
+       /**
+        * ID payload.
+        */
+       ID_V1 = 5,
+
+       /**
+        * Certificate payload with certificates (CERT).
+        */
+       CERTIFICATE_V1 = 6,
+
+       /**
+        * Certificate request payload.
+        */
+       CERTIFICATE_REQUEST_V1 = 7,
+
+       /**
+        * Hash payload.
+        */
+       HASH_V1 = 8,
+
+       /**
+        * Signature payload
+        */
+       SIGNATURE_V1 = 9,
+
+       /**
+        * Nonce payload.
+        */
+       NONCE_V1 = 10,
+
+       /**
+        * Notification payload.
+        */
+       NOTIFICATION_V1 = 11,
+
+       /**
+        * Delete payload.
+        */
+       DELETE_V1 = 12,
+
+       /**
+        * Vendor id payload.
+        */
+       VENDOR_ID_V1 = 13,
+
+       /**
+        * The security association (SA) payload containing proposals.
+        */
        SECURITY_ASSOCIATION = 33,
 
        /**