version 1.1.1.1, 2020/06/03 09:46:45
|
version 1.1.1.2, 2021/03/17 00:20:09
|
Line 1
|
Line 1
|
/* |
/* |
* Copyright (C) 2006-2019 Tobias Brunner | * Copyright (C) 2006-2020 Tobias Brunner |
* Copyright (C) 2006 Daniel Roethlisberger |
* Copyright (C) 2006 Daniel Roethlisberger |
* Copyright (C) 2005-2009 Martin Willi |
* Copyright (C) 2005-2009 Martin Willi |
* Copyright (C) 2005 Jan Hutter |
* Copyright (C) 2005 Jan Hutter |
Line 28 typedef enum ike_extension_t ike_extension_t;
|
Line 28 typedef enum ike_extension_t ike_extension_t;
|
typedef enum ike_condition_t ike_condition_t; |
typedef enum ike_condition_t ike_condition_t; |
typedef enum ike_sa_state_t ike_sa_state_t; |
typedef enum ike_sa_state_t ike_sa_state_t; |
typedef enum statistic_t statistic_t; |
typedef enum statistic_t statistic_t; |
|
typedef enum update_hosts_flag_t update_hosts_flag_t; |
typedef struct ike_sa_t ike_sa_t; |
typedef struct ike_sa_t ike_sa_t; |
|
|
#include <library.h> |
#include <library.h> |
Line 265 enum statistic_t {
|
Line 266 enum statistic_t {
|
}; |
}; |
|
|
/** |
/** |
|
* Flags used when updating addresses |
|
*/ |
|
enum update_hosts_flag_t { |
|
/** Force updating the local address (otherwise not updated if an address |
|
* is already set). */ |
|
UPDATE_HOSTS_FORCE_LOCAL = (1<<0), |
|
/** Force updating the remote address (otherwise only updated if peer is |
|
* behind a NAT). */ |
|
UPDATE_HOSTS_FORCE_REMOTE = (1<<1), |
|
/** Force updating both addresses. */ |
|
UPDATE_HOSTS_FORCE_ADDRS = UPDATE_HOSTS_FORCE_LOCAL|UPDATE_HOSTS_FORCE_REMOTE, |
|
/** Force updating the CHILD_SAs even if no addresses changed, useful if |
|
* NAT state may have changed. */ |
|
UPDATE_HOSTS_FORCE_CHILDREN = (1<<2), |
|
/** Force updating everything. */ |
|
UPDATE_HOSTS_FORCE_ALL = UPDATE_HOSTS_FORCE_ADDRS|UPDATE_HOSTS_FORCE_CHILDREN, |
|
}; |
|
|
|
/** |
* State of an IKE_SA. |
* State of an IKE_SA. |
* |
* |
* An IKE_SA passes various states in its lifetime. A newly created |
* An IKE_SA passes various states in its lifetime. A newly created |
Line 454 struct ike_sa_t {
|
Line 474 struct ike_sa_t {
|
void (*float_ports)(ike_sa_t *this); |
void (*float_ports)(ike_sa_t *this); |
|
|
/** |
/** |
* Update the IKE_SAs host. | * Update the IKE_SAs host and CHILD_SAs. |
* |
* |
* Hosts may be NULL to use current host. |
* Hosts may be NULL to use current host. |
* |
* |
* @param me new local host address, or NULL |
* @param me new local host address, or NULL |
* @param other new remote host address, or NULL |
* @param other new remote host address, or NULL |
* @param force force update | * @param flags flags to force certain updates |
*/ |
*/ |
void (*update_hosts)(ike_sa_t *this, host_t *me, host_t *other, bool force); | void (*update_hosts)(ike_sa_t *this, host_t *me, host_t *other, |
| update_hosts_flag_t flags); |
|
|
/** |
/** |
* Get the own identification. |
* Get the own identification. |
Line 872 struct ike_sa_t {
|
Line 893 struct ike_sa_t {
|
* |
* |
* @param message_id ID of the request to retransmit |
* @param message_id ID of the request to retransmit |
* @return |
* @return |
* - SUCCESS | * - SUCCESS if retransmit was sent |
* - NOT_FOUND if request doesn't have to be retransmitted | * - INVALID_STATE if no retransmit required |
| * - DESTROY_ME if this IKE_SA MUST be deleted |
*/ |
*/ |
status_t (*retransmit) (ike_sa_t *this, uint32_t message_id); | status_t (*retransmit)(ike_sa_t *this, uint32_t message_id); |
|
|
/** |
/** |
* Sends a DPD request to the peer. |
* Sends a DPD request to the peer. |