merging renaming of mode_t to ipsec_mode_t back to trunk
This commit is contained in:
@@ -87,7 +87,7 @@ static status_t add_sa(private_kernel_interface_t *this, host_t *src, host_t *ds
|
||||
u_int64_t expire_soft, u_int64_t expire_hard,
|
||||
u_int16_t enc_alg, u_int16_t enc_size,
|
||||
u_int16_t int_alg, u_int16_t int_size,
|
||||
prf_plus_t *prf_plus, mode_t mode, u_int16_t ipcomp, bool encap,
|
||||
prf_plus_t *prf_plus, ipsec_mode_t mode, u_int16_t ipcomp, bool encap,
|
||||
bool update)
|
||||
{
|
||||
return this->ipsec->add_sa(this->ipsec, src, dst, spi, protocol, reqid,
|
||||
@@ -130,7 +130,7 @@ static status_t del_sa(private_kernel_interface_t *this, host_t *dst, u_int32_t
|
||||
static status_t add_policy(private_kernel_interface_t *this, host_t *src, host_t *dst,
|
||||
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
|
||||
policy_dir_t direction, protocol_id_t protocol,
|
||||
u_int32_t reqid, bool high_prio, mode_t mode,
|
||||
u_int32_t reqid, bool high_prio, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp)
|
||||
{
|
||||
return this->ipsec->add_policy(this->ipsec, src, dst, src_ts, dst_ts,
|
||||
@@ -321,11 +321,11 @@ kernel_interface_t *kernel_interface_create()
|
||||
|
||||
this->public.get_spi = (status_t(*)(kernel_interface_t*,host_t*,host_t*,protocol_id_t,u_int32_t,u_int32_t*))get_spi;
|
||||
this->public.get_cpi = (status_t(*)(kernel_interface_t*,host_t*,host_t*,u_int32_t,u_int16_t*))get_cpi;
|
||||
this->public.add_sa = (status_t(*)(kernel_interface_t *,host_t*,host_t*,u_int32_t,protocol_id_t,u_int32_t,u_int64_t,u_int64_t,u_int16_t,u_int16_t,u_int16_t,u_int16_t,prf_plus_t*,mode_t,u_int16_t,bool,bool))add_sa;
|
||||
this->public.add_sa = (status_t(*)(kernel_interface_t *,host_t*,host_t*,u_int32_t,protocol_id_t,u_int32_t,u_int64_t,u_int64_t,u_int16_t,u_int16_t,u_int16_t,u_int16_t,prf_plus_t*,ipsec_mode_t,u_int16_t,bool,bool))add_sa;
|
||||
this->public.update_sa = (status_t(*)(kernel_interface_t*,u_int32_t,protocol_id_t,host_t*,host_t*,host_t*,host_t*,bool))update_sa;
|
||||
this->public.query_sa = (status_t(*)(kernel_interface_t*,host_t*,u_int32_t,protocol_id_t,u_int32_t*))query_sa;
|
||||
this->public.del_sa = (status_t(*)(kernel_interface_t*,host_t*,u_int32_t,protocol_id_t))del_sa;
|
||||
this->public.add_policy = (status_t(*)(kernel_interface_t*,host_t*,host_t*,traffic_selector_t*,traffic_selector_t*,policy_dir_t,protocol_id_t,u_int32_t,bool,mode_t,u_int16_t))add_policy;
|
||||
this->public.add_policy = (status_t(*)(kernel_interface_t*,host_t*,host_t*,traffic_selector_t*,traffic_selector_t*,policy_dir_t,protocol_id_t,u_int32_t,bool,ipsec_mode_t,u_int16_t))add_policy;
|
||||
this->public.query_policy = (status_t(*)(kernel_interface_t*,traffic_selector_t*,traffic_selector_t*,policy_dir_t,u_int32_t*))query_policy;
|
||||
this->public.del_policy = (status_t(*)(kernel_interface_t*,traffic_selector_t*,traffic_selector_t*,policy_dir_t))del_policy;
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ struct kernel_interface_t {
|
||||
u_int64_t expire_soft, u_int64_t expire_hard,
|
||||
u_int16_t enc_alg, u_int16_t enc_size,
|
||||
u_int16_t int_alg, u_int16_t int_size,
|
||||
prf_plus_t *prf_plus, mode_t mode,
|
||||
prf_plus_t *prf_plus, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp, bool encap,
|
||||
bool update);
|
||||
|
||||
@@ -192,7 +192,7 @@ struct kernel_interface_t {
|
||||
traffic_selector_t *src_ts,
|
||||
traffic_selector_t *dst_ts,
|
||||
policy_dir_t direction, protocol_id_t protocol,
|
||||
u_int32_t reqid, bool high_prio, mode_t mode,
|
||||
u_int32_t reqid, bool high_prio, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp);
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Tobias Brunner
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "kernel_ipsec.h"
|
||||
|
||||
ENUM(ipsec_mode_names, MODE_TRANSPORT, MODE_BEET,
|
||||
"TRANSPORT",
|
||||
"TUNNEL",
|
||||
"2",
|
||||
"3",
|
||||
"BEET",
|
||||
);
|
||||
@@ -26,6 +26,7 @@
|
||||
#ifndef KERNEL_IPSEC_H_
|
||||
#define KERNEL_IPSEC_H_
|
||||
|
||||
typedef enum ipsec_mode_t ipsec_mode_t;
|
||||
typedef enum policy_dir_t policy_dir_t;
|
||||
typedef struct kernel_ipsec_t kernel_ipsec_t;
|
||||
|
||||
@@ -33,6 +34,25 @@ typedef struct kernel_ipsec_t kernel_ipsec_t;
|
||||
#include <crypto/prf_plus.h>
|
||||
#include <encoding/payloads/proposal_substructure.h>
|
||||
|
||||
/**
|
||||
* Mode of an CHILD_SA.
|
||||
*
|
||||
* These are equal to those defined in XFRM, so don't change.
|
||||
*/
|
||||
enum ipsec_mode_t {
|
||||
/** transport mode, no inner address */
|
||||
MODE_TRANSPORT = 0,
|
||||
/** tunnel mode, inner and outer addresses */
|
||||
MODE_TUNNEL = 1,
|
||||
/** BEET mode, tunnel mode but fixed, bound inner addresses */
|
||||
MODE_BEET = 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum names for ipsec_mode_t.
|
||||
*/
|
||||
extern enum_name_t *ipsec_mode_names;
|
||||
|
||||
/**
|
||||
* Direction of a policy. These are equal to those
|
||||
* defined in xfrm.h, but we want to stay implementation
|
||||
@@ -124,7 +144,7 @@ struct kernel_ipsec_t {
|
||||
u_int64_t expire_soft, u_int64_t expire_hard,
|
||||
u_int16_t enc_alg, u_int16_t enc_size,
|
||||
u_int16_t int_alg, u_int16_t int_size,
|
||||
prf_plus_t *prf_plus, mode_t mode,
|
||||
prf_plus_t *prf_plus, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp, bool encap,
|
||||
bool update);
|
||||
|
||||
@@ -199,7 +219,7 @@ struct kernel_ipsec_t {
|
||||
traffic_selector_t *src_ts,
|
||||
traffic_selector_t *dst_ts,
|
||||
policy_dir_t direction, protocol_id_t protocol,
|
||||
u_int32_t reqid, bool high_prio, mode_t mode,
|
||||
u_int32_t reqid, bool high_prio, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user