- changed allocation behavior
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ike_auth_requested.c
|
||||
*
|
||||
* @brief State of an IKE_SA, which has requested an IKE_AUTH.
|
||||
* @brief Implementation of ike_auth_requested_t.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ike_auth_requested.h
|
||||
*
|
||||
* @brief State of an IKE_SA, which has requested an IKE_AUTH.
|
||||
* @brief Interface of ike_auth_requested_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,8 @@ typedef struct ike_auth_requested_t ike_auth_requested_t;
|
||||
|
||||
/**
|
||||
* @brief This class represents an IKE_SA, which has requested an IKE_AUTH.
|
||||
*
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct ike_auth_requested_t {
|
||||
/**
|
||||
@@ -45,6 +46,9 @@ struct ike_auth_requested_t {
|
||||
* Constructor of class ike_auth_requested_t
|
||||
*
|
||||
* @param ike_sa assigned ike_sa object
|
||||
* @return created ike_auth_requested_t object
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
ike_auth_requested_t *ike_auth_requested_create(protected_ike_sa_t *ike_sa);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ike_sa_established.c
|
||||
*
|
||||
* @brief State of an established IKE_SA.
|
||||
* @brief Implementation of ike_sa_established_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,6 @@ typedef struct private_ike_sa_established_t private_ike_sa_established_t;
|
||||
|
||||
/**
|
||||
* Private data of a ike_sa_established_t object.
|
||||
*
|
||||
*/
|
||||
struct private_ike_sa_established_t {
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ike_sa_established.h
|
||||
*
|
||||
* @brief State of an established IKE_SA.
|
||||
* @brief Interface of ike_sa_established_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
typedef struct ike_sa_established_t ike_sa_established_t;
|
||||
|
||||
/**
|
||||
* @brief This class represents an the state of an established.
|
||||
* @brief This class represents an the state of an established
|
||||
* IKE_SA.
|
||||
*
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct ike_sa_established_t {
|
||||
/**
|
||||
@@ -44,7 +45,10 @@ struct ike_sa_established_t {
|
||||
/**
|
||||
* Constructor of class ike_sa_established_t
|
||||
*
|
||||
* @param ike_sa assigned ike_sa
|
||||
* @param ike_sa assigned ike_sa
|
||||
* @return created ike_sa_established_t object
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
ike_sa_established_t *ike_sa_established_create(protected_ike_sa_t *ike_sa);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ike_sa_init_requested.c
|
||||
*
|
||||
* @brief State of a IKE_SA after requesting an IKE_SA_INIT
|
||||
* @brief Implementation of ike_sa_init_requested_t.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ike_sa_init_requested.h
|
||||
*
|
||||
* @brief State of a IKE_SA after requesting an IKE_SA_INIT
|
||||
* @brief Interface of ike_sa_init_requestet_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,22 +33,25 @@ typedef struct ike_sa_init_requested_t ike_sa_init_requested_t;
|
||||
|
||||
/**
|
||||
* @brief This class represents an IKE_SA state when requested an IKE_SA_INIT.
|
||||
*
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct ike_sa_init_requested_t {
|
||||
/**
|
||||
* methods of the state_t interface
|
||||
*/
|
||||
state_t state_interface;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor of class ike_sa_init_responded_t
|
||||
*
|
||||
* @param ike_sa assigned ike_sa
|
||||
* @param ike_sa assigned ike_sa
|
||||
* @param diffie_hellman diffie_hellman object use to retrieve shared secret
|
||||
* @param sent_nonce Sent nonce value
|
||||
* @return created ike_sa_init_request_t object
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
ike_sa_init_requested_t *ike_sa_init_requested_create(protected_ike_sa_t *ike_sa, u_int16_t dh_group_priority, diffie_hellman_t *diffie_hellman, chunk_t sent_nonce);
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ static ike_sa_state_t get_state(private_ike_sa_init_responded_t *this)
|
||||
/**
|
||||
* Implements state_t.get_state
|
||||
*/
|
||||
static status_t destroy(private_ike_sa_init_responded_t *this)
|
||||
static void destroy(private_ike_sa_init_responded_t *this)
|
||||
{
|
||||
this->logger->log(this->logger, CONTROL | MORE, "Going to destroy ike_sa_init_responded_t state object");
|
||||
|
||||
@@ -101,7 +101,6 @@ static status_t destroy(private_ike_sa_init_responded_t *this)
|
||||
allocator_free(this->received_nonce.ptr);
|
||||
|
||||
allocator_free(this);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,8 +29,10 @@
|
||||
typedef struct ike_sa_init_responded_t ike_sa_init_responded_t;
|
||||
|
||||
/**
|
||||
* @brief This class represents an IKE_SA state when responded to an IKE_SA_INIT request.
|
||||
*
|
||||
* @brief This class represents an IKE_SA state when
|
||||
* responded to an IKE_SA_INIT request.
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct ike_sa_init_responded_t {
|
||||
/**
|
||||
@@ -41,9 +43,12 @@ struct ike_sa_init_responded_t {
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor of class ike_sa_init_responded_t
|
||||
* @brief Constructor of class ike_sa_init_responded_t
|
||||
*
|
||||
* @param ike_sa assigned IKE_SA
|
||||
* @param ike_sa assigned IKE_SA
|
||||
* @todo Params description
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
ike_sa_init_responded_t *ike_sa_init_responded_create(protected_ike_sa_t *ike_sa, chunk_t shared_secret, chunk_t received_nonce, chunk_t sent_nonce);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file initiator_init.h
|
||||
*
|
||||
* @brief Start state of a IKE_SA as initiator
|
||||
* @brief Interface of initiator_init_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,8 @@ typedef struct initiator_init_t initiator_init_t;
|
||||
/**
|
||||
* @brief This class represents an IKE_SA state when initializing.
|
||||
* a connection as initiator
|
||||
*
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct initiator_init_t {
|
||||
/**
|
||||
@@ -52,9 +53,11 @@ struct initiator_init_t {
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor of class initiator_init_t
|
||||
* @brief Constructor of class initiator_init_t
|
||||
*
|
||||
* @param ike_sa assigned IKE_SA
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
initiator_init_t *initiator_init_create(protected_ike_sa_t *ike_sa);
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ typedef struct responder_init_t responder_init_t;
|
||||
/**
|
||||
* @brief This class represents an IKE_SA state when initializing.
|
||||
* a connection as responder.
|
||||
*
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct responder_init_t {
|
||||
/**
|
||||
@@ -48,6 +49,8 @@ struct responder_init_t {
|
||||
* @param ike_sa assigned IKE_SA
|
||||
*
|
||||
* @return responder_init state
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
responder_init_t *responder_init_create(protected_ike_sa_t *ike_sa);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file state.c
|
||||
*
|
||||
* @brief Interface for a specific IKE_SA state
|
||||
* @brief Interface additions to ike_sa_sate_t.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file state.h
|
||||
*
|
||||
* @brief Interface for a specific IKE_SA state.
|
||||
* @brief Interface ike_sa_sate_t.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,8 @@ typedef enum ike_sa_state_t ike_sa_state_t;
|
||||
|
||||
/**
|
||||
* States in which a IKE_SA can actually be
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
enum ike_sa_state_t {
|
||||
|
||||
@@ -79,6 +81,8 @@ typedef struct state_t state_t;
|
||||
|
||||
/**
|
||||
* @brief This interface represents an IKE_SA state
|
||||
*
|
||||
* @ingroup states
|
||||
*/
|
||||
struct state_t {
|
||||
|
||||
@@ -109,5 +113,4 @@ struct state_t {
|
||||
void (*destroy) (state_t *this);
|
||||
};
|
||||
|
||||
|
||||
#endif /*STATE_H_*/
|
||||
|
||||
Reference in New Issue
Block a user