aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/kernel')
-rw-r--r--src/libcharon/kernel/kernel_handler.c10
-rw-r--r--src/libcharon/kernel/kernel_interface.c58
-rw-r--r--src/libcharon/kernel/kernel_interface.h52
-rw-r--r--src/libcharon/kernel/kernel_ipsec.h28
-rw-r--r--src/libcharon/kernel/kernel_listener.h8
-rw-r--r--src/libcharon/kernel/kernel_net.h4
6 files changed, 80 insertions, 80 deletions
diff --git a/src/libcharon/kernel/kernel_handler.c b/src/libcharon/kernel/kernel_handler.c
index be37d30e5..71121908b 100644
--- a/src/libcharon/kernel/kernel_handler.c
+++ b/src/libcharon/kernel/kernel_handler.c
@@ -39,7 +39,7 @@ struct private_kernel_handler_t {
/**
* convert an IP protocol identifier to the IKEv2 specific protocol identifier.
*/
-static inline protocol_id_t proto_ip2ike(u_int8_t protocol)
+static inline protocol_id_t proto_ip2ike(uint8_t protocol)
{
switch (protocol)
{
@@ -53,7 +53,7 @@ static inline protocol_id_t proto_ip2ike(u_int8_t protocol)
}
METHOD(kernel_listener_t, acquire, bool,
- private_kernel_handler_t *this, u_int32_t reqid,
+ private_kernel_handler_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
{
if (src_ts && dst_ts)
@@ -71,7 +71,7 @@ METHOD(kernel_listener_t, acquire, bool,
}
METHOD(kernel_listener_t, expire, bool,
- private_kernel_handler_t *this, u_int8_t protocol, u_int32_t spi,
+ private_kernel_handler_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, bool hard)
{
protocol_id_t proto = proto_ip2ike(protocol);
@@ -93,7 +93,7 @@ METHOD(kernel_listener_t, expire, bool,
}
METHOD(kernel_listener_t, mapping, bool,
- private_kernel_handler_t *this, u_int8_t protocol, u_int32_t spi,
+ private_kernel_handler_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, host_t *remote)
{
protocol_id_t proto = proto_ip2ike(protocol);
@@ -108,7 +108,7 @@ METHOD(kernel_listener_t, mapping, bool,
}
METHOD(kernel_listener_t, migrate, bool,
- private_kernel_handler_t *this, u_int32_t reqid,
+ private_kernel_handler_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
policy_dir_t direction, host_t *local, host_t *remote)
{
diff --git a/src/libcharon/kernel/kernel_interface.c b/src/libcharon/kernel/kernel_interface.c
index 40c4ee589..bc3f9079d 100644
--- a/src/libcharon/kernel/kernel_interface.c
+++ b/src/libcharon/kernel/kernel_interface.c
@@ -62,12 +62,12 @@ struct kernel_algorithm_t {
/**
* Identifier specified in IKE
*/
- u_int16_t ike;
+ uint16_t ike;
/**
* Identifier as defined in pfkeyv2.h
*/
- u_int16_t kernel;
+ uint16_t kernel;
/**
* Name of the algorithm in linux crypto API
@@ -166,7 +166,7 @@ METHOD(kernel_interface_t, get_features, kernel_feature_t,
METHOD(kernel_interface_t, get_spi, status_t,
private_kernel_interface_t *this, host_t *src, host_t *dst,
- u_int8_t protocol, u_int32_t *spi)
+ uint8_t protocol, uint32_t *spi)
{
if (!this->ipsec)
{
@@ -177,7 +177,7 @@ METHOD(kernel_interface_t, get_spi, status_t,
METHOD(kernel_interface_t, get_cpi, status_t,
private_kernel_interface_t *this, host_t *src, host_t *dst,
- u_int16_t *cpi)
+ uint16_t *cpi)
{
if (!this->ipsec)
{
@@ -191,7 +191,7 @@ METHOD(kernel_interface_t, get_cpi, status_t,
*/
typedef struct {
/** allocated reqid */
- u_int32_t reqid;
+ uint32_t reqid;
/** references to this entry */
u_int refs;
/** inbound mark used for SA */
@@ -327,9 +327,9 @@ static array_t *array_from_ts_list(linked_list_t *list)
METHOD(kernel_interface_t, alloc_reqid, status_t,
private_kernel_interface_t *this,
linked_list_t *local_ts, linked_list_t *remote_ts,
- mark_t mark_in, mark_t mark_out, u_int32_t *reqid)
+ mark_t mark_in, mark_t mark_out, uint32_t *reqid)
{
- static u_int32_t counter = 0;
+ static uint32_t counter = 0;
reqid_entry_t *entry = NULL, *tmpl;
status_t status = SUCCESS;
@@ -379,7 +379,7 @@ METHOD(kernel_interface_t, alloc_reqid, status_t,
}
METHOD(kernel_interface_t, release_reqid, status_t,
- private_kernel_interface_t *this, u_int32_t reqid,
+ private_kernel_interface_t *this, uint32_t reqid,
mark_t mark_in, mark_t mark_out)
{
reqid_entry_t *entry, tmpl = {
@@ -416,10 +416,10 @@ METHOD(kernel_interface_t, release_reqid, status_t,
METHOD(kernel_interface_t, add_sa, status_t,
private_kernel_interface_t *this, host_t *src, host_t *dst,
- u_int32_t spi, u_int8_t protocol, u_int32_t reqid, mark_t mark,
- u_int32_t tfc, lifetime_cfg_t *lifetime, u_int16_t enc_alg, chunk_t enc_key,
- u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
- u_int16_t ipcomp, u_int16_t cpi, u_int32_t replay_window,
+ uint32_t spi, uint8_t protocol, uint32_t reqid, mark_t mark,
+ uint32_t tfc, lifetime_cfg_t *lifetime, uint16_t enc_alg, chunk_t enc_key,
+ uint16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
+ uint16_t ipcomp, uint16_t cpi, uint32_t replay_window,
bool initiator, bool encap, bool esn, bool inbound, bool update,
linked_list_t *src_ts, linked_list_t *dst_ts)
{
@@ -434,8 +434,8 @@ METHOD(kernel_interface_t, add_sa, status_t,
}
METHOD(kernel_interface_t, update_sa, status_t,
- private_kernel_interface_t *this, u_int32_t spi, u_int8_t protocol,
- u_int16_t cpi, host_t *src, host_t *dst, host_t *new_src, host_t *new_dst,
+ private_kernel_interface_t *this, uint32_t spi, uint8_t protocol,
+ uint16_t cpi, host_t *src, host_t *dst, host_t *new_src, host_t *new_dst,
bool encap, bool new_encap, mark_t mark)
{
if (!this->ipsec)
@@ -448,8 +448,8 @@ METHOD(kernel_interface_t, update_sa, status_t,
METHOD(kernel_interface_t, query_sa, status_t,
private_kernel_interface_t *this, host_t *src, host_t *dst,
- u_int32_t spi, u_int8_t protocol, mark_t mark,
- u_int64_t *bytes, u_int64_t *packets, time_t *time)
+ uint32_t spi, uint8_t protocol, mark_t mark,
+ uint64_t *bytes, uint64_t *packets, time_t *time)
{
if (!this->ipsec)
{
@@ -460,8 +460,8 @@ METHOD(kernel_interface_t, query_sa, status_t,
}
METHOD(kernel_interface_t, del_sa, status_t,
- private_kernel_interface_t *this, host_t *src, host_t *dst, u_int32_t spi,
- u_int8_t protocol, u_int16_t cpi, mark_t mark)
+ private_kernel_interface_t *this, host_t *src, host_t *dst, uint32_t spi,
+ uint8_t protocol, uint16_t cpi, mark_t mark)
{
if (!this->ipsec)
{
@@ -594,7 +594,7 @@ METHOD(kernel_interface_t, del_ip, status_t,
METHOD(kernel_interface_t, add_route, status_t,
private_kernel_interface_t *this, chunk_t dst_net,
- u_int8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
+ uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
{
if (!this->net)
{
@@ -606,7 +606,7 @@ METHOD(kernel_interface_t, add_route, status_t,
METHOD(kernel_interface_t, del_route, status_t,
private_kernel_interface_t *this, chunk_t dst_net,
- u_int8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
+ uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
{
if (!this->net)
{
@@ -627,7 +627,7 @@ METHOD(kernel_interface_t, bypass_socket, bool,
}
METHOD(kernel_interface_t, enable_udp_decap, bool,
- private_kernel_interface_t *this, int fd, int family, u_int16_t port)
+ private_kernel_interface_t *this, int fd, int family, uint16_t port)
{
if (!this->ipsec)
{
@@ -803,7 +803,7 @@ METHOD(kernel_interface_t, remove_listener, void,
}
METHOD(kernel_interface_t, acquire, void,
- private_kernel_interface_t *this, u_int32_t reqid,
+ private_kernel_interface_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
{
kernel_listener_t *listener;
@@ -823,7 +823,7 @@ METHOD(kernel_interface_t, acquire, void,
}
METHOD(kernel_interface_t, expire, void,
- private_kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+ private_kernel_interface_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, bool hard)
{
kernel_listener_t *listener;
@@ -844,7 +844,7 @@ METHOD(kernel_interface_t, expire, void,
}
METHOD(kernel_interface_t, mapping, void,
- private_kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+ private_kernel_interface_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, host_t *remote)
{
kernel_listener_t *listener;
@@ -865,7 +865,7 @@ METHOD(kernel_interface_t, mapping, void,
}
METHOD(kernel_interface_t, migrate, void,
- private_kernel_interface_t *this, u_int32_t reqid,
+ private_kernel_interface_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
policy_dir_t direction, host_t *local, host_t *remote)
{
@@ -919,8 +919,8 @@ METHOD(kernel_interface_t, tun, void,
}
METHOD(kernel_interface_t, register_algorithm, void,
- private_kernel_interface_t *this, u_int16_t alg_id, transform_type_t type,
- u_int16_t kernel_id, char *kernel_name)
+ private_kernel_interface_t *this, uint16_t alg_id, transform_type_t type,
+ uint16_t kernel_id, char *kernel_name)
{
kernel_algorithm_t *algorithm;
@@ -937,8 +937,8 @@ METHOD(kernel_interface_t, register_algorithm, void,
}
METHOD(kernel_interface_t, lookup_algorithm, bool,
- private_kernel_interface_t *this, u_int16_t alg_id, transform_type_t type,
- u_int16_t *kernel_id, char **kernel_name)
+ private_kernel_interface_t *this, uint16_t alg_id, transform_type_t type,
+ uint16_t *kernel_id, char **kernel_name)
{
kernel_algorithm_t *algorithm;
enumerator_t *enumerator;
diff --git a/src/libcharon/kernel/kernel_interface.h b/src/libcharon/kernel/kernel_interface.h
index 6793c6cc6..ec6e140ba 100644
--- a/src/libcharon/kernel/kernel_interface.h
+++ b/src/libcharon/kernel/kernel_interface.h
@@ -108,7 +108,7 @@ struct kernel_interface_t {
* @return SUCCESS if operation completed
*/
status_t (*get_spi)(kernel_interface_t *this, host_t *src, host_t *dst,
- u_int8_t protocol, u_int32_t *spi);
+ uint8_t protocol, uint32_t *spi);
/**
* Get a Compression Parameter Index (CPI) from the kernel.
@@ -119,7 +119,7 @@ struct kernel_interface_t {
* @return SUCCESS if operation completed
*/
status_t (*get_cpi)(kernel_interface_t *this, host_t *src, host_t *dst,
- u_int16_t *cpi);
+ uint16_t *cpi);
/**
* Allocate or confirm a reqid to use for a given SA pair.
@@ -141,7 +141,7 @@ struct kernel_interface_t {
status_t (*alloc_reqid)(kernel_interface_t *this,
linked_list_t *local_ts, linked_list_t *remote_ts,
mark_t mark_in, mark_t mark_out,
- u_int32_t *reqid);
+ uint32_t *reqid);
/**
* Release a previously allocated reqid.
@@ -151,7 +151,7 @@ struct kernel_interface_t {
* @param mark_out outbound mark on SA
* @return SUCCESS if reqid released
*/
- status_t (*release_reqid)(kernel_interface_t *this, u_int32_t reqid,
+ status_t (*release_reqid)(kernel_interface_t *this, uint32_t reqid,
mark_t mark_in, mark_t mark_out);
/**
@@ -186,13 +186,13 @@ struct kernel_interface_t {
* @return SUCCESS if operation completed
*/
status_t (*add_sa) (kernel_interface_t *this,
- host_t *src, host_t *dst, u_int32_t spi,
- u_int8_t protocol, u_int32_t reqid, mark_t mark,
- u_int32_t tfc, lifetime_cfg_t *lifetime,
- u_int16_t enc_alg, chunk_t enc_key,
- u_int16_t int_alg, chunk_t int_key,
- ipsec_mode_t mode, u_int16_t ipcomp, u_int16_t cpi,
- u_int32_t replay_window, bool initiator, bool encap,
+ host_t *src, host_t *dst, uint32_t spi,
+ uint8_t protocol, uint32_t reqid, mark_t mark,
+ uint32_t tfc, lifetime_cfg_t *lifetime,
+ uint16_t enc_alg, chunk_t enc_key,
+ uint16_t int_alg, chunk_t int_key,
+ ipsec_mode_t mode, uint16_t ipcomp, uint16_t cpi,
+ uint32_t replay_window, bool initiator, bool encap,
bool esn, bool inbound, bool update,
linked_list_t *src_ts, linked_list_t *dst_ts);
@@ -218,7 +218,7 @@ struct kernel_interface_t {
* the kernel interface can't update the SA
*/
status_t (*update_sa)(kernel_interface_t *this,
- u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+ uint32_t spi, uint8_t protocol, uint16_t cpi,
host_t *src, host_t *dst,
host_t *new_src, host_t *new_dst,
bool encap, bool new_encap, mark_t mark);
@@ -237,8 +237,8 @@ struct kernel_interface_t {
* @return SUCCESS if operation completed
*/
status_t (*query_sa) (kernel_interface_t *this, host_t *src, host_t *dst,
- u_int32_t spi, u_int8_t protocol, mark_t mark,
- u_int64_t *bytes, u_int64_t *packets, time_t *time);
+ uint32_t spi, uint8_t protocol, mark_t mark,
+ uint64_t *bytes, uint64_t *packets, time_t *time);
/**
* Delete a previously installed SA from the SAD.
@@ -252,7 +252,7 @@ struct kernel_interface_t {
* @return SUCCESS if operation completed
*/
status_t (*del_sa) (kernel_interface_t *this, host_t *src, host_t *dst,
- u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+ uint32_t spi, uint8_t protocol, uint16_t cpi,
mark_t mark);
/**
@@ -426,7 +426,7 @@ struct kernel_interface_t {
* ALREADY_DONE if the route already exists
*/
status_t (*add_route) (kernel_interface_t *this, chunk_t dst_net,
- u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+ uint8_t prefixlen, host_t *gateway, host_t *src_ip,
char *if_name);
/**
@@ -440,7 +440,7 @@ struct kernel_interface_t {
* @return SUCCESS if operation completed
*/
status_t (*del_route) (kernel_interface_t *this, chunk_t dst_net,
- u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+ uint8_t prefixlen, host_t *gateway, host_t *src_ip,
char *if_name);
/**
@@ -461,7 +461,7 @@ struct kernel_interface_t {
* @return TRUE if UDP decapsulation was enabled successfully
*/
bool (*enable_udp_decap)(kernel_interface_t *this, int fd, int family,
- u_int16_t port);
+ uint16_t port);
/**
@@ -561,7 +561,7 @@ struct kernel_interface_t {
* @param src_ts source traffic selector
* @param dst_ts destination traffic selector
*/
- void (*acquire)(kernel_interface_t *this, u_int32_t reqid,
+ void (*acquire)(kernel_interface_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts);
/**
@@ -572,7 +572,7 @@ struct kernel_interface_t {
* @param dst destination address of expired SA
* @param hard TRUE if it is a hard expire, FALSE otherwise
*/
- void (*expire)(kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+ void (*expire)(kernel_interface_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, bool hard);
/**
@@ -583,7 +583,7 @@ struct kernel_interface_t {
* @param dst original destination address of SA
* @param remote new remote host
*/
- void (*mapping)(kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+ void (*mapping)(kernel_interface_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, host_t *remote);
/**
@@ -596,7 +596,7 @@ struct kernel_interface_t {
* @param local local host address to be used in the IKE_SA
* @param remote remote host address to be used in the IKE_SA
*/
- void (*migrate)(kernel_interface_t *this, u_int32_t reqid,
+ void (*migrate)(kernel_interface_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
policy_dir_t direction, host_t *local, host_t *remote);
@@ -623,8 +623,8 @@ struct kernel_interface_t {
* @param kernel_id the kernel id of the algorithm
* @param kernel_name the kernel name of the algorithm
*/
- void (*register_algorithm)(kernel_interface_t *this, u_int16_t alg_id,
- transform_type_t type, u_int16_t kernel_id,
+ void (*register_algorithm)(kernel_interface_t *this, uint16_t alg_id,
+ transform_type_t type, uint16_t kernel_id,
char *kernel_name);
/**
@@ -637,8 +637,8 @@ struct kernel_interface_t {
* @param kernel_name the kernel name of the algorithm (optional)
* @return TRUE if algorithm was found
*/
- bool (*lookup_algorithm)(kernel_interface_t *this, u_int16_t alg_id,
- transform_type_t type, u_int16_t *kernel_id,
+ bool (*lookup_algorithm)(kernel_interface_t *this, uint16_t alg_id,
+ transform_type_t type, uint16_t *kernel_id,
char **kernel_name);
/**
diff --git a/src/libcharon/kernel/kernel_ipsec.h b/src/libcharon/kernel/kernel_ipsec.h
index 31e06308e..fdb5fc761 100644
--- a/src/libcharon/kernel/kernel_ipsec.h
+++ b/src/libcharon/kernel/kernel_ipsec.h
@@ -62,7 +62,7 @@ struct kernel_ipsec_t {
* @return SUCCESS if operation completed
*/
status_t (*get_spi)(kernel_ipsec_t *this, host_t *src, host_t *dst,
- u_int8_t protocol, u_int32_t *spi);
+ uint8_t protocol, uint32_t *spi);
/**
* Get a Compression Parameter Index (CPI) from the kernel.
@@ -73,7 +73,7 @@ struct kernel_ipsec_t {
* @return SUCCESS if operation completed
*/
status_t (*get_cpi)(kernel_ipsec_t *this, host_t *src, host_t *dst,
- u_int16_t *cpi);
+ uint16_t *cpi);
/**
* Add an SA to the SAD.
@@ -107,13 +107,13 @@ struct kernel_ipsec_t {
* @return SUCCESS if operation completed
*/
status_t (*add_sa) (kernel_ipsec_t *this,
- host_t *src, host_t *dst, u_int32_t spi,
- u_int8_t protocol, u_int32_t reqid,
- mark_t mark, u_int32_t tfc, lifetime_cfg_t *lifetime,
- u_int16_t enc_alg, chunk_t enc_key,
- u_int16_t int_alg, chunk_t int_key,
- ipsec_mode_t mode, u_int16_t ipcomp, u_int16_t cpi,
- u_int32_t replay_window, bool initiator, bool encap,
+ host_t *src, host_t *dst, uint32_t spi,
+ uint8_t protocol, uint32_t reqid,
+ mark_t mark, uint32_t tfc, lifetime_cfg_t *lifetime,
+ uint16_t enc_alg, chunk_t enc_key,
+ uint16_t int_alg, chunk_t int_key,
+ ipsec_mode_t mode, uint16_t ipcomp, uint16_t cpi,
+ uint32_t replay_window, bool initiator, bool encap,
bool esn, bool inbound, bool update,
linked_list_t *src_ts, linked_list_t *dst_ts);
@@ -139,7 +139,7 @@ struct kernel_ipsec_t {
* the kernel interface can't update the SA
*/
status_t (*update_sa)(kernel_ipsec_t *this,
- u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+ uint32_t spi, uint8_t protocol, uint16_t cpi,
host_t *src, host_t *dst,
host_t *new_src, host_t *new_dst,
bool encap, bool new_encap, mark_t mark);
@@ -158,8 +158,8 @@ struct kernel_ipsec_t {
* @return SUCCESS if operation completed
*/
status_t (*query_sa) (kernel_ipsec_t *this, host_t *src, host_t *dst,
- u_int32_t spi, u_int8_t protocol, mark_t mark,
- u_int64_t *bytes, u_int64_t *packets, time_t *time);
+ uint32_t spi, uint8_t protocol, mark_t mark,
+ uint64_t *bytes, uint64_t *packets, time_t *time);
/**
* Delete a previusly installed SA from the SAD.
@@ -173,7 +173,7 @@ struct kernel_ipsec_t {
* @return SUCCESS if operation completed
*/
status_t (*del_sa) (kernel_ipsec_t *this, host_t *src, host_t *dst,
- u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+ uint32_t spi, uint8_t protocol, uint16_t cpi,
mark_t mark);
/**
@@ -272,7 +272,7 @@ struct kernel_ipsec_t {
* @return TRUE if UDP decapsulation was enabled successfully
*/
bool (*enable_udp_decap)(kernel_ipsec_t *this, int fd, int family,
- u_int16_t port);
+ uint16_t port);
/**
* Destroy the implementation.
diff --git a/src/libcharon/kernel/kernel_listener.h b/src/libcharon/kernel/kernel_listener.h
index 6426fae2a..aaeb4f5b7 100644
--- a/src/libcharon/kernel/kernel_listener.h
+++ b/src/libcharon/kernel/kernel_listener.h
@@ -43,7 +43,7 @@ struct kernel_listener_t {
* @param dst_ts destination traffic selector
* @return TRUE to remain registered, FALSE to unregister
*/
- bool (*acquire)(kernel_listener_t *this, u_int32_t reqid,
+ bool (*acquire)(kernel_listener_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts);
/**
@@ -55,7 +55,7 @@ struct kernel_listener_t {
* @param hard TRUE if it is a hard expire, FALSE otherwise
* @return TRUE to remain registered, FALSE to unregister
*/
- bool (*expire)(kernel_listener_t *this, u_int8_t protocol, u_int32_t spi,
+ bool (*expire)(kernel_listener_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, bool hard);
/**
@@ -67,7 +67,7 @@ struct kernel_listener_t {
* @param remote new remote host
* @return TRUE to remain registered, FALSE to unregister
*/
- bool (*mapping)(kernel_listener_t *this, u_int8_t protocol, u_int32_t spi,
+ bool (*mapping)(kernel_listener_t *this, uint8_t protocol, uint32_t spi,
host_t *dst, host_t *remote);
/**
@@ -81,7 +81,7 @@ struct kernel_listener_t {
* @param remote remote host address to be used in the IKE_SA
* @return TRUE to remain registered, FALSE to unregister
*/
- bool (*migrate)(kernel_listener_t *this, u_int32_t reqid,
+ bool (*migrate)(kernel_listener_t *this, uint32_t reqid,
traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
policy_dir_t direction, host_t *local, host_t *remote);
diff --git a/src/libcharon/kernel/kernel_net.h b/src/libcharon/kernel/kernel_net.h
index 7fc644a7e..4f3063deb 100644
--- a/src/libcharon/kernel/kernel_net.h
+++ b/src/libcharon/kernel/kernel_net.h
@@ -156,7 +156,7 @@ struct kernel_net_t {
* ALREADY_DONE if the route already exists
*/
status_t (*add_route) (kernel_net_t *this, chunk_t dst_net,
- u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+ uint8_t prefixlen, host_t *gateway, host_t *src_ip,
char *if_name);
/**
@@ -170,7 +170,7 @@ struct kernel_net_t {
* @return SUCCESS if operation completed
*/
status_t (*del_route) (kernel_net_t *this, chunk_t dst_net,
- u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+ uint8_t prefixlen, host_t *gateway, host_t *src_ip,
char *if_name);
/**