diff options
Diffstat (limited to 'src/frontends')
11 files changed, 50 insertions, 50 deletions
diff --git a/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_dns_proxy.c b/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_dns_proxy.c index 7d71da208..20d33fbcb 100644 --- a/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_dns_proxy.c +++ b/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_dns_proxy.c @@ -95,7 +95,7 @@ static void socket_destroy(proxy_socket_t *this) */ static u_int socket_hash(host_t *src) { - u_int16_t port = src->get_port(src); + uint16_t port = src->get_port(src); return chunk_hash_inc(src->get_address(src), chunk_hash(chunk_from_thing(port))); } @@ -222,14 +222,14 @@ CALLBACK(handle_timeout, job_requeue_t, * DNS header and masks to access flags */ typedef struct __attribute__((packed)) { - u_int16_t id; - u_int16_t flags; + uint16_t id; + uint16_t flags; #define DNS_QR_MASK 0x8000 #define DNS_OPCODE_MASK 0x7800 - u_int16_t qdcount; - u_int16_t ancount; - u_int16_t nscount; - u_int16_t arcount; + uint16_t qdcount; + uint16_t ancount; + uint16_t nscount; + uint16_t arcount; } dns_header_t; /** @@ -242,7 +242,7 @@ typedef struct __attribute__((packed)) { static char *extract_hostname(chunk_t data) { char *hostname, *pos, *end; - u_int8_t label; + uint8_t label; if (!data.len || data.len > 255) { diff --git a/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_service.c b/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_service.c index 7ef3913f7..eb3758d2e 100644 --- a/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_service.c +++ b/src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_service.c @@ -208,7 +208,7 @@ static job_requeue_t handle_plain(private_android_service_t *this) * Add a route to the TUN device builder */ static bool add_route(vpnservice_builder_t *builder, host_t *net, - u_int8_t prefix) + uint8_t prefix) { /* if route is 0.0.0.0/0, split it into two routes 0.0.0.0/1 and * 128.0.0.0/1 because otherwise it would conflict with the current default @@ -246,7 +246,7 @@ static bool add_routes(vpnservice_builder_t *builder, child_sa_t *child_sa) while (success && enumerator->enumerate(enumerator, &src_ts, &dst_ts)) { host_t *net; - u_int8_t prefix; + uint8_t prefix; dst_ts->to_subnet(dst_ts, &net, &prefix); success = add_route(builder, net, prefix); @@ -399,7 +399,7 @@ static void close_tun_device(private_android_service_t *this) * Terminate the IKE_SA with the given unique ID */ CALLBACK(terminate, job_requeue_t, - u_int32_t *id) + uint32_t *id) { charon->controller->terminate_ike(charon->controller, *id, controller_cb_empty, NULL, 0); @@ -410,7 +410,7 @@ CALLBACK(terminate, job_requeue_t, * Reestablish the IKE_SA with the given unique ID */ CALLBACK(reestablish, job_requeue_t, - u_int32_t *id) + uint32_t *id) { ike_sa_t *ike_sa; @@ -498,7 +498,7 @@ METHOD(listener_t, alert, bool, break; case ALERT_KEEP_ON_CHILD_SA_FAILURE: { - u_int32_t *id = malloc_thing(u_int32_t); + uint32_t *id = malloc_thing(uint32_t); /* because close_ike_on_child_failure is set this is only * triggered when CHILD_SA rekeying failed. reestablish it in @@ -514,7 +514,7 @@ METHOD(listener_t, alert, bool, this->lock->read_lock(this->lock); if (this->tunfd < 0) { - u_int32_t *id = malloc_thing(u_int32_t); + uint32_t *id = malloc_thing(uint32_t); /* always fail if we are not able to initiate the IKE_SA * initially */ @@ -531,14 +531,14 @@ METHOD(listener_t, alert, bool, else { peer_cfg_t *peer_cfg; - u_int32_t tries, try; + uint32_t tries, try; /* when reestablishing and if keyingtries is not %forever * the IKE_SA is destroyed after the set number of tries, * so notify the GUI */ peer_cfg = ike_sa->get_peer_cfg(ike_sa); tries = peer_cfg->get_keyingtries(peer_cfg); - try = va_arg(args, u_int32_t); + try = va_arg(args, uint32_t); if (tries != 0 && try == tries-1) { charonservice->update_status(charonservice, diff --git a/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android.c b/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android.c index 6432b957f..c45162dd2 100644 --- a/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android.c +++ b/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android.c @@ -404,8 +404,8 @@ static void handle_tcg_attribute(imc_android_state_t *state, tcg_pts_attr_req_file_meas_t *attr_cast; pts_file_meas_t *measurements; pts_error_code_t pts_error; - u_int32_t delim; - u_int16_t req_id; + uint32_t delim; + uint16_t req_id; bool is_dir; char *path; diff --git a/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android_state.c b/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android_state.c index ea4f92def..b32277f8f 100644 --- a/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android_state.c +++ b/src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android_state.c @@ -60,7 +60,7 @@ struct private_imc_android_state_t { /** * Maximum PA-TNC message size for this TNCCS connection */ - u_int32_t max_msg_len; + uint32_t max_msg_len; /** * PA-TNC attribute segmentation contracts associated with TNCCS connection @@ -99,12 +99,12 @@ METHOD(imc_state_t, set_flags, void, } METHOD(imc_state_t, set_max_msg_len, void, - private_imc_android_state_t *this, u_int32_t max_msg_len) + private_imc_android_state_t *this, uint32_t max_msg_len) { this->max_msg_len = max_msg_len; } -METHOD(imc_state_t, get_max_msg_len, u_int32_t, +METHOD(imc_state_t, get_max_msg_len, uint32_t, private_imc_android_state_t *this) { return this->max_msg_len; diff --git a/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_ipsec.c b/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_ipsec.c index a740303b6..33b545aad 100644 --- a/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_ipsec.c +++ b/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_ipsec.c @@ -40,31 +40,31 @@ struct private_kernel_android_ipsec_t { /** * Callback registrered with libipsec. */ -static void expire(u_int8_t protocol, u_int32_t spi, host_t *dst, bool hard) +static void expire(uint8_t protocol, uint32_t spi, host_t *dst, bool hard) { charon->kernel->expire(charon->kernel, protocol, spi, dst, hard); } METHOD(kernel_ipsec_t, get_spi, status_t, private_kernel_android_ipsec_t *this, host_t *src, host_t *dst, - u_int8_t protocol, u_int32_t *spi) + uint8_t protocol, uint32_t *spi) { return ipsec->sas->get_spi(ipsec->sas, src, dst, protocol, spi); } METHOD(kernel_ipsec_t, get_cpi, status_t, private_kernel_android_ipsec_t *this, host_t *src, host_t *dst, - u_int16_t *cpi) + uint16_t *cpi) { return NOT_SUPPORTED; } METHOD(kernel_ipsec_t, add_sa, status_t, private_kernel_android_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, + 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) { @@ -75,8 +75,8 @@ METHOD(kernel_ipsec_t, add_sa, status_t, } METHOD(kernel_ipsec_t, update_sa, status_t, - private_kernel_android_ipsec_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_android_ipsec_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) { return ipsec->sas->update_sa(ipsec->sas, spi, protocol, cpi, src, dst, @@ -85,8 +85,8 @@ METHOD(kernel_ipsec_t, update_sa, status_t, METHOD(kernel_ipsec_t, query_sa, status_t, private_kernel_android_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) { return ipsec->sas->query_sa(ipsec->sas, src, dst, spi, protocol, mark, bytes, packets, time); @@ -94,7 +94,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t, METHOD(kernel_ipsec_t, del_sa, status_t, private_kernel_android_ipsec_t *this, host_t *src, host_t *dst, - u_int32_t spi, u_int8_t protocol, u_int16_t cpi, mark_t mark) + uint32_t spi, uint8_t protocol, uint16_t cpi, mark_t mark) { return ipsec->sas->del_sa(ipsec->sas, src, dst, spi, protocol, cpi, mark); } @@ -149,7 +149,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool, } METHOD(kernel_ipsec_t, enable_udp_decap, bool, - private_kernel_android_ipsec_t *this, int fd, int family, u_int16_t port) + private_kernel_android_ipsec_t *this, int fd, int family, uint16_t port) { return NOT_SUPPORTED; } diff --git a/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_net.c b/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_net.c index acc4b75e9..3edb5caa5 100644 --- a/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_net.c +++ b/src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_net.c @@ -246,14 +246,14 @@ METHOD(kernel_net_t, del_ip, status_t, } METHOD(kernel_net_t, add_route, status_t, - private_android_net_t *this, chunk_t dst_net, u_int8_t prefixlen, + private_android_net_t *this, chunk_t dst_net, uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name) { return NOT_SUPPORTED; } METHOD(kernel_net_t, del_route, status_t, - private_android_net_t *this, chunk_t dst_net, u_int8_t prefixlen, + private_android_net_t *this, chunk_t dst_net, uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name) { return NOT_SUPPORTED; diff --git a/src/frontends/osx/charon-xpc/xpc_channels.c b/src/frontends/osx/charon-xpc/xpc_channels.c index 5e9366bf5..6724841d9 100644 --- a/src/frontends/osx/charon-xpc/xpc_channels.c +++ b/src/frontends/osx/charon-xpc/xpc_channels.c @@ -78,12 +78,12 @@ static void destroy_entry(entry_t *entry) /** * Find an IKE_SA unique identifier by a given XPC channel */ -static u_int32_t find_ike_sa_by_conn(private_xpc_channels_t *this, +static uint32_t find_ike_sa_by_conn(private_xpc_channels_t *this, xpc_connection_t conn) { enumerator_t *enumerator; entry_t *entry; - u_int32_t ike_sa = 0; + uint32_t ike_sa = 0; this->lock->read_lock(this->lock); enumerator = this->channels->create_enumerator(this->channels); @@ -126,7 +126,7 @@ static void remove_conn(private_xpc_channels_t *this, xpc_connection_t conn) /** * Trigger termination of a connection */ -static void stop_connection(private_xpc_channels_t *this, u_int32_t ike_sa, +static void stop_connection(private_xpc_channels_t *this, uint32_t ike_sa, xpc_object_t request, xpc_object_t reply) { status_t status; @@ -141,7 +141,7 @@ static void stop_connection(private_xpc_channels_t *this, u_int32_t ike_sa, */ static struct { char *name; - void (*handler)(private_xpc_channels_t *this, u_int32_t ike_sa, + void (*handler)(private_xpc_channels_t *this, uint32_t ike_sa, xpc_object_t request, xpc_object_t reply); } commands[] = { { "stop_connection", stop_connection }, @@ -156,7 +156,7 @@ static void handle(private_xpc_channels_t *this, xpc_connection_t conn, xpc_object_t reply; const char *type, *rpc; bool found = FALSE; - u_int32_t ike_sa; + uint32_t ike_sa; int i; type = xpc_dictionary_get_string(request, "type"); @@ -201,7 +201,7 @@ static void handle(private_xpc_channels_t *this, xpc_connection_t conn, } METHOD(xpc_channels_t, add, void, - private_xpc_channels_t *this, xpc_connection_t conn, u_int32_t ike_sa) + private_xpc_channels_t *this, xpc_connection_t conn, uint32_t ike_sa) { entry_t *entry; @@ -466,7 +466,7 @@ static shared_key_t* password_cb(private_xpc_channels_t *this, shared_key_t *shared = NULL; ike_sa_t *ike_sa; entry_t *entry; - u_int32_t sa; + uint32_t sa; switch (type) { diff --git a/src/frontends/osx/charon-xpc/xpc_channels.h b/src/frontends/osx/charon-xpc/xpc_channels.h index 99e4d77e6..d9516a330 100644 --- a/src/frontends/osx/charon-xpc/xpc_channels.h +++ b/src/frontends/osx/charon-xpc/xpc_channels.h @@ -45,7 +45,7 @@ struct xpc_channels_t { * @param conn XPC connection to channel * @param ike_sa IKE_SA unique identifier to associate to connection */ - void (*add)(xpc_channels_t *this, xpc_connection_t conn, u_int32_t ike_sa); + void (*add)(xpc_channels_t *this, xpc_connection_t conn, uint32_t ike_sa); /** * Destroy a xpc_channels_t. diff --git a/src/frontends/osx/charon-xpc/xpc_dispatch.c b/src/frontends/osx/charon-xpc/xpc_dispatch.c index 4b4c67cc4..2e84b0e7a 100644 --- a/src/frontends/osx/charon-xpc/xpc_dispatch.c +++ b/src/frontends/osx/charon-xpc/xpc_dispatch.c @@ -77,7 +77,7 @@ static peer_cfg_t* create_peer_cfg(char *name, char *host) { ike_cfg_t *ike_cfg; peer_cfg_t *peer_cfg; - u_int16_t local_port, remote_port = IKEV2_UDP_PORT; + uint16_t local_port, remote_port = IKEV2_UDP_PORT; local_port = charon->socket->get_port(charon->socket, FALSE); if (local_port != IKEV2_UDP_PORT) @@ -154,7 +154,7 @@ static child_cfg_t* create_child_cfg(char *name) /** * Controller initiate callback */ -static bool initiate_cb(u_int32_t *sa, debug_t group, level_t level, +static bool initiate_cb(uint32_t *sa, debug_t group, level_t level, ike_sa_t *ike_sa, const char *message) { if (ike_sa) @@ -177,7 +177,7 @@ void start_connection(private_xpc_dispatch_t *this, bool success = FALSE; xpc_endpoint_t endpoint; xpc_connection_t channel; - u_int32_t ike_sa; + uint32_t ike_sa; name = (char*)xpc_dictionary_get_string(request, "name"); host = (char*)xpc_dictionary_get_string(request, "host"); diff --git a/src/frontends/osx/charon-xpc/xpc_logger.c b/src/frontends/osx/charon-xpc/xpc_logger.c index 38c34e460..d5e64568f 100644 --- a/src/frontends/osx/charon-xpc/xpc_logger.c +++ b/src/frontends/osx/charon-xpc/xpc_logger.c @@ -35,7 +35,7 @@ struct private_xpc_logger_t { /** * IKE_SA we log for */ - u_int32_t ike_sa; + uint32_t ike_sa; }; METHOD(logger_t, log_, void, @@ -62,7 +62,7 @@ METHOD(logger_t, get_level, level_t, } METHOD(xpc_logger_t, set_ike_sa, void, - private_xpc_logger_t *this, u_int32_t ike_sa) + private_xpc_logger_t *this, uint32_t ike_sa) { this->ike_sa = ike_sa; } diff --git a/src/frontends/osx/charon-xpc/xpc_logger.h b/src/frontends/osx/charon-xpc/xpc_logger.h index fd5ad37a2..0d2b58148 100644 --- a/src/frontends/osx/charon-xpc/xpc_logger.h +++ b/src/frontends/osx/charon-xpc/xpc_logger.h @@ -42,7 +42,7 @@ struct xpc_logger_t { * * @param ike_sa IKE_SA unique identifier */ - void (*set_ike_sa)(xpc_logger_t *this, u_int32_t ike_sa); + void (*set_ike_sa)(xpc_logger_t *this, uint32_t ike_sa); /** * Destroy a xpc_logger_t. |