IKEv2 notification types updated.
authorTobias Brunner <tobias@strongswan.org>
Wed, 4 Aug 2010 08:02:09 +0000 (10:02 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 4 Aug 2010 08:06:00 +0000 (10:06 +0200)
src/libcharon/encoding/payloads/notify_payload.c
src/libcharon/encoding/payloads/notify_payload.h

index 469698e..cf4832f 100644 (file)
@@ -53,7 +53,7 @@ ENUM_NEXT(notify_type_names, SINGLE_PAIR_REQUIRED, USE_ASSIGNED_HoA, AUTHENTICAT
        "USE_ASSIGNED_HoA");
 ENUM_NEXT(notify_type_names, ME_CONNECT_FAILED, ME_CONNECT_FAILED, USE_ASSIGNED_HoA,
        "ME_CONNECT_FAILED");
-ENUM_NEXT(notify_type_names, INITIAL_CONTACT, LINK_ID, ME_CONNECT_FAILED,
+ENUM_NEXT(notify_type_names, INITIAL_CONTACT, EAP_ONLY_AUTHENTICATION, ME_CONNECT_FAILED,
        "INITIAL_CONTACT",
        "SET_WINDOW_SIZE",
        "ADDITIONAL_TS_POSSIBLE",
@@ -84,8 +84,9 @@ ENUM_NEXT(notify_type_names, INITIAL_CONTACT, LINK_ID, ME_CONNECT_FAILED,
        "TICKET_ACK",
        "TICKET_NACK",
        "TICKET_OPAQUE",
-       "LINK_ID");
-ENUM_NEXT(notify_type_names, EAP_ONLY_AUTHENTICATION, EAP_ONLY_AUTHENTICATION, LINK_ID,
+       "LINK_ID",
+       "USE_WESP_MODE",
+       "ROHC_SUPPORTED",
        "EAP_ONLY_AUTHENTICATION");
 ENUM_NEXT(notify_type_names, USE_BEET_MODE, USE_BEET_MODE, EAP_ONLY_AUTHENTICATION,
        "USE_BEET_MODE");
@@ -129,7 +130,7 @@ ENUM_NEXT(notify_type_short_names, SINGLE_PAIR_REQUIRED, USE_ASSIGNED_HoA, AUTHE
        "ASSIGNED_HoA");
 ENUM_NEXT(notify_type_short_names, ME_CONNECT_FAILED, ME_CONNECT_FAILED, USE_ASSIGNED_HoA,
        "ME_CONN_FAIL");
-ENUM_NEXT(notify_type_short_names, INITIAL_CONTACT, LINK_ID, ME_CONNECT_FAILED,
+ENUM_NEXT(notify_type_short_names, INITIAL_CONTACT, EAP_ONLY_AUTHENTICATION, ME_CONNECT_FAILED,
        "INIT_CONTACT",
        "SET_WINSIZE",
        "ADD_TS_POSS",
@@ -160,8 +161,9 @@ ENUM_NEXT(notify_type_short_names, INITIAL_CONTACT, LINK_ID, ME_CONNECT_FAILED,
        "TKT_ACK",
        "TKT_NACK",
        "TKT_OPAK",
-       "LINK_ID");
-ENUM_NEXT(notify_type_short_names, EAP_ONLY_AUTHENTICATION, EAP_ONLY_AUTHENTICATION, LINK_ID,
+       "LINK_ID",
+       "WESP_MODE",
+       "ROHC_SUP",
        "EAP_ONLY");
 ENUM_NEXT(notify_type_short_names, USE_BEET_MODE, USE_BEET_MODE, EAP_ONLY_AUTHENTICATION,
        "BEET_MODE");
@@ -238,29 +240,29 @@ struct private_notify_payload_t {
  */
 encoding_rule_t notify_payload_encodings[] = {
        /* 1 Byte next payload type, stored in the field next_payload */
-       { U_INT_8,                      offsetof(private_notify_payload_t, next_payload)                },
+       { U_INT_8,                      offsetof(private_notify_payload_t, next_payload)                },
        /* the critical bit */
-       { FLAG,                         offsetof(private_notify_payload_t, critical)                    },
+       { FLAG,                         offsetof(private_notify_payload_t, critical)                    },
        /* 7 Bit reserved bits, nowhere stored */
-       { RESERVED_BIT, 0                                                                                                               },
-       { RESERVED_BIT, 0                                                                                                               },
-       { RESERVED_BIT, 0                                                                                                               },
-       { RESERVED_BIT, 0                                                                                                               },
-       { RESERVED_BIT, 0                                                                                                               },
-       { RESERVED_BIT, 0                                                                                                               },
-       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
+       { RESERVED_BIT, 0                                                                                                               },
        /* Length of the whole payload*/
-       { PAYLOAD_LENGTH,       offsetof(private_notify_payload_t, payload_length)              },
+       { PAYLOAD_LENGTH,       offsetof(private_notify_payload_t, payload_length)              },
        /* Protocol ID as 8 bit field*/
-       { U_INT_8,                      offsetof(private_notify_payload_t, protocol_id)                         },
+       { U_INT_8,                      offsetof(private_notify_payload_t, protocol_id)                 },
        /* SPI Size as 8 bit field*/
-       { SPI_SIZE,                     offsetof(private_notify_payload_t, spi_size)                    },
+       { SPI_SIZE,                     offsetof(private_notify_payload_t, spi_size)                    },
        /* Notify message type as 16 bit field*/
        { U_INT_16,                     offsetof(private_notify_payload_t, notify_type) },
        /* SPI as variable length field*/
        { SPI,                          offsetof(private_notify_payload_t, spi)                                 },
        /* Key Exchange Data is from variable size */
-       { NOTIFICATION_DATA,    offsetof(private_notify_payload_t, notification_data)   }
+       { NOTIFICATION_DATA,    offsetof(private_notify_payload_t, notification_data)   }
 };
 
 /*
index 0e1bc23..df3d198 100644 (file)
@@ -98,16 +98,21 @@ enum notify_type_t {
        REDIRECT_SUPPORTED = 16406,
        REDIRECT = 16407,
        REDIRECTED_FROM = 16408,
-       /* draft-ietf-ipsecme-ikev2-resumption, assigned by IANA */
+       /* session resumption, RFC 5723 */
        TICKET_LT_OPAQUE = 16409,
        TICKET_REQUEST = 16410,
        TICKET_ACK = 16411,
        TICKET_NACK = 16412,
        TICKET_OPAQUE = 16413,
+       /* IPv6 configuration, RFC 5739 */
        LINK_ID = 16414,
+       /* wrapped esp, RFC 5840 */
+       USE_WESP_MODE = 16415,
+       /* robust header compression, RFC 5857 */
+       ROHC_SUPPORTED = 16416,
+       /* RFC-ietf-ipsecme-eap-mutual, assigned by IANA */
+       EAP_ONLY_AUTHENTICATION = 16417,
 
-       /* draft-eronen-ipsec-ikev2-eap-auth, not assigned by IANA yet */
-       EAP_ONLY_AUTHENTICATION = 40960,
        /* BEET mode, not even a draft yet. private use */
        USE_BEET_MODE = 40961,
        /* IKE-ME, private use */
@@ -144,7 +149,7 @@ struct notify_payload_t {
        /**
         * Gets the protocol id of this payload.
         *
-        * @return                      protocol id of this payload
+        * @return                      protocol id of this payload
         */
        u_int8_t (*get_protocol_id) (notify_payload_t *this);
 
@@ -158,7 +163,7 @@ struct notify_payload_t {
        /**
         * Gets the notify message type of this payload.
         *
-        * @return                      notify message type of this payload
+        * @return                      notify message type of this payload
         */
        notify_type_t (*get_notify_type) (notify_payload_t *this);
 
@@ -174,7 +179,7 @@ struct notify_payload_t {
         *
         * This is only valid for notifys with protocol AH|ESP
         *
-        * @return              SPI value
+        * @return              SPI value
         */
        u_int32_t (*get_spi) (notify_payload_t *this);
 
@@ -192,7 +197,7 @@ struct notify_payload_t {
         *
         * Returned data are not copied.
         *
-        * @return              chunk_t pointing to the value
+        * @return              chunk_t pointing to the value
         */
        chunk_t (*get_notification_data) (notify_payload_t *this);
 
@@ -201,7 +206,7 @@ struct notify_payload_t {
         *
         * @warning Value is getting copied.
         *
-        * @param notification_data     chunk_t pointing to the value to set
+        * @param notification_data     chunk_t pointing to the value to set
         */
        void (*set_notification_data) (notify_payload_t *this,
                                                                   chunk_t notification_data);