replaces four spaces by tabs, where appropriate
This commit is contained in:
@@ -52,7 +52,7 @@ struct private_backend_manager_t {
|
||||
typedef enum ike_cfg_match_t {
|
||||
MATCH_NONE = 0x00,
|
||||
MATCH_ANY = 0x01,
|
||||
MATCH_ME = 0x04,
|
||||
MATCH_ME = 0x04,
|
||||
MATCH_OTHER = 0x08,
|
||||
} ike_cfg_match_t;
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ typedef struct peer_cfg_t peer_cfg_t;
|
||||
*/
|
||||
enum cert_policy_t {
|
||||
/** always send certificates, even when not requested */
|
||||
CERT_ALWAYS_SEND = 0,
|
||||
CERT_ALWAYS_SEND = 0,
|
||||
/** send certificate upon cert request */
|
||||
CERT_SEND_IF_ASKED = 1,
|
||||
CERT_SEND_IF_ASKED = 1,
|
||||
/** never send a certificate, even when requested */
|
||||
CERT_NEVER_SEND = 2,
|
||||
CERT_NEVER_SEND = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -201,7 +201,7 @@ proposal_t *proposal_create_default(protocol_id_t protocol);
|
||||
*
|
||||
* The string is in the same form as a in the ipsec.conf file.
|
||||
* E.g.: aes128-sha2_256-modp2048
|
||||
* 3des-md5
|
||||
* 3des-md5
|
||||
* An additional '!' at the end of the string forces this proposal,
|
||||
* without it the peer may choose another algorithm we support.
|
||||
*
|
||||
@@ -215,9 +215,9 @@ proposal_t *proposal_create_from_string(protocol_id_t protocol, const char *algs
|
||||
* printf hook function for proposal_t.
|
||||
*
|
||||
* Arguments are:
|
||||
* proposal_t *proposal
|
||||
* proposal_t *proposal
|
||||
* With the #-specifier, arguments are:
|
||||
* linked_list_t *list containing proposal_t*
|
||||
* linked_list_t *list containing proposal_t*
|
||||
*/
|
||||
int proposal_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec,
|
||||
const void *const *args);
|
||||
|
||||
@@ -36,19 +36,19 @@ enum ts_type_t {
|
||||
|
||||
/**
|
||||
* A range of IPv4 addresses, represented by two four (4) octet
|
||||
* values. The first value is the beginning IPv4 address
|
||||
* (inclusive) and the second value is the ending IPv4 address
|
||||
* (inclusive). All addresses falling between the two specified
|
||||
* addresses are considered to be within the list.
|
||||
*/
|
||||
* values. The first value is the beginning IPv4 address
|
||||
* (inclusive) and the second value is the ending IPv4 address
|
||||
* (inclusive). All addresses falling between the two specified
|
||||
* addresses are considered to be within the list.
|
||||
*/
|
||||
TS_IPV4_ADDR_RANGE = 7,
|
||||
|
||||
/**
|
||||
* A range of IPv6 addresses, represented by two sixteen (16)
|
||||
* octet values. The first value is the beginning IPv6 address
|
||||
* (inclusive) and the second value is the ending IPv6 address
|
||||
* (inclusive). All addresses falling between the two specified
|
||||
* addresses are considered to be within the list.
|
||||
* octet values. The first value is the beginning IPv6 address
|
||||
* (inclusive) and the second value is the ending IPv6 address
|
||||
* (inclusive). All addresses falling between the two specified
|
||||
* addresses are considered to be within the list.
|
||||
*/
|
||||
TS_IPV6_ADDR_RANGE = 8
|
||||
};
|
||||
@@ -294,9 +294,9 @@ traffic_selector_t *traffic_selector_create_dynamic(u_int8_t protocol,
|
||||
* printf hook function for traffic_selector_t.
|
||||
*
|
||||
* Arguments are:
|
||||
* traffic_selector_t *ts
|
||||
* traffic_selector_t *ts
|
||||
* With the #-specifier, arguments are:
|
||||
* linked_list_t *list containing traffic_selector_t*
|
||||
* linked_list_t *list containing traffic_selector_t*
|
||||
*/
|
||||
int traffic_selector_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec,
|
||||
const void *const *args);
|
||||
|
||||
@@ -276,7 +276,7 @@ static enumerator_t *create_private(credential_set_t *set, private_data_t *data)
|
||||
*/
|
||||
static enumerator_t* create_private_enumerator(
|
||||
private_credential_manager_t *this,
|
||||
key_type_t key, identification_t *keyid)
|
||||
key_type_t key, identification_t *keyid)
|
||||
{
|
||||
private_data_t *data;
|
||||
|
||||
@@ -529,7 +529,7 @@ static bool verify_ocsp(private_credential_manager_t *this,
|
||||
if (this->cache->issued_by(this->cache, subject, issuer))
|
||||
{
|
||||
DBG1(DBG_CFG, " ocsp response correctly signed by \"%Y\"",
|
||||
issuer->get_subject(issuer));
|
||||
issuer->get_subject(issuer));
|
||||
verified = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -622,8 +622,8 @@ static certificate_t *get_better_ocsp(private_credential_manager_t *this,
|
||||
* validate a x509 certificate using OCSP
|
||||
*/
|
||||
static cert_validation_t check_ocsp(private_credential_manager_t *this,
|
||||
x509_t *subject, x509_t *issuer,
|
||||
auth_cfg_t *auth)
|
||||
x509_t *subject, x509_t *issuer,
|
||||
auth_cfg_t *auth)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
cert_validation_t valid = VALIDATION_SKIPPED;
|
||||
|
||||
@@ -190,9 +190,9 @@ struct credential_manager_t {
|
||||
void (*remove_set)(credential_manager_t *this, credential_set_t *set);
|
||||
|
||||
/**
|
||||
* Destroy a credential_manager instance.
|
||||
*/
|
||||
void (*destroy)(credential_manager_t *this);
|
||||
* Destroy a credential_manager instance.
|
||||
*/
|
||||
void (*destroy)(credential_manager_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,9 +37,9 @@ struct auth_cfg_wrapper_t {
|
||||
credential_set_t set;
|
||||
|
||||
/**
|
||||
* Destroy a auth_cfg_wrapper instance.
|
||||
*/
|
||||
void (*destroy)(auth_cfg_wrapper_t *this);
|
||||
* Destroy a auth_cfg_wrapper instance.
|
||||
*/
|
||||
void (*destroy)(auth_cfg_wrapper_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,9 +37,9 @@ struct ocsp_response_wrapper_t {
|
||||
credential_set_t set;
|
||||
|
||||
/**
|
||||
* Destroy a ocsp_response_wrapper instance.
|
||||
*/
|
||||
void (*destroy)(ocsp_response_wrapper_t *this);
|
||||
* Destroy a ocsp_response_wrapper instance.
|
||||
*/
|
||||
void (*destroy)(ocsp_response_wrapper_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -742,7 +742,7 @@ int main(int argc, char *argv[])
|
||||
switch (c)
|
||||
{
|
||||
case EOF:
|
||||
break;
|
||||
break;
|
||||
case 'h':
|
||||
usage(NULL);
|
||||
break;
|
||||
|
||||
@@ -117,8 +117,8 @@ static status_t verify(private_configuration_attribute_t *this)
|
||||
|
||||
switch (this->attribute_type)
|
||||
{
|
||||
case INTERNAL_IP4_ADDRESS:
|
||||
case INTERNAL_IP4_NETMASK:
|
||||
case INTERNAL_IP4_ADDRESS:
|
||||
case INTERNAL_IP4_NETMASK:
|
||||
case INTERNAL_IP4_DNS:
|
||||
case INTERNAL_IP4_NBNS:
|
||||
case INTERNAL_ADDRESS_EXPIRY:
|
||||
|
||||
@@ -87,7 +87,7 @@ enum notify_type_t {
|
||||
NO_NATS_ALLOWED = 16402,
|
||||
/* repeated authentication extension, RFC4478 */
|
||||
AUTH_LIFETIME = 16403,
|
||||
/* multiple authentication exchanges, RFC 4739 */
|
||||
/* multiple authentication exchanges, RFC 4739 */
|
||||
MULTIPLE_AUTH_SUPPORTED = 16404,
|
||||
ANOTHER_AUTH_FOLLOWS = 16405,
|
||||
/* draft-eronen-ipsec-ikev2-eap-auth, not assigned by IANA yet */
|
||||
|
||||
@@ -129,7 +129,7 @@ struct kernel_interface_t {
|
||||
* @param encap current use of UDP encapsulation
|
||||
* @param new_encap new use of UDP encapsulation
|
||||
* @return SUCCESS if operation completed, NOT_SUPPORTED if
|
||||
* the kernel interface can't update the SA
|
||||
* the kernel interface can't update the SA
|
||||
*/
|
||||
status_t (*update_sa)(kernel_interface_t *this,
|
||||
u_int32_t spi, protocol_id_t protocol, u_int16_t cpi,
|
||||
|
||||
@@ -160,7 +160,7 @@ struct kernel_ipsec_t {
|
||||
* @param encap current use of UDP encapsulation
|
||||
* @param new_encap new use of UDP encapsulation
|
||||
* @return SUCCESS if operation completed, NOT_SUPPORTED if
|
||||
* the kernel interface can't update the SA
|
||||
* the kernel interface can't update the SA
|
||||
*/
|
||||
status_t (*update_sa)(kernel_ipsec_t *this,
|
||||
u_int32_t spi, protocol_id_t protocol, u_int16_t cpi,
|
||||
|
||||
@@ -41,7 +41,7 @@ typedef struct receiver_t receiver_t;
|
||||
* find out wich key was used for cookie creation. Further, we can set a
|
||||
* lifetime for the cookie, which allows us to reuse the secret for a longer
|
||||
* time.
|
||||
* COOKIE = time | sha1( IPi | SPIi | time | secret )
|
||||
* COOKIE = time | sha1( IPi | SPIi | time | secret )
|
||||
*
|
||||
* The secret is changed after a certain amount of cookies sent. The old
|
||||
* secret is stored to allow a clean migration between secret changes.
|
||||
|
||||
@@ -83,7 +83,7 @@ static status_t initiate_peer(private_eap_gtc_t *this, eap_payload_t **out)
|
||||
* PAM conv callback function
|
||||
*/
|
||||
static int auth_conv(int num_msg, const struct pam_message **msg,
|
||||
struct pam_response **resp, char *password)
|
||||
struct pam_response **resp, char *password)
|
||||
{
|
||||
struct pam_response *response;
|
||||
|
||||
@@ -103,9 +103,9 @@ static int auth_conv(int num_msg, const struct pam_message **msg,
|
||||
*/
|
||||
static bool authenticate(char *service, char *user, char *password)
|
||||
{
|
||||
pam_handle_t *pamh = NULL;
|
||||
pam_handle_t *pamh = NULL;
|
||||
static struct pam_conv conv;
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
conv.conv = (void*)auth_conv;
|
||||
conv.appdata_ptr = password;
|
||||
|
||||
@@ -709,7 +709,7 @@ static status_t peer_process_challenge(private_eap_sim_t *this,
|
||||
* process an EAP-SIM/Response/Challenge message
|
||||
*/
|
||||
static status_t server_process_challenge(private_eap_sim_t *this,
|
||||
eap_payload_t *in, eap_payload_t **out)
|
||||
eap_payload_t *in, eap_payload_t **out)
|
||||
{
|
||||
chunk_t message, data;
|
||||
sim_attribute_t attribute;
|
||||
|
||||
@@ -952,17 +952,17 @@ static status_t manage_ipaddr(private_kernel_netlink_net_t *this, int nlmsg_type
|
||||
|
||||
chunk = ip->get_address(ip);
|
||||
|
||||
hdr = (struct nlmsghdr*)request;
|
||||
hdr = (struct nlmsghdr*)request;
|
||||
hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags;
|
||||
hdr->nlmsg_type = nlmsg_type;
|
||||
hdr->nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
|
||||
|
||||
msg = (struct ifaddrmsg*)NLMSG_DATA(hdr);
|
||||
msg->ifa_family = ip->get_family(ip);
|
||||
msg->ifa_flags = 0;
|
||||
msg->ifa_prefixlen = 8 * chunk.len;
|
||||
msg->ifa_scope = RT_SCOPE_UNIVERSE;
|
||||
msg->ifa_index = if_index;
|
||||
msg->ifa_family = ip->get_family(ip);
|
||||
msg->ifa_flags = 0;
|
||||
msg->ifa_prefixlen = 8 * chunk.len;
|
||||
msg->ifa_scope = RT_SCOPE_UNIVERSE;
|
||||
msg->ifa_index = if_index;
|
||||
|
||||
netlink_add_attribute(hdr, IFA_LOCAL, chunk, sizeof(request));
|
||||
|
||||
|
||||
@@ -682,8 +682,8 @@ static traffic_selector_t* sadb_address2ts(struct sadb_address *address)
|
||||
host_t *host;
|
||||
|
||||
/* The Linux 2.6 kernel does not set the protocol and port information
|
||||
* in the src and dst sadb_address extensions of the SADB_ACQUIRE message.
|
||||
*/
|
||||
* in the src and dst sadb_address extensions of the SADB_ACQUIRE message.
|
||||
*/
|
||||
host = host_create_from_sockaddr((sockaddr_t*)&address[1]) ;
|
||||
ts = traffic_selector_create_from_subnet(host, address->sadb_address_prefixlen,
|
||||
address->sadb_address_proto, host->get_port(host));
|
||||
|
||||
@@ -218,7 +218,7 @@ static enumerator_t* create_cert_enumerator(private_medcli_creds_t *this,
|
||||
*/
|
||||
static void destroy(private_medcli_creds_t *this)
|
||||
{
|
||||
free(this);
|
||||
free(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -138,7 +138,7 @@ static enumerator_t* create_cert_enumerator(private_medsrv_creds_t *this,
|
||||
*/
|
||||
static void destroy(private_medsrv_creds_t *this)
|
||||
{
|
||||
free(this);
|
||||
free(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -101,7 +101,7 @@ static char* get_connection_type(char *uuid)
|
||||
if (found)
|
||||
{
|
||||
key = g_strdup_printf ("%s/%s/%s", found,
|
||||
NM_SETTING_VPN_SETTING_NAME, "method");
|
||||
NM_SETTING_VPN_SETTING_NAME, "method");
|
||||
method = gconf_client_get_string(client, key, NULL);
|
||||
g_free(found);
|
||||
g_free(key);
|
||||
|
||||
@@ -110,9 +110,9 @@ check_validity (StrongswanPluginUiWidget *self, GError **error)
|
||||
str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
|
||||
if (!str || !strlen (str)) {
|
||||
g_set_error (error,
|
||||
STRONGSWAN_PLUGIN_UI_ERROR,
|
||||
STRONGSWAN_PLUGIN_UI_ERROR_INVALID_PROPERTY,
|
||||
"address");
|
||||
STRONGSWAN_PLUGIN_UI_ERROR,
|
||||
STRONGSWAN_PLUGIN_UI_ERROR_INVALID_PROPERTY,
|
||||
"address");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@@ -275,8 +275,8 @@ get_widget (NMVpnPluginUiWidgetInterface *iface)
|
||||
|
||||
static gboolean
|
||||
update_connection (NMVpnPluginUiWidgetInterface *iface,
|
||||
NMConnection *connection,
|
||||
GError **error)
|
||||
NMConnection *connection,
|
||||
GError **error)
|
||||
{
|
||||
StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface);
|
||||
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
||||
@@ -358,7 +358,7 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
|
||||
|
||||
static gboolean
|
||||
save_secrets (NMVpnPluginUiWidgetInterface *iface,
|
||||
NMConnection *connection, GError **error)
|
||||
NMConnection *connection, GError **error)
|
||||
{
|
||||
/* no secrets to save */
|
||||
return TRUE;
|
||||
@@ -386,7 +386,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
|
||||
priv->xml = glade_xml_new (glade_file, "strongswan-vbox", GETTEXT_PACKAGE);
|
||||
if (priv->xml == NULL) {
|
||||
g_set_error (error, STRONGSWAN_PLUGIN_UI_ERROR, 0,
|
||||
"could not load required resources at %s", glade_file);
|
||||
"could not load required resources at %s", glade_file);
|
||||
g_free (glade_file);
|
||||
g_object_unref (object);
|
||||
return NULL;
|
||||
|
||||
@@ -254,7 +254,7 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
|
||||
if (!address || !*address)
|
||||
{
|
||||
g_set_error(err, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
|
||||
"Gateway address missing.");
|
||||
"Gateway address missing.");
|
||||
return FALSE;
|
||||
}
|
||||
str = nm_setting_vpn_get_data_item(vpn, "virtual");
|
||||
@@ -297,7 +297,7 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
|
||||
if (!cert)
|
||||
{
|
||||
g_set_error(err, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
|
||||
"Loading gateway certificate failed.");
|
||||
"Loading gateway certificate failed.");
|
||||
return FALSE;
|
||||
}
|
||||
x509 = (x509_t*)cert;
|
||||
@@ -476,7 +476,7 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
|
||||
charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager, ike_sa);
|
||||
|
||||
g_set_error(err, NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
|
||||
"Initiating failed.");
|
||||
"Initiating failed.");
|
||||
return FALSE;
|
||||
}
|
||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
|
||||
|
||||
@@ -508,8 +508,8 @@ static void request_query(xmlTextReaderPtr reader, xmlTextWriterPtr writer)
|
||||
{
|
||||
/* <query> */
|
||||
xmlTextWriterStartElement(writer, "query");
|
||||
while (xmlTextReaderRead(reader))
|
||||
{
|
||||
while (xmlTextReaderRead(reader))
|
||||
{
|
||||
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT)
|
||||
{
|
||||
if (streq(xmlTextReaderConstName(reader), "ikesalist"))
|
||||
@@ -535,8 +535,8 @@ static void request_control(xmlTextReaderPtr reader, xmlTextWriterPtr writer)
|
||||
{
|
||||
/* <control> */
|
||||
xmlTextWriterStartElement(writer, "control");
|
||||
while (xmlTextReaderRead(reader))
|
||||
{
|
||||
while (xmlTextReaderRead(reader))
|
||||
{
|
||||
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT)
|
||||
{
|
||||
if (streq(xmlTextReaderConstName(reader), "ikesaterminate"))
|
||||
@@ -649,8 +649,8 @@ static job_requeue_t process(int *fdp)
|
||||
}
|
||||
|
||||
/* read message type and id */
|
||||
while (xmlTextReaderRead(reader))
|
||||
{
|
||||
while (xmlTextReaderRead(reader))
|
||||
{
|
||||
if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT &&
|
||||
streq(xmlTextReaderConstName(reader), "message"))
|
||||
{
|
||||
@@ -658,20 +658,20 @@ static job_requeue_t process(int *fdp)
|
||||
type = xmlTextReaderGetAttribute(reader, "type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* process message */
|
||||
if (id && type)
|
||||
/* process message */
|
||||
if (id && type)
|
||||
{
|
||||
if (streq(type, "request"))
|
||||
{
|
||||
request(reader, id, fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* response(reader, id) */
|
||||
}
|
||||
}
|
||||
if (streq(type, "request"))
|
||||
{
|
||||
request(reader, id, fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* response(reader, id) */
|
||||
}
|
||||
}
|
||||
xmlFreeTextReader(reader);
|
||||
return JOB_REQUEUE_FAIR;;
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ struct sql_attribute_t {
|
||||
attribute_provider_t provider;
|
||||
|
||||
/**
|
||||
* Destroy a sql_attribute instance.
|
||||
*/
|
||||
void (*destroy)(sql_attribute_t *this);
|
||||
* Destroy a sql_attribute instance.
|
||||
*/
|
||||
void (*destroy)(sql_attribute_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,9 +67,9 @@ struct stroke_ca_t {
|
||||
void (*check_for_hash_and_url)(stroke_ca_t *this, certificate_t* cert);
|
||||
|
||||
/**
|
||||
* Destroy a stroke_ca instance.
|
||||
*/
|
||||
void (*destroy)(stroke_ca_t *this);
|
||||
* Destroy a stroke_ca instance.
|
||||
*/
|
||||
void (*destroy)(stroke_ca_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,9 +53,9 @@ struct stroke_config_t {
|
||||
void (*del)(stroke_config_t *this, stroke_msg_t *msg);
|
||||
|
||||
/**
|
||||
* Destroy a stroke_config instance.
|
||||
*/
|
||||
void (*destroy)(stroke_config_t *this);
|
||||
* Destroy a stroke_config instance.
|
||||
*/
|
||||
void (*destroy)(stroke_config_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,9 +29,9 @@ typedef struct stroke_socket_t stroke_socket_t;
|
||||
struct stroke_socket_t {
|
||||
|
||||
/**
|
||||
* Destroy a stroke_socket instance.
|
||||
*/
|
||||
void (*destroy)(stroke_socket_t *this);
|
||||
* Destroy a stroke_socket instance.
|
||||
*/
|
||||
void (*destroy)(stroke_socket_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,15 +49,13 @@ struct migrate_job_t {
|
||||
* @param reqid reqid of the CHILD_SA to acquire
|
||||
* @param src_ts source traffic selector to be used in the policy
|
||||
* @param dst_ts destination traffic selector to be used in the policy
|
||||
* @param dir direction of the policy (in|out)
|
||||
* @param local local host address to be used in the IKE_SA
|
||||
* @param remote remote host address to be used in the IKE_SA
|
||||
* @param dir direction of the policy (in|out)
|
||||
* @param local local host address to be used in the IKE_SA
|
||||
* @param remote remote host address to be used in the IKE_SA
|
||||
* @return migrate_job_t object
|
||||
*/
|
||||
migrate_job_t *migrate_job_create(u_int32_t reqid,
|
||||
traffic_selector_t *src_ts,
|
||||
traffic_selector_t *dst_ts,
|
||||
policy_dir_t dir,
|
||||
host_t *local, host_t *remote);
|
||||
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
|
||||
policy_dir_t dir, host_t *local, host_t *remote);
|
||||
|
||||
#endif /** MIGRATE_JOB_H_ @}*/
|
||||
|
||||
@@ -69,9 +69,9 @@ struct eap_manager_t {
|
||||
identification_t *peer);
|
||||
|
||||
/**
|
||||
* Destroy a eap_manager instance.
|
||||
*/
|
||||
void (*destroy)(eap_manager_t *this);
|
||||
* Destroy a eap_manager instance.
|
||||
*/
|
||||
void (*destroy)(eap_manager_t *this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -937,7 +937,7 @@ child_sa_t * child_sa_create(host_t *me, host_t* other,
|
||||
|
||||
/* MIPv6 proxy transport mode sets SA endpoints to TS hosts */
|
||||
if (config->get_mode(config) == MODE_TRANSPORT &&
|
||||
config->use_proxy_mode(config))
|
||||
config->use_proxy_mode(config))
|
||||
{
|
||||
ts_type_t type;
|
||||
int family;
|
||||
|
||||
@@ -98,19 +98,19 @@ struct endpoint_pair_t {
|
||||
u_int64_t priority;
|
||||
|
||||
/** local endpoint */
|
||||
host_t *local;
|
||||
host_t *local;
|
||||
|
||||
/** remote endpoint */
|
||||
host_t *remote;
|
||||
/** remote endpoint */
|
||||
host_t *remote;
|
||||
|
||||
/** state */
|
||||
check_state_t state;
|
||||
/** state */
|
||||
check_state_t state;
|
||||
|
||||
/** number of retransmissions */
|
||||
u_int32_t retransmitted;
|
||||
/** number of retransmissions */
|
||||
u_int32_t retransmitted;
|
||||
|
||||
/** the generated packet */
|
||||
packet_t *packet;
|
||||
/** the generated packet */
|
||||
packet_t *packet;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -119,8 +119,8 @@ struct endpoint_pair_t {
|
||||
static void endpoint_pair_destroy(endpoint_pair_t *this)
|
||||
{
|
||||
DESTROY_IF(this->local);
|
||||
DESTROY_IF(this->remote);
|
||||
DESTROY_IF(this->packet);
|
||||
DESTROY_IF(this->remote);
|
||||
DESTROY_IF(this->packet);
|
||||
free(this);
|
||||
}
|
||||
|
||||
@@ -183,16 +183,16 @@ struct check_list_t {
|
||||
/** connect id */
|
||||
chunk_t connect_id;
|
||||
|
||||
/** list of endpoint pairs */
|
||||
linked_list_t *pairs;
|
||||
/** list of endpoint pairs */
|
||||
linked_list_t *pairs;
|
||||
|
||||
/** pairs queued for triggered checks */
|
||||
linked_list_t *triggered;
|
||||
/** pairs queued for triggered checks */
|
||||
linked_list_t *triggered;
|
||||
|
||||
/** state */
|
||||
check_state_t state;
|
||||
/** state */
|
||||
check_state_t state;
|
||||
|
||||
/** TRUE if this is the initiator */
|
||||
/** TRUE if this is the initiator */
|
||||
bool is_initiator;
|
||||
|
||||
/** TRUE if the initiator is finishing the checks */
|
||||
@@ -242,13 +242,13 @@ static check_list_t *check_list_create(identification_t *initiator, identificati
|
||||
|
||||
this->responder.id = responder->clone(responder);
|
||||
this->responder.key = chunk_empty;
|
||||
this->responder.endpoints = NULL;
|
||||
this->responder.endpoints = NULL;
|
||||
|
||||
this->pairs = linked_list_create();
|
||||
this->triggered = linked_list_create();
|
||||
this->state = CHECK_NONE;
|
||||
this->is_initiator = is_initiator;
|
||||
this->is_finishing = FALSE;
|
||||
this->pairs = linked_list_create();
|
||||
this->triggered = linked_list_create();
|
||||
this->state = CHECK_NONE;
|
||||
this->is_initiator = is_initiator;
|
||||
this->is_finishing = FALSE;
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -319,8 +319,8 @@ struct check_t {
|
||||
/** raw endpoint payload (to verify the signature) */
|
||||
chunk_t endpoint_raw;
|
||||
|
||||
/** connect auth */
|
||||
chunk_t auth;
|
||||
/** connect auth */
|
||||
chunk_t auth;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,13 +28,13 @@ typedef struct peer_t peer_t;
|
||||
*/
|
||||
struct peer_t {
|
||||
/** id of the peer */
|
||||
identification_t *id;
|
||||
identification_t *id;
|
||||
|
||||
/** sa id of the peer, NULL if offline */
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
|
||||
/** list of peer ids that reuested this peer */
|
||||
linked_list_t *requested_by;
|
||||
/** list of peer ids that reuested this peer */
|
||||
linked_list_t *requested_by;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -43,8 +43,8 @@ struct peer_t {
|
||||
static void peer_destroy(peer_t *this)
|
||||
{
|
||||
DESTROY_IF(this->id);
|
||||
DESTROY_IF(this->ike_sa_id);
|
||||
this->requested_by->destroy_offset(this->requested_by, offsetof(identification_t, destroy));
|
||||
DESTROY_IF(this->ike_sa_id);
|
||||
this->requested_by->destroy_offset(this->requested_by, offsetof(identification_t, destroy));
|
||||
free(this);
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ static peer_t *peer_create(identification_t *id, ike_sa_id_t* ike_sa_id)
|
||||
|
||||
/* clone everything */
|
||||
this->id = id->clone(id);
|
||||
this->ike_sa_id = ike_sa_id ? ike_sa_id->clone(ike_sa_id) : NULL;
|
||||
this->requested_by = linked_list_create();
|
||||
this->ike_sa_id = ike_sa_id ? ike_sa_id->clone(ike_sa_id) : NULL;
|
||||
this->requested_by = linked_list_create();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user