Added IKEv1 support to notify payload
This commit is contained in:
@@ -33,19 +33,23 @@ typedef struct notify_payload_t notify_payload_t;
|
||||
#include <utils/linked_list.h>
|
||||
|
||||
/**
|
||||
* Notify message types.
|
||||
*
|
||||
* See IKEv2 RFC 3.10.1.
|
||||
* Notify message types for IKEv2, and a subset for IKEv1.
|
||||
*/
|
||||
enum notify_type_t {
|
||||
/* notify error messages */
|
||||
UNSUPPORTED_CRITICAL_PAYLOAD = 1,
|
||||
/* IKEv1 alias */
|
||||
INVALID_PAYLOAD_TYPE = 1,
|
||||
INVALID_IKE_SPI = 4,
|
||||
INVALID_MAJOR_VERSION = 5,
|
||||
INVALID_SYNTAX = 7,
|
||||
/* IKEv1 alias */
|
||||
INVALID_EXCHANGE_TYPE = 7,
|
||||
INVALID_MESSAGE_ID = 9,
|
||||
INVALID_SPI = 11,
|
||||
NO_PROPOSAL_CHOSEN = 14,
|
||||
/* IKEv1 only */
|
||||
PAYLOAD_MALFORMED = 16,
|
||||
INVALID_KE_PAYLOAD = 17,
|
||||
AUTHENTICATION_FAILED = 24,
|
||||
SINGLE_PAIR_REQUIRED = 34,
|
||||
@@ -122,6 +126,8 @@ enum notify_type_t {
|
||||
IKEV2_REPLAY_COUNTER_SYNC_SUPPORTED = 16421,
|
||||
IKEV2_MESSAGE_ID_SYNC = 16422,
|
||||
IPSEC_REPLAY_COUNTER_SYNC = 16423,
|
||||
/* IKEv1 initial contact */
|
||||
INITIAL_CONTACT_IKEV1 = 24578,
|
||||
/* BEET mode, not even a draft yet. private use */
|
||||
USE_BEET_MODE = 40961,
|
||||
/* IKE-ME, private use */
|
||||
@@ -229,18 +235,20 @@ struct notify_payload_t {
|
||||
/**
|
||||
* Creates an empty notify_payload_t object
|
||||
*
|
||||
* @param type payload type, NOTIFY or NOTIFY_V1
|
||||
* @return created notify_payload_t object
|
||||
*/
|
||||
notify_payload_t *notify_payload_create(void);
|
||||
notify_payload_t *notify_payload_create(payload_type_t type);
|
||||
|
||||
/**
|
||||
* Creates an notify_payload_t object of specific type for specific protocol id.
|
||||
*
|
||||
* @param protocol_id protocol id (IKE, AH or ESP)
|
||||
* @param type payload type, NOTIFY or NOTIFY_V1
|
||||
* @param protocol protocol id (IKE, AH or ESP)
|
||||
* @param type notify type (see notify_type_t)
|
||||
* @return notify_payload_t object
|
||||
*/
|
||||
notify_payload_t *notify_payload_create_from_protocol_and_type(
|
||||
protocol_id_t protocol_id, notify_type_t type);
|
||||
payload_type_t type, protocol_id_t protocol, notify_type_t notify);
|
||||
|
||||
#endif /** NOTIFY_PAYLOAD_H_ @}*/
|
||||
|
||||
Reference in New Issue
Block a user