Use standard unsigned integer types
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 22 Mar 2016 12:22:01 +0000 (13:22 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 24 Mar 2016 17:52:48 +0000 (18:52 +0100)
584 files changed:
scripts/timeattack.c
src/charon-cmd/cmd/cmd_connection.c
src/charon-nm/nm/nm_service.c
src/charon-tkm/src/tkm/tkm_diffie_hellman.c
src/charon-tkm/src/tkm/tkm_kernel_ipsec.c
src/charon-tkm/src/tkm/tkm_kernel_sad.c
src/charon-tkm/src/tkm/tkm_kernel_sad.h
src/charon-tkm/src/tkm/tkm_keymat.c
src/charon-tkm/src/tkm/tkm_nonceg.c
src/charon-tkm/src/tkm/tkm_spi_generator.c
src/charon-tkm/tests/nonceg_tests.c
src/checksum/checksum_builder.c
src/conftest/actions.c
src/conftest/config.c
src/conftest/hooks/custom_proposal.c
src/conftest/hooks/log_proposals.c
src/conftest/hooks/rebuild_auth.c
src/conftest/hooks/reset_seq.c
src/conftest/hooks/set_ike_spi.c
src/conftest/hooks/set_length.c
src/conftest/hooks/set_proposal_number.c
src/conftest/hooks/set_reserved.c
src/dumm/mconsole.c
src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_dns_proxy.c
src/frontends/android/app/src/main/jni/libandroidbridge/backend/android_service.c
src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android.c
src/frontends/android/app/src/main/jni/libandroidbridge/byod/imc_android_state.c
src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_ipsec.c
src/frontends/android/app/src/main/jni/libandroidbridge/kernel/android_net.c
src/frontends/osx/charon-xpc/xpc_channels.c
src/frontends/osx/charon-xpc/xpc_channels.h
src/frontends/osx/charon-xpc/xpc_dispatch.c
src/frontends/osx/charon-xpc/xpc_logger.c
src/frontends/osx/charon-xpc/xpc_logger.h
src/include/linux/pfkeyv2.h
src/libcharon/attributes/mem_pool.c
src/libcharon/bus/bus.c
src/libcharon/bus/bus.h
src/libcharon/bus/listeners/listener.h
src/libcharon/config/child_cfg.c
src/libcharon/config/child_cfg.h
src/libcharon/config/ike_cfg.c
src/libcharon/config/ike_cfg.h
src/libcharon/config/peer_cfg.c
src/libcharon/config/peer_cfg.h
src/libcharon/config/proposal.c
src/libcharon/config/proposal.h
src/libcharon/control/controller.c
src/libcharon/control/controller.h
src/libcharon/encoding/generator.c
src/libcharon/encoding/generator.h
src/libcharon/encoding/message.c
src/libcharon/encoding/message.h
src/libcharon/encoding/parser.c
src/libcharon/encoding/parser.h
src/libcharon/encoding/payloads/auth_payload.c
src/libcharon/encoding/payloads/cert_payload.c
src/libcharon/encoding/payloads/certreq_payload.c
src/libcharon/encoding/payloads/configuration_attribute.c
src/libcharon/encoding/payloads/configuration_attribute.h
src/libcharon/encoding/payloads/cp_payload.c
src/libcharon/encoding/payloads/cp_payload.h
src/libcharon/encoding/payloads/delete_payload.c
src/libcharon/encoding/payloads/delete_payload.h
src/libcharon/encoding/payloads/eap_payload.c
src/libcharon/encoding/payloads/eap_payload.h
src/libcharon/encoding/payloads/encodings.h
src/libcharon/encoding/payloads/encrypted_fragment_payload.h
src/libcharon/encoding/payloads/encrypted_payload.c
src/libcharon/encoding/payloads/encrypted_payload.h
src/libcharon/encoding/payloads/endpoint_notify.c
src/libcharon/encoding/payloads/endpoint_notify.h
src/libcharon/encoding/payloads/fragment_payload.c
src/libcharon/encoding/payloads/fragment_payload.h
src/libcharon/encoding/payloads/hash_payload.c
src/libcharon/encoding/payloads/id_payload.c
src/libcharon/encoding/payloads/ike_header.c
src/libcharon/encoding/payloads/ike_header.h
src/libcharon/encoding/payloads/ke_payload.c
src/libcharon/encoding/payloads/nonce_payload.c
src/libcharon/encoding/payloads/notify_payload.c
src/libcharon/encoding/payloads/notify_payload.h
src/libcharon/encoding/payloads/payload.c
src/libcharon/encoding/payloads/payload.h
src/libcharon/encoding/payloads/proposal_substructure.c
src/libcharon/encoding/payloads/proposal_substructure.h
src/libcharon/encoding/payloads/sa_payload.c
src/libcharon/encoding/payloads/sa_payload.h
src/libcharon/encoding/payloads/traffic_selector_substructure.c
src/libcharon/encoding/payloads/traffic_selector_substructure.h
src/libcharon/encoding/payloads/transform_attribute.c
src/libcharon/encoding/payloads/transform_attribute.h
src/libcharon/encoding/payloads/transform_substructure.c
src/libcharon/encoding/payloads/transform_substructure.h
src/libcharon/encoding/payloads/ts_payload.c
src/libcharon/encoding/payloads/unknown_payload.c
src/libcharon/encoding/payloads/vendor_id_payload.c
src/libcharon/kernel/kernel_handler.c
src/libcharon/kernel/kernel_interface.c
src/libcharon/kernel/kernel_interface.h
src/libcharon/kernel/kernel_ipsec.h
src/libcharon/kernel/kernel_listener.h
src/libcharon/kernel/kernel_net.h
src/libcharon/network/receiver.c
src/libcharon/network/socket.h
src/libcharon/network/socket_manager.c
src/libcharon/network/socket_manager.h
src/libcharon/plugins/attr/attr_provider.c
src/libcharon/plugins/connmark/connmark_listener.c
src/libcharon/plugins/dhcp/dhcp_socket.c
src/libcharon/plugins/dhcp/dhcp_transaction.c
src/libcharon/plugins/dhcp/dhcp_transaction.h
src/libcharon/plugins/dnscert/dnscert.c
src/libcharon/plugins/dnscert/dnscert.h
src/libcharon/plugins/duplicheck/duplicheck.c
src/libcharon/plugins/duplicheck/duplicheck_msg.h
src/libcharon/plugins/duplicheck/duplicheck_notify.c
src/libcharon/plugins/eap_aka/eap_aka_peer.c
src/libcharon/plugins/eap_aka/eap_aka_server.c
src/libcharon/plugins/eap_aka_3gpp2/eap_aka_3gpp2_functions.c
src/libcharon/plugins/eap_dynamic/eap_dynamic.c
src/libcharon/plugins/eap_gtc/eap_gtc.c
src/libcharon/plugins/eap_identity/eap_identity.c
src/libcharon/plugins/eap_md5/eap_md5.c
src/libcharon/plugins/eap_mschapv2/eap_mschapv2.c
src/libcharon/plugins/eap_peap/eap_peap.c
src/libcharon/plugins/eap_peap/eap_peap_avp.c
src/libcharon/plugins/eap_peap/eap_peap_avp.h
src/libcharon/plugins/eap_peap/eap_peap_peer.c
src/libcharon/plugins/eap_peap/eap_peap_server.c
src/libcharon/plugins/eap_radius/eap_radius.c
src/libcharon/plugins/eap_radius/eap_radius_accounting.c
src/libcharon/plugins/eap_radius/eap_radius_accounting.h
src/libcharon/plugins/eap_radius/eap_radius_dae.c
src/libcharon/plugins/eap_radius/eap_radius_forward.c
src/libcharon/plugins/eap_radius/eap_radius_provider.c
src/libcharon/plugins/eap_radius/eap_radius_provider.h
src/libcharon/plugins/eap_sim/eap_sim_peer.c
src/libcharon/plugins/eap_sim/eap_sim_server.c
src/libcharon/plugins/eap_simaka_reauth/eap_simaka_reauth_card.c
src/libcharon/plugins/eap_simaka_reauth/eap_simaka_reauth_provider.c
src/libcharon/plugins/eap_tls/eap_tls.c
src/libcharon/plugins/eap_ttls/eap_ttls.c
src/libcharon/plugins/eap_ttls/eap_ttls_avp.c
src/libcharon/plugins/eap_ttls/eap_ttls_peer.c
src/libcharon/plugins/farp/farp_listener.c
src/libcharon/plugins/farp/farp_spoofer.c
src/libcharon/plugins/forecast/forecast_forwarder.c
src/libcharon/plugins/forecast/forecast_listener.c
src/libcharon/plugins/ha/ha_attribute.c
src/libcharon/plugins/ha/ha_cache.c
src/libcharon/plugins/ha/ha_child.c
src/libcharon/plugins/ha/ha_dispatcher.c
src/libcharon/plugins/ha/ha_ike.c
src/libcharon/plugins/ha/ha_kernel.c
src/libcharon/plugins/ha/ha_kernel.h
src/libcharon/plugins/ha/ha_message.c
src/libcharon/plugins/ha/ha_message.h
src/libcharon/plugins/ha/ha_segments.h
src/libcharon/plugins/ha/ha_tunnel.c
src/libcharon/plugins/ipseckey/ipseckey.c
src/libcharon/plugins/ipseckey/ipseckey.h
src/libcharon/plugins/ipseckey/ipseckey_cred.c
src/libcharon/plugins/kernel_iph/kernel_iph_net.c
src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
src/libcharon/plugins/kernel_pfroute/kernel_pfroute_net.c
src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
src/libcharon/plugins/load_tester/load_tester_config.c
src/libcharon/plugins/load_tester/load_tester_creds.c
src/libcharon/plugins/load_tester/load_tester_ipsec.c
src/libcharon/plugins/smp/smp.c
src/libcharon/plugins/socket_default/socket_default_socket.c
src/libcharon/plugins/socket_dynamic/socket_dynamic_socket.c
src/libcharon/plugins/socket_win/socket_win_socket.c
src/libcharon/plugins/sql/sql_logger.c
src/libcharon/plugins/stroke/stroke_config.c
src/libcharon/plugins/stroke/stroke_control.c
src/libcharon/plugins/stroke/stroke_counter.c
src/libcharon/plugins/stroke/stroke_list.c
src/libcharon/plugins/stroke/stroke_socket.c
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.c
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_renew_session_job.c
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_renew_session_job.h
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c
src/libcharon/plugins/tnc_pdp/tnc_pdp.c
src/libcharon/plugins/unity/unity_provider.c
src/libcharon/plugins/updown/updown_listener.c
src/libcharon/plugins/vici/libvici.c
src/libcharon/plugins/vici/suites/test_socket.c
src/libcharon/plugins/vici/vici_attribute.c
src/libcharon/plugins/vici/vici_config.c
src/libcharon/plugins/vici/vici_control.c
src/libcharon/plugins/vici/vici_dispatcher.c
src/libcharon/plugins/vici/vici_message.c
src/libcharon/plugins/vici/vici_query.c
src/libcharon/plugins/vici/vici_socket.c
src/libcharon/plugins/xauth_eap/xauth_eap.c
src/libcharon/processing/jobs/acquire_job.c
src/libcharon/processing/jobs/acquire_job.h
src/libcharon/processing/jobs/adopt_children_job.c
src/libcharon/processing/jobs/delete_child_sa_job.c
src/libcharon/processing/jobs/delete_child_sa_job.h
src/libcharon/processing/jobs/inactivity_job.c
src/libcharon/processing/jobs/inactivity_job.h
src/libcharon/processing/jobs/migrate_job.c
src/libcharon/processing/jobs/migrate_job.h
src/libcharon/processing/jobs/rekey_child_sa_job.c
src/libcharon/processing/jobs/rekey_child_sa_job.h
src/libcharon/processing/jobs/rekey_ike_sa_job.c
src/libcharon/processing/jobs/retransmit_job.c
src/libcharon/processing/jobs/retransmit_job.h
src/libcharon/processing/jobs/update_sa_job.c
src/libcharon/processing/jobs/update_sa_job.h
src/libcharon/sa/child_sa.c
src/libcharon/sa/child_sa.h
src/libcharon/sa/child_sa_manager.c
src/libcharon/sa/child_sa_manager.h
src/libcharon/sa/eap/eap_manager.c
src/libcharon/sa/eap/eap_manager.h
src/libcharon/sa/eap/eap_method.h
src/libcharon/sa/ike_sa.c
src/libcharon/sa/ike_sa.h
src/libcharon/sa/ike_sa_id.c
src/libcharon/sa/ike_sa_id.h
src/libcharon/sa/ike_sa_manager.c
src/libcharon/sa/ike_sa_manager.h
src/libcharon/sa/ikev1/keymat_v1.c
src/libcharon/sa/ikev1/keymat_v1.h
src/libcharon/sa/ikev1/task_manager_v1.c
src/libcharon/sa/ikev1/tasks/aggressive_mode.c
src/libcharon/sa/ikev1/tasks/isakmp_delete.c
src/libcharon/sa/ikev1/tasks/isakmp_dpd.c
src/libcharon/sa/ikev1/tasks/isakmp_dpd.h
src/libcharon/sa/ikev1/tasks/isakmp_natd.c
src/libcharon/sa/ikev1/tasks/isakmp_vendor.c
src/libcharon/sa/ikev1/tasks/main_mode.c
src/libcharon/sa/ikev1/tasks/mode_config.c
src/libcharon/sa/ikev1/tasks/quick_delete.c
src/libcharon/sa/ikev1/tasks/quick_delete.h
src/libcharon/sa/ikev1/tasks/quick_mode.c
src/libcharon/sa/ikev1/tasks/quick_mode.h
src/libcharon/sa/ikev1/tasks/xauth.c
src/libcharon/sa/ikev2/authenticators/eap_authenticator.c
src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c
src/libcharon/sa/ikev2/connect_manager.c
src/libcharon/sa/ikev2/keymat_v2.c
src/libcharon/sa/ikev2/task_manager_v2.c
src/libcharon/sa/ikev2/tasks/child_create.c
src/libcharon/sa/ikev2/tasks/child_create.h
src/libcharon/sa/ikev2/tasks/child_delete.c
src/libcharon/sa/ikev2/tasks/child_delete.h
src/libcharon/sa/ikev2/tasks/child_rekey.c
src/libcharon/sa/ikev2/tasks/child_rekey.h
src/libcharon/sa/ikev2/tasks/ike_auth.c
src/libcharon/sa/ikev2/tasks/ike_auth_lifetime.c
src/libcharon/sa/ikev2/tasks/ike_init.c
src/libcharon/sa/ikev2/tasks/ike_me.c
src/libcharon/sa/ikev2/tasks/ike_mobike.c
src/libcharon/sa/ikev2/tasks/ike_natd.c
src/libcharon/sa/ikev2/tasks/ike_rekey.c
src/libcharon/sa/redirect_manager.c
src/libcharon/sa/task_manager.h
src/libcharon/sa/trap_manager.c
src/libcharon/sa/trap_manager.h
src/libcharon/tests/suites/test_message_chapoly.c
src/libimcv/generic/generic_attr_bool.c
src/libimcv/generic/generic_attr_chunk.c
src/libimcv/generic/generic_attr_string.c
src/libimcv/ietf/ietf_attr.c
src/libimcv/ietf/ietf_attr.h
src/libimcv/ietf/ietf_attr_assess_result.c
src/libimcv/ietf/ietf_attr_assess_result.h
src/libimcv/ietf/ietf_attr_attr_request.c
src/libimcv/ietf/ietf_attr_attr_request.h
src/libimcv/ietf/ietf_attr_fwd_enabled.c
src/libimcv/ietf/ietf_attr_installed_packages.c
src/libimcv/ietf/ietf_attr_numeric_version.c
src/libimcv/ietf/ietf_attr_numeric_version.h
src/libimcv/ietf/ietf_attr_op_status.c
src/libimcv/ietf/ietf_attr_op_status.h
src/libimcv/ietf/ietf_attr_port_filter.c
src/libimcv/ietf/ietf_attr_port_filter.h
src/libimcv/ietf/ietf_attr_product_info.c
src/libimcv/ietf/ietf_attr_product_info.h
src/libimcv/ietf/ietf_attr_remediation_instr.c
src/libimcv/ietf/ietf_attr_string_version.c
src/libimcv/imc/imc_agent.c
src/libimcv/imc/imc_agent.h
src/libimcv/imc/imc_os_info.c
src/libimcv/imc/imc_os_info.h
src/libimcv/imc/imc_state.h
src/libimcv/imv/imv_database.h
src/libimcv/ita/ita_attr.c
src/libimcv/ita/ita_attr.h
src/libimcv/ita/ita_attr_angel.c
src/libimcv/ita/ita_attr_command.c
src/libimcv/ita/ita_attr_dummy.c
src/libimcv/ita/ita_attr_get_settings.c
src/libimcv/ita/ita_attr_settings.c
src/libimcv/pa_tnc/pa_tnc_attr_manager.h
src/libimcv/plugins/imc_attestation/imc_attestation_process.c
src/libimcv/plugins/imc_attestation/imc_attestation_state.c
src/libimcv/plugins/imc_attestation/imc_attestation_state.h
src/libimcv/plugins/imc_hcd/imc_hcd_state.c
src/libimcv/plugins/imc_os/imc_os.c
src/libimcv/plugins/imc_os/imc_os_state.c
src/libimcv/plugins/imc_scanner/imc_scanner.c
src/libimcv/plugins/imc_scanner/imc_scanner_state.c
src/libimcv/plugins/imc_swid/imc_swid_state.c
src/libimcv/plugins/imc_swid/imc_swid_state.h
src/libimcv/plugins/imc_test/imc_test_state.c
src/libimcv/plugins/imv_attestation/attest_db.c
src/libimcv/plugins/imv_scanner/imv_scanner_agent.c
src/libimcv/pts/components/ita/ita_comp_ima.h
src/libimcv/pts/components/ita/ita_comp_tboot.c
src/libimcv/pts/components/ita/ita_comp_tboot.h
src/libimcv/pts/components/ita/ita_comp_tgrub.c
src/libimcv/pts/components/ita/ita_comp_tgrub.h
src/libimcv/pts/components/pts_comp_evidence.c
src/libimcv/pts/components/pts_comp_evidence.h
src/libimcv/pts/components/pts_comp_func_name.c
src/libimcv/pts/components/pts_comp_func_name.h
src/libimcv/pts/components/pts_component.h
src/libimcv/pts/components/pts_component_manager.c
src/libimcv/pts/components/pts_component_manager.h
src/libimcv/pts/pts.c
src/libimcv/pts/pts.h
src/libimcv/pts/pts_file_meas.c
src/libimcv/pts/pts_file_meas.h
src/libimcv/pts/pts_file_meta.h
src/libimcv/pts/pts_pcr.c
src/libimcv/pts/pts_pcr.h
src/libimcv/pwg/pwg_attr.c
src/libimcv/pwg/pwg_attr.h
src/libimcv/pwg/pwg_attr_vendor_smi_code.c
src/libimcv/swid/swid_error.c
src/libimcv/swid/swid_error.h
src/libimcv/tcg/pts/tcg_pts_attr_aik.c
src/libimcv/tcg/pts/tcg_pts_attr_dh_nonce_finish.c
src/libimcv/tcg/pts/tcg_pts_attr_dh_nonce_finish.h
src/libimcv/tcg/pts/tcg_pts_attr_dh_nonce_params_req.c
src/libimcv/tcg/pts/tcg_pts_attr_dh_nonce_params_req.h
src/libimcv/tcg/pts/tcg_pts_attr_dh_nonce_params_resp.c
src/libimcv/tcg/pts/tcg_pts_attr_file_meas.c
src/libimcv/tcg/pts/tcg_pts_attr_gen_attest_evid.c
src/libimcv/tcg/pts/tcg_pts_attr_get_aik.c
src/libimcv/tcg/pts/tcg_pts_attr_get_tpm_version_info.c
src/libimcv/tcg/pts/tcg_pts_attr_meas_algo.c
src/libimcv/tcg/pts/tcg_pts_attr_proto_caps.c
src/libimcv/tcg/pts/tcg_pts_attr_req_file_meas.c
src/libimcv/tcg/pts/tcg_pts_attr_req_file_meas.h
src/libimcv/tcg/pts/tcg_pts_attr_req_file_meta.c
src/libimcv/tcg/pts/tcg_pts_attr_req_file_meta.h
src/libimcv/tcg/pts/tcg_pts_attr_req_func_comp_evid.c
src/libimcv/tcg/pts/tcg_pts_attr_req_func_comp_evid.h
src/libimcv/tcg/pts/tcg_pts_attr_simple_comp_evid.c
src/libimcv/tcg/pts/tcg_pts_attr_simple_evid_final.c
src/libimcv/tcg/pts/tcg_pts_attr_simple_evid_final.h
src/libimcv/tcg/pts/tcg_pts_attr_tpm_version_info.c
src/libimcv/tcg/pts/tcg_pts_attr_unix_file_meta.c
src/libimcv/tcg/seg/tcg_seg_attr_max_size.c
src/libimcv/tcg/seg/tcg_seg_attr_next_seg.c
src/libimcv/tcg/seg/tcg_seg_attr_seg_env.c
src/libimcv/tcg/swid/tcg_swid_attr_req.c
src/libimcv/tcg/swid/tcg_swid_attr_req.h
src/libimcv/tcg/tcg_attr.c
src/libimcv/tcg/tcg_attr.h
src/libipsec/esp_context.c
src/libipsec/esp_context.h
src/libipsec/esp_packet.c
src/libipsec/esp_packet.h
src/libipsec/ip_packet.c
src/libipsec/ip_packet.h
src/libipsec/ipsec_event_listener.h
src/libipsec/ipsec_event_relay.c
src/libipsec/ipsec_event_relay.h
src/libipsec/ipsec_policy.c
src/libipsec/ipsec_policy.h
src/libipsec/ipsec_policy_mgr.c
src/libipsec/ipsec_policy_mgr.h
src/libipsec/ipsec_processor.c
src/libipsec/ipsec_sa.c
src/libipsec/ipsec_sa.h
src/libipsec/ipsec_sa_mgr.c
src/libipsec/ipsec_sa_mgr.h
src/libipsec/tests/suites/test_chapoly.c
src/libpttls/pt_tls.c
src/libpttls/pt_tls.h
src/libpttls/pt_tls_client.c
src/libpttls/pt_tls_server.c
src/libradius/radius_config.c
src/libradius/radius_config.h
src/libradius/radius_message.c
src/libradius/radius_message.h
src/libradius/radius_mppe.h
src/libradius/radius_socket.c
src/libradius/radius_socket.h
src/libsimaka/simaka_card.h
src/libsimaka/simaka_manager.c
src/libsimaka/simaka_manager.h
src/libsimaka/simaka_message.c
src/libsimaka/simaka_message.h
src/libsimaka/simaka_provider.h
src/libstrongswan/asn1/asn1.c
src/libstrongswan/asn1/asn1.h
src/libstrongswan/bio/bio_reader.c
src/libstrongswan/bio/bio_reader.h
src/libstrongswan/bio/bio_writer.c
src/libstrongswan/bio/bio_writer.h
src/libstrongswan/collections/array.c
src/libstrongswan/collections/array.h
src/libstrongswan/credentials/auth_cfg.h
src/libstrongswan/credentials/containers/pkcs12.c
src/libstrongswan/credentials/containers/pkcs12.h
src/libstrongswan/crypto/hashers/hasher.h
src/libstrongswan/crypto/iv/iv_gen.h
src/libstrongswan/crypto/iv/iv_gen_null.c
src/libstrongswan/crypto/iv/iv_gen_rand.c
src/libstrongswan/crypto/iv/iv_gen_seq.c
src/libstrongswan/crypto/mac.h
src/libstrongswan/crypto/mgf1/mgf1.c
src/libstrongswan/crypto/nonce_gen.h
src/libstrongswan/crypto/pkcs5.c
src/libstrongswan/crypto/prf_plus.c
src/libstrongswan/crypto/prf_plus.h
src/libstrongswan/crypto/prfs/mac_prf.c
src/libstrongswan/crypto/prfs/prf.h
src/libstrongswan/crypto/proposal/proposal_keywords.c
src/libstrongswan/crypto/proposal/proposal_keywords.h
src/libstrongswan/crypto/rngs/rng.c
src/libstrongswan/crypto/rngs/rng.h
src/libstrongswan/crypto/signers/mac_signer.c
src/libstrongswan/crypto/signers/signer.h
src/libstrongswan/eap/eap.h
src/libstrongswan/ipsec/ipsec_types.h
src/libstrongswan/networking/host.c
src/libstrongswan/networking/host.h
src/libstrongswan/networking/packet.c
src/libstrongswan/networking/packet.h
src/libstrongswan/networking/tun_device.c
src/libstrongswan/networking/tun_device.h
src/libstrongswan/pen/pen.h
src/libstrongswan/plugins/aes/aes_crypter.c
src/libstrongswan/plugins/aesni/aesni_ccm.c
src/libstrongswan/plugins/aesni/aesni_cmac.c
src/libstrongswan/plugins/aesni/aesni_ctr.c
src/libstrongswan/plugins/aesni/aesni_gcm.c
src/libstrongswan/plugins/aesni/aesni_xcbc.c
src/libstrongswan/plugins/af_alg/af_alg_hasher.c
src/libstrongswan/plugins/af_alg/af_alg_ops.c
src/libstrongswan/plugins/af_alg/af_alg_ops.h
src/libstrongswan/plugins/af_alg/af_alg_prf.c
src/libstrongswan/plugins/af_alg/af_alg_signer.c
src/libstrongswan/plugins/agent/agent_private_key.c
src/libstrongswan/plugins/blowfish/blowfish.h
src/libstrongswan/plugins/blowfish/blowfish_crypter.c
src/libstrongswan/plugins/ccm/ccm_aead.c
src/libstrongswan/plugins/chapoly/chapoly_aead.c
src/libstrongswan/plugins/chapoly/chapoly_drv_portable.c
src/libstrongswan/plugins/chapoly/chapoly_drv_ssse3.c
src/libstrongswan/plugins/cmac/cmac.c
src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c
src/libstrongswan/plugins/des/des_crypter.c
src/libstrongswan/plugins/dnskey/dnskey_builder.c
src/libstrongswan/plugins/fips_prf/fips_prf.c
src/libstrongswan/plugins/gcm/gcm_aead.c
src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
src/libstrongswan/plugins/gcrypt/gcrypt_hasher.c
src/libstrongswan/plugins/gcrypt/gcrypt_rng.c
src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c
src/libstrongswan/plugins/hmac/hmac.c
src/libstrongswan/plugins/md4/md4_hasher.c
src/libstrongswan/plugins/md5/md5_hasher.c
src/libstrongswan/plugins/nonce/nonce_nonceg.c
src/libstrongswan/plugins/ntru/ntru_drbg.c
src/libstrongswan/plugins/ntru/ntru_drbg.h
src/libstrongswan/plugins/ntru/ntru_ke.c
src/libstrongswan/plugins/openssl/openssl_crypter.c
src/libstrongswan/plugins/openssl/openssl_hasher.c
src/libstrongswan/plugins/openssl/openssl_hmac.c
src/libstrongswan/plugins/openssl/openssl_rng.c
src/libstrongswan/plugins/openssl/openssl_sha1_prf.c
src/libstrongswan/plugins/padlock/padlock_rng.c
src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c
src/libstrongswan/plugins/pem/pem_builder.c
src/libstrongswan/plugins/pgp/pgp_builder.c
src/libstrongswan/plugins/pgp/pgp_cert.c
src/libstrongswan/plugins/pgp/pgp_utils.c
src/libstrongswan/plugins/pgp/pgp_utils.h
src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c
src/libstrongswan/plugins/pkcs11/pkcs11_rng.c
src/libstrongswan/plugins/pkcs12/pkcs12_decode.c
src/libstrongswan/plugins/plugin_feature.c
src/libstrongswan/plugins/plugin_feature.h
src/libstrongswan/plugins/random/random_rng.c
src/libstrongswan/plugins/rc2/rc2_crypter.c
src/libstrongswan/plugins/rdrand/rdrand_rng.c
src/libstrongswan/plugins/sha1/sha1_hasher.c
src/libstrongswan/plugins/sha1/sha1_prf.c
src/libstrongswan/plugins/sha2/sha2_hasher.c
src/libstrongswan/plugins/winhttp/winhttp_fetcher.c
src/libstrongswan/plugins/xcbc/xcbc.c
src/libstrongswan/processing/jobs/job.h
src/libstrongswan/processing/scheduler.c
src/libstrongswan/processing/scheduler.h
src/libstrongswan/selectors/traffic_selector.c
src/libstrongswan/selectors/traffic_selector.h
src/libstrongswan/settings/settings.c
src/libstrongswan/settings/settings.h
src/libstrongswan/tests/suites/test_array.c
src/libstrongswan/tests/suites/test_asn1.c
src/libstrongswan/tests/suites/test_bio_reader.c
src/libstrongswan/tests/suites/test_chunk.c
src/libstrongswan/tests/suites/test_host.c
src/libstrongswan/tests/suites/test_iv_gen.c
src/libstrongswan/tests/suites/test_ntru.c
src/libstrongswan/tests/suites/test_printf.c
src/libstrongswan/tests/suites/test_traffic_selector.c
src/libstrongswan/tests/suites/test_utils.c
src/libstrongswan/tests/utils/test_rng.c
src/libstrongswan/utils/chunk.c
src/libstrongswan/utils/chunk.h
src/libstrongswan/utils/cpu_feature.c
src/libstrongswan/utils/integrity_checker.c
src/libstrongswan/utils/integrity_checker.h
src/libstrongswan/utils/leak_detective.c
src/libstrongswan/utils/utils.c
src/libstrongswan/utils/utils/align.c
src/libstrongswan/utils/utils/align.h
src/libstrongswan/utils/utils/byteorder.h
src/libstrongswan/utils/utils/memory.c
src/libstrongswan/utils/utils/memory.h
src/libstrongswan/utils/utils/time.c
src/libstrongswan/utils/utils/types.h
src/libtls/tests/suites/test_socket.c
src/libtls/tls.c
src/libtls/tls_aead.c
src/libtls/tls_aead.h
src/libtls/tls_aead_expl.c
src/libtls/tls_aead_impl.c
src/libtls/tls_aead_null.c
src/libtls/tls_crypto.c
src/libtls/tls_fragmentation.c
src/libtls/tls_peer.c
src/libtls/tls_protection.c
src/libtls/tls_server.c
src/libtnccs/plugins/tnc_tnccs/tnc_tnccs_manager.c
src/libtnccs/plugins/tnccs_11/tnccs_11.c
src/libtnccs/plugins/tnccs_20/batch/pb_tnc_batch.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_access_recommendation_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_access_recommendation_msg.h
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_assessment_result_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_assessment_result_msg.h
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.h
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_experimental_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_language_preference_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.h
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_reason_string_msg.c
src/libtnccs/plugins/tnccs_20/messages/ietf/pb_remediation_parameters_msg.c
src/libtnccs/plugins/tnccs_20/messages/ita/pb_mutual_capability_msg.c
src/libtnccs/plugins/tnccs_20/messages/ita/pb_noskip_test_msg.c
src/libtnccs/plugins/tnccs_20/messages/pb_tnc_msg.h
src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.c
src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.h
src/libtnccs/plugins/tnccs_20/tnccs_20.c
src/libtnccs/plugins/tnccs_20/tnccs_20_client.c
src/libtnccs/plugins/tnccs_20/tnccs_20_client.h
src/libtnccs/plugins/tnccs_20/tnccs_20_server.c
src/libtnccs/plugins/tnccs_dynamic/tnccs_dynamic.c
src/libtnccs/tnc/tnccs/tnccs.h
src/libtnccs/tnc/tnccs/tnccs_manager.h
src/libtncif/tncif_identity.c
src/manager/controller/control_controller.c
src/manager/gateway.c
src/manager/gateway.h
src/pt-tls-client/pt-tls-client.c
src/starter/confread.c
src/starter/confread.h
src/stroke/stroke_msg.h

index ef00e8c..e3505dd 100644 (file)
@@ -10,7 +10,7 @@ static void start_timing(struct timespec *start)
        clock_gettime(CLOCK_PROCESS_CPUTIME_ID, start);
 }
 
-static u_int64_t end_timing(struct timespec *start)
+static uint64_t end_timing(struct timespec *start)
 {
        struct timespec end;
 
@@ -21,12 +21,12 @@ static u_int64_t end_timing(struct timespec *start)
 
 static int intcmp(const void *a, const void *b)
 {
-       return *(u_int64_t*)a - *(u_int64_t*)b;
+       return *(uint64_t*)a - *(uint64_t*)b;
 }
 
-static u_int64_t median(u_int64_t *m, int count)
+static uint64_t median(uint64_t *m, int count)
 {
-       qsort(m, count, sizeof(u_int64_t), intcmp);
+       qsort(m, count, sizeof(uint64_t), intcmp);
        return m[count / 2];
 }
 
@@ -35,7 +35,7 @@ static bool timeattack(attackfn_t attackfn, void *subj, size_t dlen,
 {
        struct timespec start;
        u_char test[dlen];
-       u_int64_t mini, maxi, t[256], m[256][10];
+       uint64_t mini, maxi, t[256], m[256][10];
        float fastdist = 0, slowdist = 0;
        int i, j, k, l, byte, limit, retry = 0;
        int fastest = 0, slowest = 0;
index 0c6a504..23e2b09 100644 (file)
@@ -142,7 +142,7 @@ static peer_cfg_t* create_peer_cfg(private_cmd_connection_t *this)
 {
        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;
        ike_version_t version = IKE_ANY;
        bool aggressive = FALSE;
        proposal_t *proposal;
index fc7e899..4cbf8d0 100644 (file)
@@ -68,7 +68,7 @@ static GValue* handler_to_val(nm_handler_t *handler,
        array = g_array_new (FALSE, TRUE, sizeof (guint32));
        while (enumerator->enumerate(enumerator, &chunk))
        {
-               g_array_append_val (array, *(u_int32_t*)chunk.ptr);
+               g_array_append_val (array, *(uint32_t*)chunk.ptr);
        }
        enumerator->destroy(enumerator);
        val = g_slice_new0 (GValue);
@@ -113,7 +113,7 @@ static void signal_ipv4_config(NMVPNPlugin *plugin,
        enumerator->destroy(enumerator);
        val = g_slice_new0(GValue);
        g_value_init(val, G_TYPE_UINT);
-       g_value_set_uint(val, *(u_int32_t*)me->get_address(me).ptr);
+       g_value_set_uint(val, *(uint32_t*)me->get_address(me).ptr);
        g_hash_table_insert(config, NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS, val);
 
        val = g_slice_new0(GValue);
index c4953b6..5f2cbfe 100644 (file)
@@ -123,7 +123,7 @@ int register_dh_mapping()
        int count, i;
        char *iana_id_str, *tkm_id_str;
        diffie_hellman_group_t *iana_id;
-       u_int64_t *tkm_id;
+       uint64_t *tkm_id;
        hashtable_t *map;
        enumerator_t *enumerator;
 
@@ -138,7 +138,7 @@ int register_dh_mapping()
        {
                iana_id = malloc_thing(diffie_hellman_group_t);
                *iana_id = settings_value_as_int(iana_id_str, 0);
-               tkm_id = malloc_thing(u_int64_t);
+               tkm_id = malloc_thing(uint64_t);
                *tkm_id = settings_value_as_int(tkm_id_str, 0);
 
                map->put(map, iana_id, tkm_id);
@@ -227,7 +227,7 @@ tkm_diffie_hellman_t *tkm_diffie_hellman_create(diffie_hellman_group_t group)
                return NULL;
        }
 
-       u_int64_t *dha_id = group_map->get(group_map, &group);
+       uint64_t *dha_id = group_map->get(group_map, &group);
        if (!dha_id)
        {
                free(this);
index 2d22fbd..ba2e164 100644 (file)
@@ -54,7 +54,7 @@ struct private_tkm_kernel_ipsec_t {
 
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_tkm_kernel_ipsec_t *this, host_t *src, host_t *dst,
-       u_int8_t protocol, u_int32_t *spi)
+       uint8_t protocol, uint32_t *spi)
 {
        bool result;
 
@@ -68,24 +68,24 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
                }
        }
 
-       result = this->rng->get_bytes(this->rng, sizeof(u_int32_t),
-                                                                 (u_int8_t *)spi);
+       result = this->rng->get_bytes(this->rng, sizeof(uint32_t),
+                                                                 (uint8_t *)spi);
        return result ? SUCCESS : FAILED;
 }
 
 METHOD(kernel_ipsec_t, get_cpi, status_t,
        private_tkm_kernel_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_tkm_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,
+       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)
 {
@@ -209,15 +209,15 @@ sad_failure:
 
 METHOD(kernel_ipsec_t, query_sa, status_t,
        private_tkm_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)
 {
        return NOT_SUPPORTED;
 }
 
 METHOD(kernel_ipsec_t, del_sa, status_t,
        private_tkm_kernel_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)
 {
        esa_id_type esa_id, other_esa_id;
 
@@ -249,8 +249,8 @@ METHOD(kernel_ipsec_t, del_sa, status_t,
 }
 
 METHOD(kernel_ipsec_t, update_sa, status_t,
-       private_tkm_kernel_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_tkm_kernel_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 old_encap, bool new_encap, mark_t mark)
 {
        return NOT_SUPPORTED;
@@ -338,7 +338,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
 }
 
 METHOD(kernel_ipsec_t, enable_udp_decap, bool,
-       private_tkm_kernel_ipsec_t *this, int fd, int family, u_int16_t port)
+       private_tkm_kernel_ipsec_t *this, int fd, int family, uint16_t port)
 {
        int type = UDP_ENCAP_ESPINUDP;
 
index 2556f6b..22d2aac 100644 (file)
@@ -59,7 +59,7 @@ struct sad_entry_t {
        /**
         * Reqid.
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * Source address of CHILD SA.
@@ -74,17 +74,17 @@ struct sad_entry_t {
        /**
         * Local SPI of CHILD SA.
         */
-       u_int32_t spi_loc;
+       uint32_t spi_loc;
 
        /**
         * Remote SPI of CHILD SA.
         */
-       u_int32_t spi_rem;
+       uint32_t spi_rem;
 
        /**
         * Protocol of CHILD SA (ESP/AH).
         */
-       u_int8_t proto;
+       uint8_t proto;
 
 };
 
@@ -105,8 +105,8 @@ static void sad_entry_destroy(sad_entry_t *entry)
  * Find a list entry with given src, dst, (remote) spi and proto values.
  */
 static bool sad_entry_match(sad_entry_t * const entry, const host_t * const src,
-                                                       const host_t * const dst, const u_int32_t * const spi,
-                                                       const u_int8_t * const proto)
+                                                       const host_t * const dst, const uint32_t * const spi,
+                                                       const uint8_t * const proto)
 {
        if (entry->src == NULL || entry->dst == NULL)
        {
@@ -122,9 +122,9 @@ static bool sad_entry_match(sad_entry_t * const entry, const host_t * const src,
  * Find a list entry with given reqid, spi and proto values.
  */
 static bool sad_entry_match_dst(sad_entry_t * const entry,
-                                                               const u_int32_t * const reqid,
-                                                               const u_int32_t * const spi,
-                                                               const u_int8_t * const proto)
+                                                               const uint32_t * const reqid,
+                                                               const uint32_t * const spi,
+                                                               const uint8_t * const proto)
 {
        return entry->reqid   == *reqid &&
                   entry->spi_rem == *spi   &&
@@ -145,7 +145,7 @@ static bool sad_entry_match_esa_id(sad_entry_t * const entry,
  */
 static bool sad_entry_match_other_esa(sad_entry_t * const entry,
                                                                          const esa_id_type * const esa_id,
-                                                                         const u_int32_t * const reqid)
+                                                                         const uint32_t * const reqid)
 {
        return entry->reqid  == *reqid &&
                   entry->esa_id != *esa_id;
@@ -172,8 +172,8 @@ static bool sad_entry_equal(sad_entry_t * const left, sad_entry_t * const right)
 
 METHOD(tkm_kernel_sad_t, insert, bool,
        private_tkm_kernel_sad_t * const this, const esa_id_type esa_id,
-       const u_int32_t reqid, const host_t * const src, const host_t * const dst,
-       const u_int32_t spi_loc, const u_int32_t spi_rem, const u_int8_t proto)
+       const uint32_t reqid, const host_t * const src, const host_t * const dst,
+       const uint32_t spi_loc, const uint32_t spi_rem, const uint8_t proto)
 {
        status_t result;
        sad_entry_t *new_entry;
@@ -212,7 +212,7 @@ METHOD(tkm_kernel_sad_t, insert, bool,
 
 METHOD(tkm_kernel_sad_t, get_esa_id, esa_id_type,
        private_tkm_kernel_sad_t * const this, const host_t * const src,
-       const host_t * const dst, const u_int32_t spi, const u_int8_t proto)
+       const host_t * const dst, const uint32_t spi, const uint8_t proto)
 {
        esa_id_type id = 0;
        sad_entry_t *entry = NULL;
@@ -242,7 +242,7 @@ METHOD(tkm_kernel_sad_t, get_other_esa_id, esa_id_type,
 {
        esa_id_type id = 0;
        sad_entry_t *entry = NULL;
-       u_int32_t reqid;
+       uint32_t reqid;
        status_t res;
 
        this->mutex->lock(this->mutex);
@@ -274,8 +274,8 @@ METHOD(tkm_kernel_sad_t, get_other_esa_id, esa_id_type,
 }
 
 METHOD(tkm_kernel_sad_t, get_dst_host, host_t *,
-       private_tkm_kernel_sad_t * const this, const u_int32_t reqid,
-       const u_int32_t spi, const u_int8_t proto)
+       private_tkm_kernel_sad_t * const this, const uint32_t reqid,
+       const uint32_t spi, const uint8_t proto)
 {
        host_t *dst = NULL;
        sad_entry_t *entry = NULL;
index 3a84def..ba64621 100644 (file)
@@ -46,9 +46,9 @@ struct tkm_kernel_sad_t {
         * @return                              TRUE if entry was inserted, FALSE otherwise
         */
        bool (*insert)(tkm_kernel_sad_t * const this, const esa_id_type esa_id,
-                                  const u_int32_t reqid, const host_t * const src,
-                                  const host_t * const dst, const u_int32_t spi_loc,
-                                  const u_int32_t spi_rem, const u_int8_t proto);
+                                  const uint32_t reqid, const host_t * const src,
+                                  const host_t * const dst, const uint32_t spi_loc,
+                                  const uint32_t spi_rem, const uint8_t proto);
 
        /**
         * Get ESA id for entry with given parameters.
@@ -61,7 +61,7 @@ struct tkm_kernel_sad_t {
         */
        esa_id_type (*get_esa_id)(tkm_kernel_sad_t * const this,
                                 const host_t * const src, const host_t * const dst,
-                                const u_int32_t spi, const u_int8_t proto);
+                                const uint32_t spi, const uint8_t proto);
 
        /**
         * Get ESA id for entry associated with same security policy as the
@@ -82,7 +82,7 @@ struct tkm_kernel_sad_t {
         * @return                              destination host of entry if found, NULL otherwise
         */
        host_t * (*get_dst_host)(tkm_kernel_sad_t * const this,
-                         const u_int32_t reqid, const u_int32_t spi, const u_int8_t proto);
+                         const uint32_t reqid, const uint32_t spi, const uint8_t proto);
 
        /**
         * Remove entry with given ESA id from SAD.
index 1e1fa4f..a7cce0f 100644 (file)
@@ -96,8 +96,8 @@ struct private_tkm_keymat_t {
 static void aead_create_from_keys(aead_t **in, aead_t **out,
           const chunk_t * const sk_ai, const chunk_t * const sk_ar,
           const chunk_t * const sk_ei, const chunk_t * const sk_er,
-          const u_int16_t enc_alg, const u_int16_t int_alg,
-          const u_int16_t key_size, bool initiator)
+          const uint16_t enc_alg, const uint16_t int_alg,
+          const uint16_t key_size, bool initiator)
 {
        *in = *out = NULL;
        signer_t *signer_i, *signer_r;
@@ -187,8 +187,8 @@ METHOD(keymat_v2_t, derive_ike_keys, bool,
        chunk_t nonce_i, chunk_t nonce_r, ike_sa_id_t *id,
        pseudo_random_function_t rekey_function, chunk_t rekey_skd)
 {
-       u_int16_t enc_alg, int_alg, key_size;
-       u_int64_t nc_id, spi_loc, spi_rem;
+       uint16_t enc_alg, int_alg, key_size;
+       uint64_t nc_id, spi_loc, spi_rem;
        chunk_t *nonce, c_ai, c_ar, c_ei, c_er;
        tkm_diffie_hellman_t *tkm_dh;
        dh_id_type dh_id;
index 336f16e..493ea29 100644 (file)
@@ -39,7 +39,7 @@ struct private_tkm_nonceg_t {
 };
 
 METHOD(nonce_gen_t, get_nonce, bool,
-       private_tkm_nonceg_t *this, size_t size, u_int8_t *buffer)
+       private_tkm_nonceg_t *this, size_t size, uint8_t *buffer)
 {
        nonce_type nonce;
        uint64_t nc_id;
index eff0ca9..b9ce837 100644 (file)
@@ -25,8 +25,8 @@
  */
 typedef struct {
        rng_t *rng;
-       u_int64_t spi_mask;
-       u_int64_t spi_label;
+       uint64_t spi_mask;
+       uint64_t spi_label;
 } get_spi_args_t;
 
 static get_spi_args_t *spi_args;
@@ -37,12 +37,12 @@ static get_spi_args_t *spi_args;
  * @param this                 Callback args containing rng_t and spi mask & label
  * @return                             labeled SPI
  */
-CALLBACK(tkm_get_spi, u_int64_t,
+CALLBACK(tkm_get_spi, uint64_t,
        const get_spi_args_t const *this)
 {
-       u_int64_t spi;
+       uint64_t spi;
 
-       if (!this->rng->get_bytes(this->rng, sizeof(spi), (u_int8_t*)&spi))
+       if (!this->rng->get_bytes(this->rng, sizeof(spi), (uint8_t*)&spi))
        {
                return 0;
        }
@@ -54,7 +54,7 @@ bool tkm_spi_generator_register(plugin_t *plugin,
                                 plugin_feature_t *feature,
                                 bool reg, void *cb_data)
 {
-       u_int64_t spi_mask, spi_label;
+       uint64_t spi_mask, spi_label;
        char *spi_val;
        rng_t *rng;
 
index d150891..67c1635 100644 (file)
@@ -37,7 +37,7 @@ START_TEST(test_nonceg_allocate_nonce)
        tkm_nonceg_t *ng = tkm_nonceg_create();
 
        const size_t length = 256;
-       u_int8_t zero[length];
+       uint8_t zero[length];
        memset(zero, 0, length);
 
        chunk_t nonce;
@@ -61,10 +61,10 @@ START_TEST(test_nonceg_get_nonce)
        tkm_nonceg_t *ng = tkm_nonceg_create();
 
        const size_t length = 128;
-       u_int8_t zero[length];
+       uint8_t zero[length];
        memset(zero, 0, length);
 
-       u_int8_t *buf = malloc(length + 1);
+       uint8_t *buf = malloc(length + 1);
        memset(buf, 0, length);
        /* set end marker */
        buf[length] = 255;
index 65399f5..e8998d5 100644 (file)
@@ -33,7 +33,7 @@ integrity_checker_t *integrity;
 static void build_checksum(char *path, char *name, char *sname)
 {
        void *handle, *symbol;
-       u_int32_t fsum, ssum;
+       uint32_t fsum, ssum;
        size_t fsize = 0;
        size_t ssize = 0;
 
index 256b63d..36c3c8e 100644 (file)
@@ -117,7 +117,7 @@ static job_requeue_t rekey_child(char *config)
        enumerator_t *enumerator, *children;
        ike_sa_t *ike_sa;
        child_sa_t *child_sa;
-       u_int32_t spi, proto;
+       uint32_t spi, proto;
        host_t *dst = NULL;
 
        enumerator = charon->controller->create_ike_sa_enumerator(
index c83db7e..907bed9 100644 (file)
@@ -146,7 +146,7 @@ static child_cfg_t *load_child_config(private_config_t *this,
        traffic_selector_t *ts;
        ipsec_mode_t mode = MODE_TUNNEL;
        char *token;
-       u_int32_t tfc;
+       uint32_t tfc;
 
        if (settings->get_bool(settings, "configs.%s.%s.transport",
                                                   FALSE, config, child))
index ee44045..c4f8385 100644 (file)
@@ -52,7 +52,7 @@ struct private_custom_proposal_t {
  * Load custom proposal configuration to proposal list
  */
 static linked_list_t* load_proposals(private_custom_proposal_t *this,
-                                                                        protocol_id_t proto, u_int64_t spi)
+                                                                        protocol_id_t proto, uint64_t spi)
 {
        enumerator_t *props, *algs;
        char *number, *key, *value;
@@ -65,7 +65,7 @@ static linked_list_t* load_proposals(private_custom_proposal_t *this,
        {
                const proposal_token_t *token = NULL;
                proposal_t *proposal;
-               u_int16_t type, alg, keysize = 0;
+               uint16_t type, alg, keysize = 0;
                char *end;
 
                proposal = proposal_create(proto, atoi(number));
index c0d458e..4062901 100644 (file)
@@ -54,7 +54,7 @@ METHOD(listener_t, message, bool,
                                proposals = list->create_enumerator(list);
                                while (proposals->enumerate(proposals, &proposal))
                                {
-                                       u_int64_t spi = proposal->get_spi(proposal);
+                                       uint64_t spi = proposal->get_spi(proposal);
 
                                        if (proposal->get_protocol(proposal) != PROTO_IKE)
                                        {
index bc2f000..42a9cb4 100644 (file)
@@ -67,7 +67,7 @@ static bool rebuild_auth(private_rebuild_auth_t *this, ike_sa_t *ike_sa,
        char reserved[3];
        generator_t *generator;
        chunk_t data;
-       u_int32_t *lenpos;
+       uint32_t *lenpos;
 
        payload = message->get_payload(message,
                                        message->get_request(message) ? PLV2_ID_INITIATOR : PLV2_ID_RESPONDER);
index 717bcdb..93c6143 100644 (file)
@@ -154,7 +154,7 @@ static job_requeue_t reset_cb(struct reset_cb_data_t *data)
  * Schedule sequence number reset job
  */
 static void schedule_reset_job(private_reset_seq_t *this, host_t *dst,
-                                                          u_int32_t spi)
+                                                          uint32_t spi)
 {
        struct reset_cb_data_t *data;
        chunk_t chunk;
index bda0258..cc4d5af 100644 (file)
@@ -42,12 +42,12 @@ struct private_set_ike_spi_t {
        /**
         * Initiator SPI
         */
-       u_int64_t spii;
+       uint64_t spii;
 
        /**
         * Responder SPI
         */
-       u_int64_t spir;
+       uint64_t spir;
 };
 
 METHOD(listener_t, message, bool,
index b1a1a47..7f64158 100644 (file)
@@ -75,7 +75,7 @@ METHOD(listener_t, message, bool,
                        if (type == payload->get_type(payload))
                        {
                                encoding_rule_t *rules;
-                               u_int16_t *len;
+                               uint16_t *len;
                                int i, count;
 
                                count = payload->get_encoding_rules(payload, &rules);
@@ -83,7 +83,7 @@ METHOD(listener_t, message, bool,
                                {
                                        if (rules[i].type == PAYLOAD_LENGTH)
                                        {
-                                               len = (u_int16_t*)(((void*)payload) + rules[i].offset);
+                                               len = (uint16_t*)(((void*)payload) + rules[i].offset);
                                                DBG1(DBG_CFG, "adjusting length of %N payload "
                                                         "from %d to %d", payload_type_short_names, type,
                                                         *len, *len + this->diff);
index 4e572d6..dd814ad 100644 (file)
@@ -57,7 +57,7 @@ static void copy_proposal_algs(proposal_t *from, proposal_t *to,
                                                           transform_type_t type)
 {
        enumerator_t *enumerator;
-       u_int16_t alg, key_size;
+       uint16_t alg, key_size;
 
        enumerator = from->create_enumerator(from, type);
        while (enumerator->enumerate(enumerator, &alg, &key_size))
index 488e8df..7ce6f1b 100644 (file)
@@ -85,11 +85,11 @@ static void set_bit(private_set_reserved_t *this, message_t *message,
  * Set reserved byte of a payload
  */
 static void set_byte(private_set_reserved_t *this, message_t *message,
-                                       payload_type_t type, u_int nr, u_int8_t byteval)
+                                       payload_type_t type, u_int nr, uint8_t byteval)
 {
        enumerator_t *payloads;
        payload_t *payload;
-       u_int8_t *byte;
+       uint8_t *byte;
 
        if (type == PLV2_TRANSFORM_SUBSTRUCTURE || type == PLV2_PROPOSAL_SUBSTRUCTURE)
        {
@@ -172,7 +172,7 @@ METHOD(listener_t, message, bool,
                enumerator_t *bits, *bytes, *types;
                payload_type_t type;
                char *nr, *name;
-               u_int8_t byteval;
+               uint8_t byteval;
 
                types = conftest->test->create_section_enumerator(conftest->test,
                                                                                                        "hooks.%s", this->name);
index 54c4fe3..4563d6f 100644 (file)
@@ -54,9 +54,9 @@ struct private_mconsole_t {
 typedef struct mconsole_request mconsole_request;
 /** mconsole request message */
 struct mconsole_request {
-       u_int32_t magic;
-       u_int32_t version;
-       u_int32_t len;
+       uint32_t magic;
+       uint32_t version;
+       uint32_t len;
        char data[MCONSOLE_MAX_DATA];
 };
 
@@ -64,24 +64,24 @@ struct mconsole_request {
 typedef struct mconsole_reply mconsole_reply;
 /** mconsole reply message */
 struct mconsole_reply {
-       u_int32_t err;
-       u_int32_t more;
-       u_int32_t len;
+       uint32_t err;
+       uint32_t more;
+       uint32_t len;
        char data[MCONSOLE_MAX_DATA];
 };
 
 typedef struct mconsole_notify mconsole_notify;
 /** mconsole notify message */
 struct mconsole_notify {
-       u_int32_t magic;
-       u_int32_t version;
+       uint32_t magic;
+       uint32_t version;
        enum {
                MCONSOLE_SOCKET,
                MCONSOLE_PANIC,
                MCONSOLE_HANG,
                MCONSOLE_USER_NOTIFY,
        } type;
-       u_int32_t len;
+       uint32_t len;
        char data[MCONSOLE_MAX_DATA];
 };
 
index 7d71da2..20d33fb 100644 (file)
@@ -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)
        {
index 7ef3913..eb3758d 100644 (file)
@@ -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,
index 6432b95..c45162d 100644 (file)
@@ -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;
 
index ea4f92d..b32277f 100644 (file)
@@ -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;
index a740303..33b545a 100644 (file)
@@ -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;
 }
index acc4b75..3edb5ca 100644 (file)
@@ -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;
index 5e9366b..6724841 100644 (file)
@@ -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)
        {
index 99e4d77..d9516a3 100644 (file)
@@ -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.
index 4b4c67c..2e84b0e 100644 (file)
@@ -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");
index 38c34e4..d5e6456 100644 (file)
@@ -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;
 }
index fd5ad37..0d2b581 100644 (file)
@@ -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.
index 7379d1a..7a1e995 100644 (file)
@@ -159,7 +159,7 @@ struct sadb_spirange {
 struct sadb_x_kmprivate {
        uint16_t        sadb_x_kmprivate_len;
        uint16_t        sadb_x_kmprivate_exttype;
-       u_int32_t       sadb_x_kmprivate_reserved;
+       uint32_t        sadb_x_kmprivate_reserved;
 } __attribute__((packed));
 /* sizeof(struct sadb_x_kmprivate) == 8 */
 
index 833c3e9..a2b7c28 100644 (file)
@@ -142,7 +142,7 @@ static host_t* offset2host(private_mem_pool_t *pool, int offset)
 {
        chunk_t addr;
        host_t *host;
-       u_int32_t *pos;
+       uint32_t *pos;
 
        offset--;
        if (offset > pool->size)
@@ -153,11 +153,11 @@ static host_t* offset2host(private_mem_pool_t *pool, int offset)
        addr = chunk_clone(pool->base->get_address(pool->base));
        if (pool->base->get_family(pool->base) == AF_INET6)
        {
-               pos = (u_int32_t*)(addr.ptr + 12);
+               pos = (uint32_t*)(addr.ptr + 12);
        }
        else
        {
-               pos = (u_int32_t*)addr.ptr;
+               pos = (uint32_t*)addr.ptr;
        }
        *pos = htonl(offset + ntohl(*pos));
        host = host_create_from_chunk(pool->base->get_family(pool->base), addr, 0);
@@ -171,7 +171,7 @@ static host_t* offset2host(private_mem_pool_t *pool, int offset)
 static int host2offset(private_mem_pool_t *pool, host_t *addr)
 {
        chunk_t host, base;
-       u_int32_t hosti, basei;
+       uint32_t hosti, basei;
 
        if (addr->get_family(addr) != pool->base->get_family(pool->base))
        {
@@ -189,8 +189,8 @@ static int host2offset(private_mem_pool_t *pool, host_t *addr)
                host = chunk_skip(host, 12);
                base = chunk_skip(base, 12);
        }
-       hosti = ntohl(*(u_int32_t*)(host.ptr));
-       basei = ntohl(*(u_int32_t*)(base.ptr));
+       hosti = ntohl(*(uint32_t*)(host.ptr));
+       basei = ntohl(*(uint32_t*)(base.ptr));
        if (hosti > basei + pool->size)
        {
                return -1;
@@ -634,7 +634,7 @@ static private_mem_pool_t *create_generic(char *name)
  */
 static u_int network_id_diff(host_t *host, int hostbits)
 {
-       u_int32_t last;
+       uint32_t last;
        chunk_t addr;
 
        if (!hostbits)
@@ -705,7 +705,7 @@ mem_pool_t *mem_pool_create_range(char *name, host_t *from, host_t *to)
 {
        private_mem_pool_t *this;
        chunk_t fromaddr, toaddr;
-       u_int32_t diff;
+       uint32_t diff;
 
        fromaddr = from->get_address(from);
        toaddr = to->get_address(to);
index 53ded6b..e17d629 100644 (file)
@@ -688,7 +688,7 @@ METHOD(bus_t, child_rekey, void,
 }
 
 METHOD(bus_t, children_migrate, void,
-       private_bus_t *this, ike_sa_id_t *new, u_int32_t unique)
+       private_bus_t *this, ike_sa_id_t *new, uint32_t unique)
 {
        enumerator_t *enumerator;
        ike_sa_t *ike_sa;
index b6757b1..8746cb8 100644 (file)
@@ -432,7 +432,7 @@ struct bus_t {
         * @param new           ID of new SA when called for the old, NULL otherwise
         * @param uniue         unique ID of new SA when called for the old, 0 otherwise
         */
-       void (*children_migrate)(bus_t *this, ike_sa_id_t *new, u_int32_t unique);
+       void (*children_migrate)(bus_t *this, ike_sa_id_t *new, uint32_t unique);
 
        /**
         * Virtual IP assignment hook.
index c7a8d8d..be2726e 100644 (file)
@@ -200,7 +200,7 @@ struct listener_t {
         * @return                      TRUE to stay registered, FALSE to unregister
         */
        bool (*children_migrate)(listener_t *this, ike_sa_t *ike_sa,
-                                                        ike_sa_id_t *new, u_int32_t unique);
+                                                        ike_sa_id_t *new, uint32_t unique);
 
        /**
         * Hook called to invoke additional authorization rules.
index 3d3c741..8e5c522 100644 (file)
@@ -110,12 +110,12 @@ struct private_child_cfg_t {
        /**
         * Inactivity timeout
         */
-       u_int32_t inactivity;
+       uint32_t inactivity;
 
        /**
         * Reqid to install CHILD_SA with
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * Optional mark to install inbound CHILD_SA with
@@ -130,7 +130,7 @@ struct private_child_cfg_t {
        /**
         * Traffic Flow Confidentiality padding, if enabled
         */
-       u_int32_t tfc;
+       uint32_t tfc;
 
        /**
         * set up IPsec transport SA in MIPv6 proxy mode
@@ -145,7 +145,7 @@ struct private_child_cfg_t {
        /**
         * anti-replay window size
         */
-       u_int32_t replay_window;
+       uint32_t replay_window;
 };
 
 METHOD(child_cfg_t, get_name, char*,
@@ -405,7 +405,7 @@ METHOD(child_cfg_t, get_hostaccess, bool,
  * Note: The distribution of random values is not perfect, but it
  * should get the job done.
  */
-static u_int64_t apply_jitter(u_int64_t rekey, u_int64_t jitter)
+static uint64_t apply_jitter(uint64_t rekey, uint64_t jitter)
 {
        if (jitter == 0)
        {
@@ -456,7 +456,7 @@ METHOD(child_cfg_t, get_dh_group, diffie_hellman_group_t,
 {
        enumerator_t *enumerator;
        proposal_t *proposal;
-       u_int16_t dh_group = MODP_NONE;
+       uint16_t dh_group = MODP_NONE;
 
        enumerator = this->proposals->create_enumerator(this->proposals);
        while (enumerator->enumerate(enumerator, &proposal))
@@ -476,13 +476,13 @@ METHOD(child_cfg_t, use_ipcomp, bool,
        return this->use_ipcomp;
 }
 
-METHOD(child_cfg_t, get_inactivity, u_int32_t,
+METHOD(child_cfg_t, get_inactivity, uint32_t,
        private_child_cfg_t *this)
 {
        return this->inactivity;
 }
 
-METHOD(child_cfg_t, get_reqid, u_int32_t,
+METHOD(child_cfg_t, get_reqid, uint32_t,
        private_child_cfg_t *this)
 {
        return this->reqid;
@@ -494,20 +494,20 @@ METHOD(child_cfg_t, get_mark, mark_t,
        return inbound ? this->mark_in : this->mark_out;
 }
 
-METHOD(child_cfg_t, get_tfc, u_int32_t,
+METHOD(child_cfg_t, get_tfc, uint32_t,
        private_child_cfg_t *this)
 {
        return this->tfc;
 }
 
-METHOD(child_cfg_t, get_replay_window, u_int32_t,
+METHOD(child_cfg_t, get_replay_window, uint32_t,
        private_child_cfg_t *this)
 {
        return this->replay_window;
 }
 
 METHOD(child_cfg_t, set_replay_window, void,
-       private_child_cfg_t *this, u_int32_t replay_window)
+       private_child_cfg_t *this, uint32_t replay_window)
 {
        this->replay_window = replay_window;
 }
@@ -613,8 +613,8 @@ child_cfg_t *child_cfg_create(char *name, lifetime_cfg_t *lifetime,
                                                          char *updown, bool hostaccess,
                                                          ipsec_mode_t mode, action_t start_action,
                                                          action_t dpd_action, action_t close_action,
-                                                         bool ipcomp, u_int32_t inactivity, u_int32_t reqid,
-                                                         mark_t *mark_in, mark_t *mark_out, u_int32_t tfc)
+                                                         bool ipcomp, uint32_t inactivity, uint32_t reqid,
+                                                         mark_t *mark_in, mark_t *mark_out, uint32_t tfc)
 {
        private_child_cfg_t *this;
 
index 22641f7..0281f5a 100644 (file)
@@ -210,14 +210,14 @@ struct child_cfg_t {
         *
         * @return                              inactivity timeout in s
         */
-       u_int32_t (*get_inactivity)(child_cfg_t *this);
+       uint32_t (*get_inactivity)(child_cfg_t *this);
 
        /**
         * Specific reqid to use for CHILD_SA.
         *
         * @return                              reqid
         */
-       u_int32_t (*get_reqid)(child_cfg_t *this);
+       uint32_t (*get_reqid)(child_cfg_t *this);
 
        /**
         * Optional mark for CHILD_SA.
@@ -232,21 +232,21 @@ struct child_cfg_t {
         *
         * @return                              TFC padding, 0 to disable, -1 for MTU
         */
-       u_int32_t (*get_tfc)(child_cfg_t *this);
+       uint32_t (*get_tfc)(child_cfg_t *this);
 
        /**
         * Get anti-replay window size
         *
         * @return                              anti-replay window size
         */
-       u_int32_t (*get_replay_window)(child_cfg_t *this);
+       uint32_t (*get_replay_window)(child_cfg_t *this);
 
        /**
         * Set anti-replay window size
         *
         * @param window                anti-replay window size
         */
-       void (*set_replay_window)(child_cfg_t *this, u_int32_t window);
+       void (*set_replay_window)(child_cfg_t *this, uint32_t window);
 
        /**
         * Sets two options needed for Mobile IPv6 interoperability.
@@ -328,7 +328,7 @@ child_cfg_t *child_cfg_create(char *name, lifetime_cfg_t *lifetime,
                                                          char *updown, bool hostaccess,
                                                          ipsec_mode_t mode, action_t start_action,
                                                          action_t dpd_action, action_t close_action,
-                                                         bool ipcomp, u_int32_t inactivity, u_int32_t reqid,
-                                                         mark_t *mark_in, mark_t *mark_out, u_int32_t tfc);
+                                                         bool ipcomp, uint32_t inactivity, uint32_t reqid,
+                                                         mark_t *mark_in, mark_t *mark_out, uint32_t tfc);
 
 #endif /** CHILD_CFG_H_ @}*/
index a720e14..a92622c 100644 (file)
@@ -83,12 +83,12 @@ struct private_ike_cfg_t {
        /**
         * our source port
         */
-       u_int16_t my_port;
+       uint16_t my_port;
 
        /**
         * destination port
         */
-       u_int16_t other_port;
+       uint16_t other_port;
 
        /**
         * should we send a certificate request?
@@ -108,7 +108,7 @@ struct private_ike_cfg_t {
        /**
         * DSCP value to use on sent IKE packets
         */
-       u_int8_t dscp;
+       uint8_t dscp;
 
        /**
         * List of proposals to use
@@ -143,7 +143,7 @@ METHOD(ike_cfg_t, fragmentation, fragmentation_t,
 /**
  * Common function for resolve_me/other
  */
-static host_t* resolve(linked_list_t *hosts, int family, u_int16_t port)
+static host_t* resolve(linked_list_t *hosts, int family, uint16_t port)
 {
        enumerator_t *enumerator;
        host_t *host = NULL;
@@ -192,7 +192,7 @@ static u_int match(linked_list_t *hosts, linked_list_t *ranges, host_t *cand)
        traffic_selector_t *ts;
        char *str;
        host_t *host;
-       u_int8_t mask;
+       uint8_t mask;
        u_int quality = 0;
 
        /* try single hosts first */
@@ -261,19 +261,19 @@ METHOD(ike_cfg_t, get_other_addr, char*,
        return this->other;
 }
 
-METHOD(ike_cfg_t, get_my_port, u_int16_t,
+METHOD(ike_cfg_t, get_my_port, uint16_t,
        private_ike_cfg_t *this)
 {
        return this->my_port;
 }
 
-METHOD(ike_cfg_t, get_other_port, u_int16_t,
+METHOD(ike_cfg_t, get_other_port, uint16_t,
        private_ike_cfg_t *this)
 {
        return this->other_port;
 }
 
-METHOD(ike_cfg_t, get_dscp, u_int8_t,
+METHOD(ike_cfg_t, get_dscp, uint8_t,
        private_ike_cfg_t *this)
 {
        return this->dscp;
@@ -353,7 +353,7 @@ METHOD(ike_cfg_t, get_dh_group, diffie_hellman_group_t,
 {
        enumerator_t *enumerator;
        proposal_t *proposal;
-       u_int16_t dh_group = MODP_NONE;
+       uint16_t dh_group = MODP_NONE;
 
        enumerator = this->proposals->create_enumerator(this->proposals);
        while (enumerator->enumerate(enumerator, &proposal))
@@ -545,9 +545,9 @@ int ike_cfg_get_family(ike_cfg_t *cfg, bool local)
  * Described in header.
  */
 ike_cfg_t *ike_cfg_create(ike_version_t version, bool certreq, bool force_encap,
-                                                 char *me, u_int16_t my_port,
-                                                 char *other, u_int16_t other_port,
-                                                 fragmentation_t fragmentation, u_int8_t dscp)
+                                                 char *me, uint16_t my_port,
+                                                 char *other, uint16_t other_port,
+                                                 fragmentation_t fragmentation, uint8_t dscp)
 {
        private_ike_cfg_t *this;
 
index a72960f..c6d9554 100644 (file)
@@ -128,21 +128,21 @@ struct ike_cfg_t {
         *
         * @return                              source address port, host order
         */
-       u_int16_t (*get_my_port)(ike_cfg_t *this);
+       uint16_t (*get_my_port)(ike_cfg_t *this);
 
        /**
         * Get the port to use as destination port.
         *
         * @return                              destination address, host order
         */
-       u_int16_t (*get_other_port)(ike_cfg_t *this);
+       uint16_t (*get_other_port)(ike_cfg_t *this);
 
        /**
         * Get the DSCP value to use for IKE packets send from connections.
         *
         * @return                              DSCP value
         */
-       u_int8_t (*get_dscp)(ike_cfg_t *this);
+       uint8_t (*get_dscp)(ike_cfg_t *this);
 
        /**
         * Adds a proposal to the list.
@@ -250,9 +250,9 @@ struct ike_cfg_t {
  * @return                                     ike_cfg_t object.
  */
 ike_cfg_t *ike_cfg_create(ike_version_t version, bool certreq, bool force_encap,
-                                                 char *me, u_int16_t my_port,
-                                                 char *other, u_int16_t other_port,
-                                                 fragmentation_t fragmentation, u_int8_t dscp);
+                                                 char *me, uint16_t my_port,
+                                                 char *other, uint16_t other_port,
+                                                 fragmentation_t fragmentation, uint8_t dscp);
 
 /**
  * Determine the address family of the local or remtoe address(es).  If multiple
index d28a795..4eebfb0 100644 (file)
@@ -88,7 +88,7 @@ struct private_peer_cfg_t {
        /**
         * number of tries after giving up if peer does not respond
         */
-       u_int32_t keyingtries;
+       uint32_t keyingtries;
 
        /**
         * enable support for MOBIKE
@@ -108,32 +108,32 @@ struct private_peer_cfg_t {
        /**
         * Time before starting rekeying
         */
-       u_int32_t rekey_time;
+       uint32_t rekey_time;
 
        /**
         * Time before starting reauthentication
         */
-       u_int32_t reauth_time;
+       uint32_t reauth_time;
 
        /**
         * Time, which specifies the range of a random value subtracted from above.
         */
-       u_int32_t jitter_time;
+       uint32_t jitter_time;
 
        /**
         * Delay before deleting a rekeying/reauthenticating SA
         */
-       u_int32_t over_time;
+       uint32_t over_time;
 
        /**
         * DPD check intervall
         */
-       u_int32_t dpd;
+       uint32_t dpd;
 
        /**
         * DPD timeout intervall (used for IKEv1 only)
         */
-       u_int32_t dpd_timeout;
+       uint32_t dpd_timeout;
 
        /**
         * List of virtual IPs (host_t*) to request
@@ -455,13 +455,13 @@ METHOD(peer_cfg_t, get_unique_policy, unique_policy_t,
        return this->unique;
 }
 
-METHOD(peer_cfg_t, get_keyingtries, u_int32_t,
+METHOD(peer_cfg_t, get_keyingtries, uint32_t,
        private_peer_cfg_t *this)
 {
        return this->keyingtries;
 }
 
-METHOD(peer_cfg_t, get_rekey_time, u_int32_t,
+METHOD(peer_cfg_t, get_rekey_time, uint32_t,
        private_peer_cfg_t *this, bool jitter)
 {
        if (this->rekey_time == 0)
@@ -475,7 +475,7 @@ METHOD(peer_cfg_t, get_rekey_time, u_int32_t,
        return this->rekey_time - (random() % this->jitter_time);
 }
 
-METHOD(peer_cfg_t, get_reauth_time, u_int32_t,
+METHOD(peer_cfg_t, get_reauth_time, uint32_t,
        private_peer_cfg_t *this, bool jitter)
 {
        if (this->reauth_time == 0)
@@ -489,7 +489,7 @@ METHOD(peer_cfg_t, get_reauth_time, u_int32_t,
        return this->reauth_time - (random() % this->jitter_time);
 }
 
-METHOD(peer_cfg_t, get_over_time, u_int32_t,
+METHOD(peer_cfg_t, get_over_time, uint32_t,
        private_peer_cfg_t *this)
 {
        return this->over_time;
@@ -513,13 +513,13 @@ METHOD(peer_cfg_t, use_pull_mode, bool,
        return this->pull_mode;
 }
 
-METHOD(peer_cfg_t, get_dpd, u_int32_t,
+METHOD(peer_cfg_t, get_dpd, uint32_t,
        private_peer_cfg_t *this)
 {
        return this->dpd;
 }
 
-METHOD(peer_cfg_t, get_dpd_timeout, u_int32_t,
+METHOD(peer_cfg_t, get_dpd_timeout, uint32_t,
        private_peer_cfg_t *this)
 {
        return this->dpd_timeout;
@@ -726,11 +726,11 @@ METHOD(peer_cfg_t, destroy, void,
  */
 peer_cfg_t *peer_cfg_create(char *name,
                                                        ike_cfg_t *ike_cfg, cert_policy_t cert_policy,
-                                                       unique_policy_t unique, u_int32_t keyingtries,
-                                                       u_int32_t rekey_time, u_int32_t reauth_time,
-                                                       u_int32_t jitter_time, u_int32_t over_time,
+                                                       unique_policy_t unique, uint32_t keyingtries,
+                                                       uint32_t rekey_time, uint32_t reauth_time,
+                                                       uint32_t jitter_time, uint32_t over_time,
                                                        bool mobike, bool aggressive, bool pull_mode,
-                                                       u_int32_t dpd, u_int32_t dpd_timeout,
+                                                       uint32_t dpd, uint32_t dpd_timeout,
                                                        bool mediation, peer_cfg_t *mediated_by,
                                                        identification_t *peer_id)
 {
index b612a2e..a4646af 100644 (file)
@@ -222,7 +222,7 @@ struct peer_cfg_t {
         *
         * @return                      max number retries
         */
-       u_int32_t (*get_keyingtries) (peer_cfg_t *this);
+       uint32_t (*get_keyingtries) (peer_cfg_t *this);
 
        /**
         * Get a time to start rekeying.
@@ -230,7 +230,7 @@ struct peer_cfg_t {
         * @param jitter        remove a jitter value to randomize time
         * @return                      time in s when to start rekeying, 0 disables rekeying
         */
-       u_int32_t (*get_rekey_time)(peer_cfg_t *this, bool jitter);
+       uint32_t (*get_rekey_time)(peer_cfg_t *this, bool jitter);
 
        /**
         * Get a time to start reauthentication.
@@ -238,14 +238,14 @@ struct peer_cfg_t {
         * @param jitter        remove a jitter value to randomize time
         * @return                      time in s when to start reauthentication, 0 disables it
         */
-       u_int32_t (*get_reauth_time)(peer_cfg_t *this, bool jitter);
+       uint32_t (*get_reauth_time)(peer_cfg_t *this, bool jitter);
 
        /**
         * Get the timeout of a rekeying/reauthenticating SA.
         *
         * @return                      timeout in s
         */
-       u_int32_t (*get_over_time)(peer_cfg_t *this);
+       uint32_t (*get_over_time)(peer_cfg_t *this);
 
        /**
         * Use MOBIKE (RFC4555) if peer supports it?
@@ -273,14 +273,14 @@ struct peer_cfg_t {
         *
         * @return                      dpd_delay in seconds
         */
-       u_int32_t (*get_dpd) (peer_cfg_t *this);
+       uint32_t (*get_dpd) (peer_cfg_t *this);
 
        /**
         * Get the DPD timeout interval (IKEv1 only)
         *
         * @return                      dpd_timeout in seconds
         */
-       u_int32_t (*get_dpd_timeout) (peer_cfg_t *this);
+       uint32_t (*get_dpd_timeout) (peer_cfg_t *this);
 
        /**
         * Add a virtual IP to request as initiator.
@@ -397,11 +397,11 @@ struct peer_cfg_t {
  */
 peer_cfg_t *peer_cfg_create(char *name,
                                                        ike_cfg_t *ike_cfg, cert_policy_t cert_policy,
-                                                       unique_policy_t unique, u_int32_t keyingtries,
-                                                       u_int32_t rekey_time, u_int32_t reauth_time,
-                                                       u_int32_t jitter_time, u_int32_t over_time,
+                                                       unique_policy_t unique, uint32_t keyingtries,
+                                                       uint32_t rekey_time, uint32_t reauth_time,
+                                                       uint32_t jitter_time, uint32_t over_time,
                                                        bool mobike, bool aggressive, bool pull_mode,
-                                                       u_int32_t dpd, u_int32_t dpd_timeout,
+                                                       uint32_t dpd, uint32_t dpd_timeout,
                                                        bool mediation, peer_cfg_t *mediated_by,
                                                        identification_t *peer_id);
 
index 95b6a00..0315e4e 100644 (file)
@@ -61,7 +61,7 @@ struct private_proposal_t {
        /**
         * senders SPI
         */
-       u_int64_t spi;
+       uint64_t spi;
 
        /**
         * Proposal number
@@ -76,14 +76,14 @@ typedef struct {
        /** Type of the transform */
        transform_type_t type;
        /** algorithm identifier */
-       u_int16_t alg;
+       uint16_t alg;
        /** key size in bits, or zero if not needed */
-       u_int16_t key_size;
+       uint16_t key_size;
 } entry_t;
 
 METHOD(proposal_t, add_algorithm, void,
        private_proposal_t *this, transform_type_t type,
-       u_int16_t alg, u_int16_t key_size)
+       uint16_t alg, uint16_t key_size)
 {
        entry_t entry = {
                .type = type,
@@ -97,8 +97,8 @@ METHOD(proposal_t, add_algorithm, void,
 /**
  * filter function for peer configs
  */
-static bool alg_filter(uintptr_t type, entry_t **in, u_int16_t *alg,
-                                          void **unused, u_int16_t *key_size)
+static bool alg_filter(uintptr_t type, entry_t **in, uint16_t *alg,
+                                          void **unused, uint16_t *key_size)
 {
        entry_t *entry = *in;
 
@@ -127,7 +127,7 @@ METHOD(proposal_t, create_enumerator, enumerator_t*,
 
 METHOD(proposal_t, get_algorithm, bool,
        private_proposal_t *this, transform_type_t type,
-       u_int16_t *alg, u_int16_t *key_size)
+       uint16_t *alg, uint16_t *key_size)
 {
        enumerator_t *enumerator;
        bool found = FALSE;
@@ -147,7 +147,7 @@ METHOD(proposal_t, has_dh_group, bool,
 {
        bool found = FALSE, any = FALSE;
        enumerator_t *enumerator;
-       u_int16_t current;
+       uint16_t current;
 
        enumerator = create_enumerator(this, DIFFIE_HELLMAN_GROUP);
        while (enumerator->enumerate(enumerator, &current, NULL))
@@ -193,7 +193,7 @@ static bool select_algo(private_proposal_t *this, proposal_t *other,
                                                proposal_t *selected, transform_type_t type, bool priv)
 {
        enumerator_t *e1, *e2;
-       u_int16_t alg1, alg2, ks1, ks2;
+       uint16_t alg1, alg2, ks1, ks2;
        bool found = FALSE, optional = FALSE;
 
        if (type == INTEGRITY_ALGORITHM &&
@@ -301,12 +301,12 @@ METHOD(proposal_t, get_protocol, protocol_id_t,
 }
 
 METHOD(proposal_t, set_spi, void,
-       private_proposal_t *this, u_int64_t spi)
+       private_proposal_t *this, uint64_t spi)
 {
        this->spi = spi;
 }
 
-METHOD(proposal_t, get_spi, u_int64_t,
+METHOD(proposal_t, get_spi, uint64_t,
        private_proposal_t *this)
 {
        return this->spi;
@@ -319,7 +319,7 @@ static bool algo_list_equals(private_proposal_t *this, proposal_t *other,
                                                         transform_type_t type)
 {
        enumerator_t *e1, *e2;
-       u_int16_t alg1, alg2, ks1, ks2;
+       uint16_t alg1, alg2, ks1, ks2;
        bool equals = TRUE;
 
        e1 = create_enumerator(this, type);
@@ -418,7 +418,7 @@ static void check_proposal(private_proposal_t *this)
 {
        enumerator_t *e;
        entry_t *entry;
-       u_int16_t alg, ks;
+       uint16_t alg, ks;
        bool all_aead = TRUE;
        int i;
 
@@ -516,7 +516,7 @@ static int print_alg(private_proposal_t *this, printf_hook_data_t *data,
 {
        enumerator_t *enumerator;
        size_t written = 0;
-       u_int16_t alg, size;
+       uint16_t alg, size;
 
        enumerator = create_enumerator(this, kind);
        while (enumerator->enumerate(enumerator, &alg, &size))
index 78b8688..f9f2778 100644 (file)
@@ -78,13 +78,13 @@ struct proposal_t {
         * @param key_size              key size to use
         */
        void (*add_algorithm) (proposal_t *this, transform_type_t type,
-                                                  u_int16_t alg, u_int16_t key_size);
+                                                  uint16_t alg, uint16_t key_size);
 
        /**
         * Get an enumerator over algorithms for a specifc algo type.
         *
         * @param type                  kind of algorithm
-        * @return                              enumerator over u_int16_t alg, u_int16_t key_size
+        * @return                              enumerator over uint16_t alg, uint16_t key_size
         */
        enumerator_t *(*create_enumerator) (proposal_t *this, transform_type_t type);
 
@@ -99,7 +99,7 @@ struct proposal_t {
         * @return                              TRUE if algorithm of this kind available
         */
        bool (*get_algorithm) (proposal_t *this, transform_type_t type,
-                                                  u_int16_t *alg, u_int16_t *key_size);
+                                                  uint16_t *alg, uint16_t *key_size);
 
        /**
         * Check if the proposal has a specific DH group.
@@ -141,14 +141,14 @@ struct proposal_t {
         *
         * @return                              spi for proto
         */
-       u_int64_t (*get_spi) (proposal_t *this);
+       uint64_t (*get_spi) (proposal_t *this);
 
        /**
         * Set the SPI of the proposal.
         *
         * @param spi                   spi to set for proto
         */
-       void (*set_spi) (proposal_t *this, u_int64_t spi);
+       void (*set_spi) (proposal_t *this, uint64_t spi);
 
        /**
         * Get the proposal number, as encoded in SA payload
index 6dd54b4..3aed414 100644 (file)
@@ -105,7 +105,7 @@ struct interface_listener_t {
        /**
         * unique ID, used for various methods
         */
-       u_int32_t id;
+       uint32_t id;
 
        /**
         * semaphore to implement wait_for_listener()
@@ -493,7 +493,7 @@ METHOD(job_t, terminate_ike_execute, job_requeue_t,
        interface_job_t *job)
 {
        interface_listener_t *listener = &job->listener;
-       u_int32_t unique_id = listener->id;
+       uint32_t unique_id = listener->id;
        ike_sa_t *ike_sa;
 
        ike_sa = charon->ike_sa_manager->checkout_by_id(charon->ike_sa_manager,
@@ -528,7 +528,7 @@ METHOD(job_t, terminate_ike_execute, job_requeue_t,
 }
 
 METHOD(controller_t, terminate_ike, status_t,
-       controller_t *this, u_int32_t unique_id,
+       controller_t *this, uint32_t unique_id,
        controller_cb_t callback, void *param, u_int timeout)
 {
        interface_job_t *job;
@@ -582,7 +582,7 @@ METHOD(job_t, terminate_child_execute, job_requeue_t,
        interface_job_t *job)
 {
        interface_listener_t *listener = &job->listener;
-       u_int32_t id = listener->id;
+       uint32_t id = listener->id;
        child_sa_t *child_sa;
        ike_sa_t *ike_sa;
 
@@ -630,7 +630,7 @@ METHOD(job_t, terminate_child_execute, job_requeue_t,
 }
 
 METHOD(controller_t, terminate_child, status_t,
-       controller_t *this, u_int32_t unique_id,
+       controller_t *this, uint32_t unique_id,
        controller_cb_t callback, void *param, u_int timeout)
 {
        interface_job_t *job;
index 5ffeac5..9524f53 100644 (file)
@@ -111,7 +111,7 @@ struct controller_t {
         *                                              - NEED_MORE, if callback returned FALSE
         *                                              - OUT_OF_RES if timed out
         */
-       status_t (*terminate_ike)(controller_t *this, u_int32_t unique_id,
+       status_t (*terminate_ike)(controller_t *this, uint32_t unique_id,
                                                          controller_cb_t callback, void *param,
                                                          u_int timeout);
 
@@ -131,7 +131,7 @@ struct controller_t {
         *                                              - NEED_MORE, if callback returned FALSE
         *                                              - OUT_OF_RES if timed out
         */
-       status_t (*terminate_child)(controller_t *this, u_int32_t unique_id,
+       status_t (*terminate_child)(controller_t *this, uint32_t unique_id,
                                                                controller_cb_t callback, void *param,
                                                                u_int timeout);
 
index a0a508f..41aacd4 100644 (file)
@@ -68,22 +68,22 @@ struct private_generator_t {
        /**
         * Buffer used to generate the data into.
         */
-       u_int8_t *buffer;
+       uint8_t *buffer;
 
        /**
         * Current write position in buffer (one byte aligned).
         */
-       u_int8_t *out_position;
+       uint8_t *out_position;
 
        /**
         * Position of last byte in buffer.
         */
-       u_int8_t *roof_position;
+       uint8_t *roof_position;
 
        /**
         * Current bit writing to in current byte (between 0 and 7).
         */
-       u_int8_t current_bit;
+       uint8_t current_bit;
 
        /**
         * Associated data struct to read informations from.
@@ -93,7 +93,7 @@ struct private_generator_t {
        /**
         * Offset of the header length field in the buffer.
         */
-       u_int32_t header_length_offset;
+       uint32_t header_length_offset;
 
        /**
         * Attribute format of the last generated transform attribute.
@@ -107,7 +107,7 @@ struct private_generator_t {
         * Depending on the value of attribute_format this field is used
         * to hold the length of the transform attribute in bytes.
         */
-       u_int16_t attribute_length;
+       uint16_t attribute_length;
 
        /**
         * TRUE, if debug messages should be logged during generation.
@@ -142,7 +142,7 @@ static int get_length(private_generator_t *this)
 /**
  * Get current offset in buffer (in bytes).
  */
-static u_int32_t get_offset(private_generator_t *this)
+static uint32_t get_offset(private_generator_t *this)
 {
        return this->out_position - this->buffer;
 }
@@ -179,7 +179,7 @@ static void write_bytes_to_buffer(private_generator_t *this, void *bytes,
                                                                  int number_of_bytes)
 {
        int i;
-       u_int8_t *read_position = (u_int8_t *)bytes;
+       uint8_t *read_position = (uint8_t *)bytes;
 
        make_space_available(this, number_of_bytes * 8);
 
@@ -195,7 +195,7 @@ static void write_bytes_to_buffer(private_generator_t *this, void *bytes,
  * Generates a U_INT-Field type and writes it to buffer.
  */
 static void generate_u_int_type(private_generator_t *this,
-                                                               encoding_type_t int_type,u_int32_t offset)
+                                                               encoding_type_t int_type,uint32_t offset)
 {
        int number_of_bits = 0;
 
@@ -242,12 +242,12 @@ static void generate_u_int_type(private_generator_t *this,
        {
                case U_INT_4:
                {
-                       u_int8_t high, low;
+                       uint8_t high, low;
 
                        if (this->current_bit == 0)
                        {
                                /* high of current byte in buffer has to be set to the new value*/
-                               high = *((u_int8_t *)(this->data_struct + offset)) << 4;
+                               high = *((uint8_t *)(this->data_struct + offset)) << 4;
                                /* low in buffer is not changed */
                                low = *(this->out_position) & 0x0F;
                                /* high is set, low_val is not changed */
@@ -264,7 +264,7 @@ static void generate_u_int_type(private_generator_t *this,
                                /* high in buffer is not changed */
                                high = *(this->out_position) & 0xF0;
                                /* low of current byte in buffer has to be set to the new value*/
-                               low = *((u_int8_t *)(this->data_struct + offset)) & 0x0F;
+                               low = *((uint8_t *)(this->data_struct + offset)) & 0x0F;
                                *(this->out_position) = high | low;
                                if (this->debug)
                                {
@@ -287,7 +287,7 @@ static void generate_u_int_type(private_generator_t *this,
                case U_INT_8:
                {
                        /* 8 bit values are written as they are */
-                       *this->out_position = *((u_int8_t *)(this->data_struct + offset));
+                       *this->out_position = *((uint8_t *)(this->data_struct + offset));
                        if (this->debug)
                        {
                                DBG3(DBG_ENC, "   => %d", *(this->out_position));
@@ -297,8 +297,8 @@ static void generate_u_int_type(private_generator_t *this,
                }
                case ATTRIBUTE_TYPE:
                {
-                       u_int8_t attribute_format_flag;
-                       u_int16_t val;
+                       uint8_t attribute_format_flag;
+                       uint16_t val;
 
                        /* attribute type must not change first bit of current byte */
                        if (this->current_bit != 1)
@@ -308,7 +308,7 @@ static void generate_u_int_type(private_generator_t *this,
                        }
                        attribute_format_flag = *(this->out_position) & 0x80;
                        /* get attribute type value as 16 bit integer*/
-                       val = *((u_int16_t*)(this->data_struct + offset));
+                       val = *((uint16_t*)(this->data_struct + offset));
                        /* unset most significant bit */
                        val &= 0x7FFF;
                        if (attribute_format_flag)
@@ -321,7 +321,7 @@ static void generate_u_int_type(private_generator_t *this,
                                DBG3(DBG_ENC, "   => %d", val);
                        }
                        /* write bytes to buffer (set bit is overwritten) */
-                       write_bytes_to_buffer(this, &val, sizeof(u_int16_t));
+                       write_bytes_to_buffer(this, &val, sizeof(uint16_t));
                        this->current_bit = 0;
                        break;
 
@@ -330,33 +330,33 @@ static void generate_u_int_type(private_generator_t *this,
                case PAYLOAD_LENGTH:
                case ATTRIBUTE_LENGTH:
                {
-                       u_int16_t val = htons(*((u_int16_t*)(this->data_struct + offset)));
+                       uint16_t val = htons(*((uint16_t*)(this->data_struct + offset)));
                        if (this->debug)
                        {
-                               DBG3(DBG_ENC, "   %b", &val, sizeof(u_int16_t));
+                               DBG3(DBG_ENC, "   %b", &val, sizeof(uint16_t));
                        }
-                       write_bytes_to_buffer(this, &val, sizeof(u_int16_t));
+                       write_bytes_to_buffer(this, &val, sizeof(uint16_t));
                        break;
                }
                case U_INT_32:
                {
-                       u_int32_t val = htonl(*((u_int32_t*)(this->data_struct + offset)));
+                       uint32_t val = htonl(*((uint32_t*)(this->data_struct + offset)));
                        if (this->debug)
                        {
-                               DBG3(DBG_ENC, "   %b", &val, sizeof(u_int32_t));
+                               DBG3(DBG_ENC, "   %b", &val, sizeof(uint32_t));
                        }
-                       write_bytes_to_buffer(this, &val, sizeof(u_int32_t));
+                       write_bytes_to_buffer(this, &val, sizeof(uint32_t));
                        break;
                }
                case IKE_SPI:
                {
                        /* 64 bit are written as-is, no host order conversion */
                        write_bytes_to_buffer(this, this->data_struct + offset,
-                                                                 sizeof(u_int64_t));
+                                                                 sizeof(uint64_t));
                        if (this->debug)
                        {
                                DBG3(DBG_ENC, "   %b", this->data_struct + offset,
-                                        sizeof(u_int64_t));
+                                        sizeof(uint64_t));
                        }
                        break;
                }
@@ -372,10 +372,10 @@ static void generate_u_int_type(private_generator_t *this,
 /**
  * Generate a FLAG filed
  */
-static void generate_flag(private_generator_t *this, u_int32_t offset)
+static void generate_flag(private_generator_t *this, uint32_t offset)
 {
-       u_int8_t flag_value;
-       u_int8_t flag;
+       uint8_t flag_value;
+       uint8_t flag;
 
        flag_value = (*((bool *) (this->data_struct + offset))) ? 1 : 0;
        /* get flag position */
@@ -406,7 +406,7 @@ static void generate_flag(private_generator_t *this, u_int32_t offset)
 /**
  * Generates a bytestream from a chunk_t.
  */
-static void generate_from_chunk(private_generator_t *this, u_int32_t offset)
+static void generate_from_chunk(private_generator_t *this, uint32_t offset)
 {
        chunk_t *value;
 
@@ -427,11 +427,11 @@ static void generate_from_chunk(private_generator_t *this, u_int32_t offset)
 }
 
 METHOD(generator_t, get_chunk, chunk_t,
-       private_generator_t *this, u_int32_t **lenpos)
+       private_generator_t *this, uint32_t **lenpos)
 {
        chunk_t data;
 
-       *lenpos = (u_int32_t*)(this->buffer + this->header_length_offset);
+       *lenpos = (uint32_t*)(this->buffer + this->header_length_offset);
        data = chunk_create(this->buffer, get_length(this));
        if (this->debug)
        {
@@ -537,7 +537,7 @@ METHOD(generator_t, generate_payload, void,
                                        generate_u_int_type(this, U_INT_16, rules[i].offset);
                                        /* this field hold the length of the attribute */
                                        this->attribute_length =
-                                               *((u_int16_t *)(this->data_struct + rules[i].offset));
+                                               *((uint16_t *)(this->data_struct + rules[i].offset));
                                }
                                break;
                        case ATTRIBUTE_VALUE:
index c2c0aad..3755307 100644 (file)
@@ -57,7 +57,7 @@ struct generator_t {
         * @param lenpos                receives a pointer to fill in length value
         * @param return                chunk to internal buffer.
         */
-       chunk_t (*get_chunk) (generator_t *this, u_int32_t **lenpos);
+       chunk_t (*get_chunk) (generator_t *this, uint32_t **lenpos);
 
        /**
         * Destroys a generator_t object.
index bbdc462..1fd6442 100644 (file)
@@ -829,7 +829,7 @@ typedef struct {
         * fragments we expect.
         * For IKEv2 we store the total number of fragment we received last.
         */
-       u_int16_t last;
+       uint16_t last;
 
        /**
         * Length of all currently received fragments.
@@ -858,12 +858,12 @@ struct private_message_t {
        /**
         * Minor version of message.
         */
-       u_int8_t major_version;
+       uint8_t major_version;
 
        /**
         * Major version of message.
         */
-       u_int8_t minor_version;
+       uint8_t minor_version;
 
        /**
         * First Payload in message.
@@ -903,7 +903,7 @@ struct private_message_t {
        /**
         * Message ID of this message.
         */
-       u_int32_t message_id;
+       uint32_t message_id;
 
        /**
         * ID of assigned IKE_SA.
@@ -953,7 +953,7 @@ struct private_message_t {
 typedef struct {
 
        /** fragment number */
-       u_int8_t num;
+       uint8_t num;
 
        /** fragment data */
        chunk_t data;
@@ -1024,48 +1024,48 @@ METHOD(message_t, get_ike_sa_id, ike_sa_id_t*,
 }
 
 METHOD(message_t, set_message_id, void,
-       private_message_t *this,u_int32_t message_id)
+       private_message_t *this,uint32_t message_id)
 {
        this->message_id = message_id;
 }
 
-METHOD(message_t, get_message_id, u_int32_t,
+METHOD(message_t, get_message_id, uint32_t,
        private_message_t *this)
 {
        return this->message_id;
 }
 
-METHOD(message_t, get_initiator_spi, u_int64_t,
+METHOD(message_t, get_initiator_spi, uint64_t,
        private_message_t *this)
 {
        return (this->ike_sa_id->get_initiator_spi(this->ike_sa_id));
 }
 
-METHOD(message_t, get_responder_spi, u_int64_t,
+METHOD(message_t, get_responder_spi, uint64_t,
        private_message_t *this)
 {
        return (this->ike_sa_id->get_responder_spi(this->ike_sa_id));
 }
 
 METHOD(message_t, set_major_version, void,
-       private_message_t *this, u_int8_t major_version)
+       private_message_t *this, uint8_t major_version)
 {
        this->major_version = major_version;
 }
 
-METHOD(message_t, get_major_version, u_int8_t,
+METHOD(message_t, get_major_version, uint8_t,
        private_message_t *this)
 {
        return this->major_version;
 }
 
 METHOD(message_t, set_minor_version, void,
-       private_message_t *this,u_int8_t minor_version)
+       private_message_t *this,uint8_t minor_version)
 {
        this->minor_version = minor_version;
 }
 
-METHOD(message_t, get_minor_version, u_int8_t,
+METHOD(message_t, get_minor_version, uint8_t,
        private_message_t *this)
 {
        return this->minor_version;
@@ -1331,7 +1331,7 @@ static char* get_string(private_message_t *this, char *buf, int len)
                if (payload->get_type(payload) == PLV2_EAP)
                {
                        eap_payload_t *eap = (eap_payload_t*)payload;
-                       u_int32_t vendor;
+                       uint32_t vendor;
                        eap_type_t type;
                        char method[64] = "";
 
@@ -1790,7 +1790,7 @@ static status_t finalize_message(private_message_t *this, keymat_t *keymat,
 {
        keymat_v1_t *keymat_v1 = (keymat_v1_t*)keymat;
        chunk_t chunk;
-       u_int32_t *lenpos;
+       uint32_t *lenpos;
 
        if (encrypted)
        {
@@ -1893,7 +1893,7 @@ static message_t *clone_message(private_message_t *this)
  * Create a single fragment with the given data
  */
 static message_t *create_fragment(private_message_t *this, payload_type_t next,
-                                                                 u_int16_t num, u_int16_t count, chunk_t data)
+                                                                 uint16_t num, uint16_t count, chunk_t data)
 {
        enumerator_t *enumerator;
        payload_t *fragment, *payload;
@@ -1972,11 +1972,11 @@ METHOD(message_t, fragment, status_t,
        message_t *fragment;
        packet_t *packet;
        payload_type_t next = PL_NONE;
-       u_int16_t num, count;
+       uint16_t num, count;
        host_t *src, *dst;
        chunk_t data;
        status_t status;
-       u_int32_t *lenpos;
+       uint32_t *lenpos;
        size_t len;
 
        src = this->packet->get_source(this->packet);
@@ -2703,7 +2703,7 @@ METHOD(message_t, parse_body, status_t,
 /**
  * Store the fragment data for the fragment with the given fragment number.
  */
-static status_t add_fragment(private_message_t *this, u_int16_t num,
+static status_t add_fragment(private_message_t *this, uint16_t num,
                                                         chunk_t data)
 {
        fragment_t *fragment;
@@ -2777,7 +2777,7 @@ METHOD(message_t, add_fragment_v1, status_t,
 {
        fragment_payload_t *payload;
        chunk_t data;
-       u_int8_t num;
+       uint8_t num;
        status_t status;
 
        if (!this->frag)
@@ -2840,7 +2840,7 @@ METHOD(message_t, add_fragment_v2, status_t,
        payload_t *payload;
        enumerator_t *enumerator;
        chunk_t data;
-       u_int16_t total, num;
+       uint16_t total, num;
        status_t status;
 
        if (!this->frag)
index a03aa8e..8c43729 100644 (file)
@@ -49,56 +49,56 @@ struct message_t {
         *
         * @param major_version major version to set
         */
-       void (*set_major_version) (message_t *this, u_int8_t major_version);
+       void (*set_major_version) (message_t *this, uint8_t major_version);
 
        /**
         * Gets the IKE major version of the message.
         *
         * @return                              major version of the message
         */
-       u_int8_t (*get_major_version) (message_t *this);
+       uint8_t (*get_major_version) (message_t *this);
 
        /**
         * Sets the IKE minor version of the message.
         *
         * @param minor_version minor version to set
         */
-       void (*set_minor_version) (message_t *this, u_int8_t minor_version);
+       void (*set_minor_version) (message_t *this, uint8_t minor_version);
 
        /**
         * Gets the IKE minor version of the message.
         *
         * @return                              minor version of the message
         */
-       u_int8_t (*get_minor_version) (message_t *this);
+       uint8_t (*get_minor_version) (message_t *this);
 
        /**
         * Sets the Message ID of the message.
         *
         * @param message_id    message_id to set
         */
-       void (*set_message_id) (message_t *this, u_int32_t message_id);
+       void (*set_message_id) (message_t *this, uint32_t message_id);
 
        /**
         * Gets the Message ID of the message.
         *
         * @return                              message_id type of the message
         */
-       u_int32_t (*get_message_id) (message_t *this);
+       uint32_t (*get_message_id) (message_t *this);
 
        /**
         * Gets the initiator SPI of the message.
         *
         * @return                              initiator spi of the message
         */
-       u_int64_t (*get_initiator_spi) (message_t *this);
+       uint64_t (*get_initiator_spi) (message_t *this);
 
        /**
         * Gets the responder SPI of the message.
         *
         * @return                              responder spi of the message
         */
-       u_int64_t (*get_responder_spi) (message_t *this);
+       uint64_t (*get_responder_spi) (message_t *this);
 
        /**
         * Sets the IKE_SA ID of the message.
index f834036..c9d6b0d 100644 (file)
@@ -61,27 +61,27 @@ struct private_parser_t {
        /**
         * major IKE version
         */
-       u_int8_t major_version;
+       uint8_t major_version;
 
        /**
         * Current bit for reading in input data.
         */
-       u_int8_t bit_pos;
+       uint8_t bit_pos;
 
        /**
         * Current byte for reading in input data.
         */
-       u_int8_t *byte_pos;
+       uint8_t *byte_pos;
 
        /**
         * Input data to parse.
         */
-       u_int8_t *input;
+       uint8_t *input;
 
        /**
         * Roof of input, used for length-checking.
         */
-       u_int8_t *input_roof;
+       uint8_t *input_roof;
 
        /**
         * Set of encoding rules for this parsing session.
@@ -113,9 +113,9 @@ static bool bad_bitpos(private_parser_t *this, int number)
  * Parse a 4-Bit unsigned integer from the current parsing position.
  */
 static bool parse_uint4(private_parser_t *this, int rule_number,
-                                               u_int8_t *output_pos)
+                                               uint8_t *output_pos)
 {
-       if (this->byte_pos + sizeof(u_int8_t) > this->input_roof)
+       if (this->byte_pos + sizeof(uint8_t) > this->input_roof)
        {
                return short_input(this, rule_number);
        }
@@ -150,9 +150,9 @@ static bool parse_uint4(private_parser_t *this, int rule_number,
  * Parse a 8-Bit unsigned integer from the current parsing position.
  */
 static bool parse_uint8(private_parser_t *this, int rule_number,
-                                               u_int8_t *output_pos)
+                                               uint8_t *output_pos)
 {
-       if (this->byte_pos + sizeof(u_int8_t) > this->input_roof)
+       if (this->byte_pos + sizeof(uint8_t) > this->input_roof)
        {
                return short_input(this, rule_number);
        }
@@ -173,9 +173,9 @@ static bool parse_uint8(private_parser_t *this, int rule_number,
  * Parse a 15-Bit unsigned integer from the current parsing position.
  */
 static bool parse_uint15(private_parser_t *this, int rule_number,
-                                                u_int16_t *output_pos)
+                                                uint16_t *output_pos)
 {
-       if (this->byte_pos + sizeof(u_int16_t) > this->input_roof)
+       if (this->byte_pos + sizeof(uint16_t) > this->input_roof)
        {
                return short_input(this, rule_number);
        }
@@ -185,11 +185,11 @@ static bool parse_uint15(private_parser_t *this, int rule_number,
        }
        if (output_pos)
        {
-               memcpy(output_pos, this->byte_pos, sizeof(u_int16_t));
+               memcpy(output_pos, this->byte_pos, sizeof(uint16_t));
                *output_pos = ntohs(*output_pos) & ~0x8000;
                DBG3(DBG_ENC, "   => %hu", *output_pos);
        }
-       this->byte_pos += sizeof(u_int16_t);
+       this->byte_pos += sizeof(uint16_t);
        this->bit_pos = 0;
        return TRUE;
 }
@@ -198,9 +198,9 @@ static bool parse_uint15(private_parser_t *this, int rule_number,
  * Parse a 16-Bit unsigned integer from the current parsing position.
  */
 static bool parse_uint16(private_parser_t *this, int rule_number,
-                                                u_int16_t *output_pos)
+                                                uint16_t *output_pos)
 {
-       if (this->byte_pos + sizeof(u_int16_t) > this->input_roof)
+       if (this->byte_pos + sizeof(uint16_t) > this->input_roof)
        {
                return short_input(this, rule_number);
        }
@@ -210,20 +210,20 @@ static bool parse_uint16(private_parser_t *this, int rule_number,
        }
        if (output_pos)
        {
-               memcpy(output_pos, this->byte_pos, sizeof(u_int16_t));
+               memcpy(output_pos, this->byte_pos, sizeof(uint16_t));
                *output_pos = ntohs(*output_pos);
                DBG3(DBG_ENC, "   => %hu", *output_pos);
        }
-       this->byte_pos += sizeof(u_int16_t);
+       this->byte_pos += sizeof(uint16_t);
        return TRUE;
 }
 /**
  * Parse a 32-Bit unsigned integer from the current parsing position.
  */
 static bool parse_uint32(private_parser_t *this, int rule_number,
-                                                u_int32_t *output_pos)
+                                                uint32_t *output_pos)
 {
-       if (this->byte_pos + sizeof(u_int32_t) > this->input_roof)
+       if (this->byte_pos + sizeof(uint32_t) > this->input_roof)
        {
                return short_input(this, rule_number);
        }
@@ -233,11 +233,11 @@ static bool parse_uint32(private_parser_t *this, int rule_number,
        }
        if (output_pos)
        {
-               memcpy(output_pos, this->byte_pos, sizeof(u_int32_t));
+               memcpy(output_pos, this->byte_pos, sizeof(uint32_t));
                *output_pos = ntohl(*output_pos);
                DBG3(DBG_ENC, "   => %u", *output_pos);
        }
-       this->byte_pos += sizeof(u_int32_t);
+       this->byte_pos += sizeof(uint32_t);
        return TRUE;
 }
 
@@ -245,7 +245,7 @@ static bool parse_uint32(private_parser_t *this, int rule_number,
  * Parse a given amount of bytes and writes them to a specific location
  */
 static bool parse_bytes(private_parser_t *this, int rule_number,
-                                               u_int8_t *output_pos, int bytes)
+                                               uint8_t *output_pos, int bytes)
 {
        if (this->byte_pos + bytes > this->input_roof)
        {
@@ -270,13 +270,13 @@ static bool parse_bytes(private_parser_t *this, int rule_number,
 static bool parse_bit(private_parser_t *this, int rule_number,
                                          bool *output_pos)
 {
-       if (this->byte_pos + sizeof(u_int8_t) > this->input_roof)
+       if (this->byte_pos + sizeof(uint8_t) > this->input_roof)
        {
                return short_input(this, rule_number);
        }
        if (output_pos)
        {
-               u_int8_t mask;
+               uint8_t mask;
                mask = 0x01 << (7 - this->bit_pos);
                *output_pos = *this->byte_pos & mask;
 
@@ -312,7 +312,7 @@ static bool parse_list(private_parser_t *this, int rule_number,
        }
        while (length > 0)
        {
-               u_int8_t *pos_before = this->byte_pos;
+               uint8_t *pos_before = this->byte_pos;
                payload_t *payload;
 
                DBG2(DBG_ENC, "  %d bytes left, parsing recursively %N",
@@ -368,7 +368,7 @@ METHOD(parser_t, parse_payload, status_t,
        payload_t *pld;
        void *output;
        int payload_length = 0, spi_size = 0, attribute_length = 0, header_length;
-       u_int16_t ts_type = 0;
+       uint16_t ts_type = 0;
        bool attribute_format = FALSE;
        int rule_number, rule_count;
        encoding_rule_t *rule;
@@ -468,7 +468,7 @@ METHOD(parser_t, parse_payload, status_t,
                                        return PARSE_ERROR;
                                }
                                /* parsed u_int16 should be aligned */
-                               payload_length = *(u_int16_t*)(output + rule->offset);
+                               payload_length = *(uint16_t*)(output + rule->offset);
                                /* all payloads must have at least 4 bytes header */
                                if (payload_length < 4)
                                {
@@ -484,7 +484,7 @@ METHOD(parser_t, parse_payload, status_t,
                                        pld->destroy(pld);
                                        return PARSE_ERROR;
                                }
-                               spi_size = *(u_int8_t*)(output + rule->offset);
+                               spi_size = *(uint8_t*)(output + rule->offset);
                                break;
                        }
                        case SPI:
@@ -564,7 +564,7 @@ METHOD(parser_t, parse_payload, status_t,
                                        pld->destroy(pld);
                                        return PARSE_ERROR;
                                }
-                               attribute_length = *(u_int16_t*)(output + rule->offset);
+                               attribute_length = *(uint16_t*)(output + rule->offset);
                                break;
                        }
                        case ATTRIBUTE_LENGTH_OR_VALUE:
@@ -574,7 +574,7 @@ METHOD(parser_t, parse_payload, status_t,
                                        pld->destroy(pld);
                                        return PARSE_ERROR;
                                }
-                               attribute_length = *(u_int16_t*)(output + rule->offset);
+                               attribute_length = *(uint16_t*)(output + rule->offset);
                                break;
                        }
                        case ATTRIBUTE_VALUE:
@@ -595,7 +595,7 @@ METHOD(parser_t, parse_payload, status_t,
                                        pld->destroy(pld);
                                        return PARSE_ERROR;
                                }
-                               ts_type = *(u_int8_t*)(output + rule->offset);
+                               ts_type = *(uint8_t*)(output + rule->offset);
                                break;
                        }
                        case ADDRESS:
@@ -642,7 +642,7 @@ METHOD(parser_t, reset_context, void,
 }
 
 METHOD(parser_t, set_major_version, void,
-       private_parser_t *this, u_int8_t major_version)
+       private_parser_t *this, uint8_t major_version)
 {
        this->major_version = major_version;
 }
index 5fd3e86..8f07355 100644 (file)
@@ -68,7 +68,7 @@ struct parser_t {
         *
         * @param major_version the major IKE version
         */
-       void (*set_major_version) (parser_t *this, u_int8_t major_version);
+       void (*set_major_version) (parser_t *this, uint8_t major_version);
 
        /**
         * Destroys a parser_t object.
index ee3ed54..9d03bb6 100644 (file)
@@ -35,7 +35,7 @@ struct private_auth_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -50,17 +50,17 @@ struct private_auth_payload_t {
        /**
         * Reserved bytes
         */
-       u_int8_t reserved_byte[3];
+       uint8_t reserved_byte[3];
 
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Method of the AUTH Data.
         */
-       u_int8_t auth_method;
+       uint8_t auth_method;
 
        /**
         * The contained auth data value.
index 43993ae..ea25ca7 100644 (file)
@@ -55,7 +55,7 @@ struct private_cert_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -70,12 +70,12 @@ struct private_cert_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Encoding of the CERT Data.
         */
-       u_int8_t encoding;
+       uint8_t encoding;
 
        /**
         * The contained cert data value.
index 6ac90a2..09bfa24 100644 (file)
@@ -38,7 +38,7 @@ struct private_certreq_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -53,12 +53,12 @@ struct private_certreq_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Encoding of the CERT Data.
         */
-       u_int8_t encoding;
+       uint8_t encoding;
 
        /**
         * The contained certreq data value.
index 4ecdf56..32e4828 100644 (file)
@@ -48,12 +48,12 @@ struct private_configuration_attribute_t {
        /**
         * Type of the attribute.
         */
-       u_int16_t attr_type;
+       uint16_t attr_type;
 
        /**
         * Length of the attribute, value if af_flag set.
         */
-       u_int16_t length_or_value;
+       uint16_t length_or_value;
 
        /**
         * Attribute value as chunk.
@@ -272,7 +272,7 @@ METHOD(configuration_attribute_t, get_chunk, chunk_t,
        return this->value;
 }
 
-METHOD(configuration_attribute_t, get_value, u_int16_t,
+METHOD(configuration_attribute_t, get_value, uint16_t,
        private_configuration_attribute_t *this)
 {
        if (this->af_flag)
@@ -328,7 +328,7 @@ configuration_attribute_t *configuration_attribute_create_chunk(
 
        this = (private_configuration_attribute_t*)
                                                        configuration_attribute_create(type);
-       this->attr_type = ((u_int16_t)attr_type) & 0x7FFF;
+       this->attr_type = ((uint16_t)attr_type) & 0x7FFF;
        this->value = chunk_clone(chunk);
        this->length_or_value = chunk.len;
 
@@ -339,13 +339,13 @@ configuration_attribute_t *configuration_attribute_create_chunk(
  * Described in header.
  */
 configuration_attribute_t *configuration_attribute_create_value(
-                                       configuration_attribute_type_t attr_type, u_int16_t value)
+                                       configuration_attribute_type_t attr_type, uint16_t value)
 {
        private_configuration_attribute_t *this;
 
        this = (private_configuration_attribute_t*)
                                        configuration_attribute_create(PLV1_CONFIGURATION_ATTRIBUTE);
-       this->attr_type = ((u_int16_t)attr_type) & 0x7FFF;
+       this->attr_type = ((uint16_t)attr_type) & 0x7FFF;
        this->length_or_value = value;
        this->af_flag = TRUE;
 
index 946c1b5..417ba73 100644 (file)
@@ -57,7 +57,7 @@ struct configuration_attribute_t {
         *
         * @return              attribute value
         */
-       u_int16_t (*get_value) (configuration_attribute_t *this);
+       uint16_t (*get_value) (configuration_attribute_t *this);
 
        /**
         * Destroys an configuration_attribute_t object.
@@ -92,6 +92,6 @@ configuration_attribute_t *configuration_attribute_create_chunk(
  * @return                     created PLV1_CONFIGURATION_ATTRIBUTE configuration attribute
  */
 configuration_attribute_t *configuration_attribute_create_value(
-                                       configuration_attribute_type_t attr_type, u_int16_t value);
+                                       configuration_attribute_type_t attr_type, uint16_t value);
 
 #endif /** CONFIGURATION_ATTRIBUTE_H_ @}*/
index ef9df84..d86693e 100644 (file)
@@ -44,7 +44,7 @@ struct private_cp_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Critical flag.
@@ -59,17 +59,17 @@ struct private_cp_payload_t {
        /**
         * Reserved bytes
         */
-       u_int8_t reserved_byte[3];
+       uint8_t reserved_byte[3];
 
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Identifier field, IKEv1 only
         */
-       u_int16_t identifier;
+       uint16_t identifier;
 
        /**
         * List of attributes, as configuration_attribute_t
@@ -79,7 +79,7 @@ struct private_cp_payload_t {
        /**
         * Config Type.
         */
-       u_int8_t cfg_type;
+       uint8_t cfg_type;
 
        /**
         * PLV2_CONFIGURATION or PLV1_CONFIGURATION
@@ -269,13 +269,13 @@ METHOD(cp_payload_t, get_config_type, config_type_t,
        return this->cfg_type;
 }
 
-METHOD(cp_payload_t, get_identifier, u_int16_t,
+METHOD(cp_payload_t, get_identifier, uint16_t,
                         private_cp_payload_t *this)
 {
        return this->identifier;
 }
 METHOD(cp_payload_t, set_identifier, void,
-                        private_cp_payload_t *this, u_int16_t identifier)
+                        private_cp_payload_t *this, uint16_t identifier)
 {
        this->identifier = identifier;
 }
index d466989..3e4763f 100644 (file)
@@ -82,14 +82,14 @@ struct cp_payload_t {
         *
         @param identifier      identifier to set
         */
-       void (*set_identifier) (cp_payload_t *this, u_int16_t identifier);
+       void (*set_identifier) (cp_payload_t *this, uint16_t identifier);
 
        /**
         * Get the configuration payload identifier (IKEv1 only).
         *
         * @return                      identifier
         */
-       u_int16_t (*get_identifier) (cp_payload_t *this);
+       uint16_t (*get_identifier) (cp_payload_t *this);
 
        /**
         * Destroys an cp_payload_t object.
index f11ea48..584e6f2 100644 (file)
@@ -36,7 +36,7 @@ struct private_delete_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -51,27 +51,27 @@ struct private_delete_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * IKEv1 Domain of Interpretation
         */
-       u_int32_t doi;
+       uint32_t doi;
 
        /**
         * Protocol ID.
         */
-       u_int8_t protocol_id;
+       uint8_t protocol_id;
 
        /**
         * SPI Size.
         */
-       u_int8_t spi_size;
+       uint8_t spi_size;
 
        /**
         * Number of SPI's.
         */
-       u_int16_t spi_count;
+       uint16_t spi_count;
 
        /**
         * The contained SPI's.
@@ -257,7 +257,7 @@ METHOD(delete_payload_t, get_protocol_id, protocol_id_t,
 }
 
 METHOD(delete_payload_t, add_spi, void,
-       private_delete_payload_t *this, u_int32_t spi)
+       private_delete_payload_t *this, uint32_t spi)
 {
        switch (this->protocol_id)
        {
@@ -273,7 +273,7 @@ METHOD(delete_payload_t, add_spi, void,
 }
 
 METHOD(delete_payload_t, set_ike_spi, void,
-       private_delete_payload_t *this, u_int64_t spi_i, u_int64_t spi_r)
+       private_delete_payload_t *this, uint64_t spi_i, uint64_t spi_r)
 {
        free(this->spis.ptr);
        this->spis = chunk_cat("cc", chunk_from_thing(spi_i),
@@ -283,15 +283,15 @@ METHOD(delete_payload_t, set_ike_spi, void,
 }
 
 METHOD(delete_payload_t, get_ike_spi, bool,
-       private_delete_payload_t *this, u_int64_t *spi_i, u_int64_t *spi_r)
+       private_delete_payload_t *this, uint64_t *spi_i, uint64_t *spi_r)
 {
        if (this->protocol_id != PROTO_IKE ||
-               this->spis.len < 2 * sizeof(u_int64_t))
+               this->spis.len < 2 * sizeof(uint64_t))
        {
                return FALSE;
        }
-       memcpy(spi_i, this->spis.ptr, sizeof(u_int64_t));
-       memcpy(spi_r, this->spis.ptr + sizeof(u_int64_t), sizeof(u_int64_t));
+       memcpy(spi_i, this->spis.ptr, sizeof(uint64_t));
+       memcpy(spi_r, this->spis.ptr + sizeof(uint64_t), sizeof(uint64_t));
        return TRUE;
 }
 
@@ -306,7 +306,7 @@ typedef struct {
 } spi_enumerator_t;
 
 METHOD(enumerator_t, spis_enumerate, bool,
-       spi_enumerator_t *this, u_int32_t *spi)
+       spi_enumerator_t *this, uint32_t *spi)
 {
        if (this->spis.len >= sizeof(*spi))
        {
@@ -322,7 +322,7 @@ METHOD(delete_payload_t, create_spi_enumerator, enumerator_t*,
 {
        spi_enumerator_t *e;
 
-       if (this->spi_size != sizeof(u_int32_t))
+       if (this->spi_size != sizeof(uint32_t))
        {
                return enumerator_create_empty();
        }
index 6728718..06ed76c 100644 (file)
@@ -51,7 +51,7 @@ struct delete_payload_t {
         *
         * @param spi                   spi to add
         */
-       void (*add_spi) (delete_payload_t *this, u_int32_t spi);
+       void (*add_spi) (delete_payload_t *this, uint32_t spi);
 
        /**
         * Set the IKE SPIs for an IKEv1 delete.
@@ -59,7 +59,7 @@ struct delete_payload_t {
         * @param spi_i                 initiator SPI
         * @param spi_r                 responder SPI
         */
-       void (*set_ike_spi)(delete_payload_t *this, u_int64_t spi_i, u_int64_t spi_r);
+       void (*set_ike_spi)(delete_payload_t *this, uint64_t spi_i, uint64_t spi_r);
 
        /**
         * Get the IKE SPIs from an IKEv1 delete.
@@ -68,12 +68,12 @@ struct delete_payload_t {
         * @param spi_r                 responder SPI
         * @return                              TRUE if SPIs extracted successfully
         */
-       bool (*get_ike_spi)(delete_payload_t *this, u_int64_t *spi_i, u_int64_t *spi_r);
+       bool (*get_ike_spi)(delete_payload_t *this, uint64_t *spi_i, uint64_t *spi_r);
 
        /**
         * Get an enumerator over the SPIs in network order.
         *
-        * @return                              enumerator over SPIs, u_int32_t
+        * @return                              enumerator over SPIs, uint32_t
         */
        enumerator_t *(*create_spi_enumerator) (delete_payload_t *this);
 
index ebdf8a3..8c3fc59 100644 (file)
@@ -38,7 +38,7 @@ struct private_eap_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -53,7 +53,7 @@ struct private_eap_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * EAP message data, if available
@@ -102,8 +102,8 @@ static encoding_rule_t encodings[] = {
 METHOD(payload_t, verify, status_t,
        private_eap_payload_t *this)
 {
-       u_int16_t length;
-       u_int8_t code;
+       uint16_t length;
+       uint8_t code;
 
        if (this->data.len < 4)
        {
@@ -208,7 +208,7 @@ METHOD(eap_payload_t, get_code, eap_code_t,
        return 0;
 }
 
-METHOD(eap_payload_t, get_identifier, u_int8_t,
+METHOD(eap_payload_t, get_identifier, uint8_t,
        private_eap_payload_t *this)
 {
        if (this->data.len > 1)
@@ -224,7 +224,7 @@ METHOD(eap_payload_t, get_identifier, u_int8_t,
  * @return     the new offset or 0 if failed
  */
 static size_t extract_type(private_eap_payload_t *this, size_t offset,
-                                              eap_type_t *type, u_int32_t *vendor)
+                                              eap_type_t *type, uint32_t *vendor)
 {
        if (this->data.len > offset)
        {
@@ -245,7 +245,7 @@ static size_t extract_type(private_eap_payload_t *this, size_t offset,
 }
 
 METHOD(eap_payload_t, get_type, eap_type_t,
-       private_eap_payload_t *this, u_int32_t *vendor)
+       private_eap_payload_t *this, uint32_t *vendor)
 {
        eap_type_t type;
 
@@ -270,7 +270,7 @@ typedef struct {
 } type_enumerator_t;
 
 METHOD(enumerator_t, enumerate_types, bool,
-       type_enumerator_t *this, eap_type_t *type, u_int32_t *vendor)
+       type_enumerator_t *this, eap_type_t *type, uint32_t *vendor)
 {
        this->offset = extract_type(this->payload, this->offset, type, vendor);
        return this->offset;
@@ -281,7 +281,7 @@ METHOD(eap_payload_t, get_types, enumerator_t*,
 {
        type_enumerator_t *enumerator;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
        size_t offset;
 
        offset = extract_type(this, 4, &type, &vendor);
@@ -373,7 +373,7 @@ eap_payload_t *eap_payload_create_data_own(chunk_t data)
 /*
  * Described in header
  */
-eap_payload_t *eap_payload_create_code(eap_code_t code, u_int8_t identifier)
+eap_payload_t *eap_payload_create_code(eap_code_t code, uint8_t identifier)
 {
        chunk_t data;
 
@@ -385,7 +385,7 @@ eap_payload_t *eap_payload_create_code(eap_code_t code, u_int8_t identifier)
 /**
  * Write the given type either expanded or not
  */
-static void write_type(bio_writer_t *writer, eap_type_t type, u_int32_t vendor,
+static void write_type(bio_writer_t *writer, eap_type_t type, uint32_t vendor,
                                           bool expanded)
 {
        if (expanded)
@@ -403,12 +403,12 @@ static void write_type(bio_writer_t *writer, eap_type_t type, u_int32_t vendor,
 /*
  * Described in header
  */
-eap_payload_t *eap_payload_create_nak(u_int8_t identifier, eap_type_t type,
-                                                                         u_int32_t vendor, bool expanded)
+eap_payload_t *eap_payload_create_nak(uint8_t identifier, eap_type_t type,
+                                                                         uint32_t vendor, bool expanded)
 {
        enumerator_t *enumerator;
        eap_type_t reg_type;
-       u_int32_t reg_vendor;
+       uint32_t reg_vendor;
        bio_writer_t *writer;
        chunk_t data;
        bool added_any = FALSE, found_vendor = FALSE;
index e8ed1c5..abaefde 100644 (file)
@@ -72,7 +72,7 @@ struct eap_payload_t {
         *
         * @return                      unique identifier
         */
-       u_int8_t (*get_identifier) (eap_payload_t *this);
+       uint8_t (*get_identifier) (eap_payload_t *this);
 
        /**
         * Get the EAP method type.
@@ -80,13 +80,13 @@ struct eap_payload_t {
         * @param vendor        pointer receiving vendor identifier
         * @return                      EAP method type, vendor specific if vendor != 0
         */
-       eap_type_t (*get_type) (eap_payload_t *this, u_int32_t *vendor);
+       eap_type_t (*get_type) (eap_payload_t *this, uint32_t *vendor);
 
        /**
         * Enumerate the EAP method types contained in an EAP-Nak (i.e. get_type()
         * returns EAP_NAK).
         *
-        * @return                      enumerator over (eap_type_t type, u_int32_t vendor)
+        * @return                      enumerator over (eap_type_t type, uint32_t vendor)
         */
        enumerator_t* (*get_types) (eap_payload_t *this);
 
@@ -136,7 +136,7 @@ eap_payload_t *eap_payload_create_data_own(chunk_t data);
  * @param identifier   EAP identifier to use in payload
  * @return                             eap_payload_t object
  */
-eap_payload_t *eap_payload_create_code(eap_code_t code, u_int8_t identifier);
+eap_payload_t *eap_payload_create_code(eap_code_t code, uint8_t identifier);
 
 /**
  * Creates an eap_payload_t EAP_RESPONSE containing an EAP_NAK.
@@ -147,7 +147,7 @@ eap_payload_t *eap_payload_create_code(eap_code_t code, u_int8_t identifier);
  * @param expanded             TRUE to send an expanded Nak
  * @return                             eap_payload_t object
  */
-eap_payload_t *eap_payload_create_nak(u_int8_t identifier, eap_type_t type,
-                                                                         u_int32_t vendor, bool expanded);
+eap_payload_t *eap_payload_create_nak(uint8_t identifier, eap_type_t type,
+                                                                         uint32_t vendor, bool expanded);
 
 #endif /** EAP_PAYLOAD_H_ @}*/
index 54830bc..442bf74 100644 (file)
@@ -289,10 +289,10 @@ enum encoding_type_t {
        /**
         * Representating an IKE_SPI field in an IKEv2 Header.
         *
-        * When generating the value of the u_int64_t pointing to
+        * When generating the value of the uint64_t pointing to
         * is written (host and networ order is not changed).
         *
-        * When parsing 8 bytes are read and written into the u_int64_t pointing to.
+        * When parsing 8 bytes are read and written into the uint64_t pointing to.
         */
        IKE_SPI,
 
@@ -342,7 +342,7 @@ struct encoding_rule_t {
         * When generating, data are read from this offset in the
         * data struct.
         */
-       u_int32_t offset;
+       uint32_t offset;
 };
 
 #endif /** ENCODINGS_H_ @}*/
index 1c2cc37..6ff61dd 100644 (file)
@@ -42,14 +42,14 @@ struct encrypted_fragment_payload_t {
         *
         * @return                      fragment number
         */
-       u_int16_t (*get_fragment_number)(encrypted_fragment_payload_t *this);
+       uint16_t (*get_fragment_number)(encrypted_fragment_payload_t *this);
 
        /**
         * Get the total number of fragments.
         *
         * @return                      total number of fragments
         */
-       u_int16_t (*get_total_fragments)(encrypted_fragment_payload_t *this);
+       uint16_t (*get_total_fragments)(encrypted_fragment_payload_t *this);
 
        /**
         * Get the (decrypted) content of this payload.
@@ -80,6 +80,6 @@ encrypted_fragment_payload_t *encrypted_fragment_payload_create();
  * @return                     encrypted_fragment_payload_t object
  */
 encrypted_fragment_payload_t *encrypted_fragment_payload_create_from_data(
-                                                               u_int16_t num, u_int16_t total, chunk_t data);
+                                                               uint16_t num, uint16_t total, chunk_t data);
 
 #endif /** ENCRYPTED_FRAGMENT_PAYLOAD_H_ @}*/
index d1a2678..a033f60 100644 (file)
@@ -43,17 +43,17 @@ struct private_encrypted_payload_t {
         * next_payload means here the first payload of the
         * contained, encrypted payload.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Flags, including reserved bits
         */
-       u_int8_t flags;
+       uint8_t flags;
 
        /**
         * Length of this payload
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Chunk containing the IV, plain, padding and ICV.
@@ -88,17 +88,17 @@ struct private_encrypted_fragment_payload_t {
         * the original encrypted payload, for all other fragments it MUST be set
         * to zero.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Flags, including reserved bits
         */
-       u_int8_t flags;
+       uint8_t flags;
 
        /**
         * Length of this payload
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Chunk containing the IV, plain, padding and ICV.
@@ -108,12 +108,12 @@ struct private_encrypted_fragment_payload_t {
        /**
         * Fragment number
         */
-       u_int16_t fragment_number;
+       uint16_t fragment_number;
 
        /**
         * Total fragments
         */
-       u_int16_t total_fragments;
+       uint16_t total_fragments;
 
        /**
         * AEAD transform to use
@@ -366,7 +366,7 @@ static chunk_t generate(private_encrypted_payload_t *this,
 {
        payload_t *current, *next;
        enumerator_t *enumerator;
-       u_int32_t *lenpos;
+       uint32_t *lenpos;
        chunk_t chunk = chunk_empty;
 
        enumerator = this->payloads->create_enumerator(this->payloads);
@@ -402,9 +402,9 @@ METHOD(encrypted_payload_t, generate_payloads, void,
 static chunk_t append_header(private_encrypted_payload_t *this, chunk_t assoc)
 {
        struct {
-               u_int8_t next_payload;
-               u_int8_t flags;
-               u_int16_t length;
+               uint8_t next_payload;
+               uint8_t flags;
+               uint16_t length;
        } __attribute__((packed)) header = {
                .next_payload = this->next_payload,
                .flags = this->flags,
@@ -416,7 +416,7 @@ static chunk_t append_header(private_encrypted_payload_t *this, chunk_t assoc)
 /**
  * Encrypts the data in plain and returns it in an allocated chunk.
  */
-static status_t encrypt_content(char *label, aead_t *aead, u_int64_t mid,
+static status_t encrypt_content(char *label, aead_t *aead, uint64_t mid,
                                                        chunk_t plain, chunk_t assoc, chunk_t *encrypted)
 {
        chunk_t iv, padding, icv, crypt;
@@ -486,7 +486,7 @@ static status_t encrypt_content(char *label, aead_t *aead, u_int64_t mid,
 }
 
 METHOD(encrypted_payload_t, encrypt, status_t,
-       private_encrypted_payload_t *this, u_int64_t mid, chunk_t assoc)
+       private_encrypted_payload_t *this, uint64_t mid, chunk_t assoc)
 {
        generator_t *generator;
        chunk_t plain;
@@ -512,7 +512,7 @@ METHOD(encrypted_payload_t, encrypt, status_t,
 }
 
 METHOD(encrypted_payload_t, encrypt_v1, status_t,
-       private_encrypted_payload_t *this, u_int64_t mid, chunk_t iv)
+       private_encrypted_payload_t *this, uint64_t mid, chunk_t iv)
 {
        generator_t *generator;
        chunk_t plain, padding;
@@ -869,13 +869,13 @@ METHOD2(payload_t, encrypted_payload_t, frag_get_length, size_t,
        return this->payload_length;
 }
 
-METHOD(encrypted_fragment_payload_t, get_fragment_number, u_int16_t,
+METHOD(encrypted_fragment_payload_t, get_fragment_number, uint16_t,
        private_encrypted_fragment_payload_t *this)
 {
        return this->fragment_number;
 }
 
-METHOD(encrypted_fragment_payload_t, get_total_fragments, u_int16_t,
+METHOD(encrypted_fragment_payload_t, get_total_fragments, uint16_t,
        private_encrypted_fragment_payload_t *this)
 {
        return this->total_fragments;
@@ -906,11 +906,11 @@ static chunk_t append_header_frag(private_encrypted_fragment_payload_t *this,
                                                                  chunk_t assoc)
 {
        struct {
-               u_int8_t next_payload;
-               u_int8_t flags;
-               u_int16_t length;
-               u_int16_t fragment_number;
-               u_int16_t total_fragments;
+               uint8_t next_payload;
+               uint8_t flags;
+               uint16_t length;
+               uint16_t fragment_number;
+               uint16_t total_fragments;
        } __attribute__((packed)) header = {
                .next_payload = this->next_payload,
                .flags = this->flags,
@@ -922,7 +922,7 @@ static chunk_t append_header_frag(private_encrypted_fragment_payload_t *this,
 }
 
 METHOD(encrypted_payload_t, frag_encrypt, status_t,
-       private_encrypted_fragment_payload_t *this, u_int64_t mid, chunk_t assoc)
+       private_encrypted_fragment_payload_t *this, uint64_t mid, chunk_t assoc)
 {
        status_t status;
 
@@ -1015,7 +1015,7 @@ encrypted_fragment_payload_t *encrypted_fragment_payload_create()
  * Described in header
  */
 encrypted_fragment_payload_t *encrypted_fragment_payload_create_from_data(
-                                                               u_int16_t num, u_int16_t total, chunk_t plain)
+                                                               uint16_t num, uint16_t total, chunk_t plain)
 {
        private_encrypted_fragment_payload_t *this;
 
index be59e3c..19c60c5 100644 (file)
@@ -88,7 +88,7 @@ struct encrypted_payload_t {
         *                                              - FAILED if encryption failed
         *                                              - INVALID_STATE if aead not supplied, but needed
         */
-       status_t (*encrypt) (encrypted_payload_t *this, u_int64_t mid,
+       status_t (*encrypt) (encrypted_payload_t *this, uint64_t mid,
                                                 chunk_t assoc);
 
        /**
index ebe5f32..afeee72 100644 (file)
@@ -33,7 +33,7 @@ struct private_endpoint_notify_t {
        /**
         * Priority
         */
-       u_int32_t priority;
+       uint32_t priority;
 
        /**
         * Family
@@ -83,36 +83,36 @@ static private_endpoint_notify_t *endpoint_notify_create();
 /**
  * Helper functions to parse integer values
  */
-static status_t parse_uint8(u_int8_t **cur, u_int8_t *top, u_int8_t *val)
+static status_t parse_uint8(uint8_t **cur, uint8_t *top, uint8_t *val)
 {
-       if (*cur + sizeof(u_int8_t) > top)
+       if (*cur + sizeof(uint8_t) > top)
        {
                return FAILED;
        }
-       *val =  *(u_int8_t*)*cur;
-       *cur += sizeof(u_int8_t);
+       *val =  *(uint8_t*)*cur;
+       *cur += sizeof(uint8_t);
        return SUCCESS;
 }
 
-static status_t parse_uint16(u_int8_t **cur, u_int8_t *top, u_int16_t *val)
+static status_t parse_uint16(uint8_t **cur, uint8_t *top, uint16_t *val)
 {
-       if (*cur + sizeof(u_int16_t) > top)
+       if (*cur + sizeof(uint16_t) > top)
        {
                return FAILED;
        }
-       *val =  ntohs(*(u_int16_t*)*cur);
-       *cur += sizeof(u_int16_t);
+       *val =  ntohs(*(uint16_t*)*cur);
+       *cur += sizeof(uint16_t);
        return SUCCESS;
 }
 
-static status_t parse_uint32(u_int8_t **cur, u_int8_t *top, u_int32_t *val)
+static status_t parse_uint32(uint8_t **cur, uint8_t *top, uint32_t *val)
 {
-       if (*cur + sizeof(u_int32_t) > top)
+       if (*cur + sizeof(uint32_t) > top)
        {
                return FAILED;
        }
-       *val =  ntohl(*(u_int32_t*)*cur);
-       *cur += sizeof(u_int32_t);
+       *val =  ntohl(*(uint32_t*)*cur);
+       *cur += sizeof(uint32_t);
        return SUCCESS;
 }
 
@@ -121,11 +121,11 @@ static status_t parse_uint32(u_int8_t **cur, u_int8_t *top, u_int32_t *val)
  */
 static status_t parse_notification_data(private_endpoint_notify_t *this, chunk_t data)
 {
-       u_int8_t family, type, addr_family;
-       u_int16_t port;
+       uint8_t family, type, addr_family;
+       uint16_t port;
        chunk_t addr;
-       u_int8_t *cur = data.ptr;
-       u_int8_t *top = data.ptr + data.len;
+       uint8_t *cur = data.ptr;
+       uint8_t *top = data.ptr + data.len;
 
        DBG3(DBG_IKE, "me_endpoint_data %B", &data);
 
@@ -191,9 +191,9 @@ static chunk_t build_notification_data(private_endpoint_notify_t *this)
 {
        chunk_t prio_chunk, family_chunk, type_chunk, port_chunk, addr_chunk;
        chunk_t data;
-       u_int32_t prio;
-       u_int16_t port;
-       u_int8_t family, type;
+       uint32_t prio;
+       uint16_t port;
+       uint8_t family, type;
 
        prio = htonl(this->priority);
        prio_chunk = chunk_from_thing(prio);
@@ -237,14 +237,14 @@ METHOD(endpoint_notify_t, build_notify, notify_payload_t*,
 }
 
 
-METHOD(endpoint_notify_t, get_priority, u_int32_t,
+METHOD(endpoint_notify_t, get_priority, uint32_t,
        private_endpoint_notify_t *this)
 {
        return this->priority;
 }
 
 METHOD(endpoint_notify_t, set_priority, void,
-       private_endpoint_notify_t *this, u_int32_t priority)
+       private_endpoint_notify_t *this, uint32_t priority)
 {
        this->priority = priority;
 }