]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
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 ef00e8c4e6f4249a83d6a689e9d557eb69adc12a..e3505dd9aacd64f85b2bf97808b4ade8771fd587 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 0c6a504e9b178d4846a60fdd961ad5b34dc5df49..23e2b09fa790348e4311868e3b08dc3760a30fe1 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 fc7e89958be3ec7460ccf7627401a17e34b888ab..4cbf8d05b2369dd97475b8373252c54ef1321b40 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 c4953b6aa52ed07f6601062b34f629035fcf14ff..5f2cbfe0ca0a0456b74842934b2531b68b7d2e85 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 2d22fbdc3d5229a9fea6ccd41c55bf3067a6ff10..ba2e164c90bd6bdd37f89b2e490b416e09641431 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 2556f6b8b13b1e2a5a7b53e3a690e31d1a51f028..22d2aac137b7441e0195ea5bf5dc16bd1553b481 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 3a84deffcd94e40224c351f400eecd9d66908ee8..ba646219240e3fea9562805edf2efda52645667e 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 1e1fa4f30fba956fb546625c8beeff92345fdecc..a7cce0f621348b2db6be84ed5fbffb67d2606876 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 336f16ecd5fe04ff0183a83d1144d01e8c6ddfc3..493ea29224dce9ba08894ff5aa952e105d30db57 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 eff0ca91eb7de31e5787064c797ebe77bb45a73e..b9ce837274684a55126040a1b3269f17c3b58a0e 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 d150891eb127892aab3545e60fa7104f65368715..67c1635ef3b0ba7c0adc10cb437558e5732f0084 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 65399f5bcdce5f07881df7e52c96b9c7d523eb68..e8998d5a745fd3506c6e0f9d8f729a2ff5df475c 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 256b63d1baf2503efb99d7bde5035bab00c363b3..36c3c8e74bdc94ff4055f16a107fd630bf389677 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 c83db7ecd9cbcbda2d0d3f72474a8fc9e1ffb23e..907bed9b33d7dab24b608d8694bc9b3ba2881b47 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 ee4404575786333efcc4d0ebc02d0f156ef164aa..c4f8385c0d6e6a9a8c09fb70cb282a628fb6ded4 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 c0d458eae1305b27acf00e8f3ea1b898431d0a77..40629014baca0ad2e7f946d2ec6d5602e34537fd 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 bc2f000713c4a0cfbf9d0a649e82f4d342d95290..42a9cb4e12a8cd8232ae4fa754f09b4358134ff3 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 717bcdbb9d0f155fb1ca7da9c6a602c2bffec325..93c61438eee2f5ba8a223fc2acc8a11b377a30ae 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 bda02580df9dc942c1acf5586fa2ace74dc9b7b0..cc4d5afe46a909ae18d083497162a78d393230fe 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 b1a1a47231ba1a97a9ce0b7e75e34b51487e23f4..7f6415841939a81c0c55b4f93f220e2cda904025 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 4e572d6087e5d2ee28fdd2981cf2ac01f0dcb564..dd814ad1597aa654c81c4fa763e1b5584b190045 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 488e8df1ca4aea8f3f33cfc1da3086d638d8d1ac..7ce6f1b887b7a36b56be1c41f19c05f5e325cce2 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 54c4fe395be6d214059fd4538e13d8a9146c7394..4563d6f9e7f2bff37bf593c0e456019c3b130615 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 7d71da208f19d54fc6144ee3088bb2d0ca6ebdaf..20d33fbcb521dba11dda3d4c20bbaa6152e9bec4 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 7ef3913f754726e46ddd9cbcd6daddbb8263cc24..eb3758d2e944bb1a52aa1db51ad826d70676f13a 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 6432b957f5058e20cc9d7c700722acc35e457ae0..c45162dd2f56c78868e4f1d61515dc60abdf2ccb 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 ea4f92defa4db3b8244666eeb2d53d6ff293b540..b32277f8fa56e5ec5798de2df8bc2c3d314c974d 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 a740303b67b976ed6fc2e394ca8ad10fe1ea0d5f..33b545aadfb2501fecc538112374ae8bb50fbeac 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 acc4b75e975a604306c850bbb9ad91a56d60d2dc..3edb5caa5535c00f32fdf38a5fbd2c93605f07aa 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 5e9366bf5483628640c70b23ff68774216799dde..6724841d957a5d175c85829de9407a866f2ef86e 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 99e4d77e6dc82966732154e2d40aa4c56dd06fe8..d9516a3308bcf07cda87cec1a8d91a3d687f4716 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 4b4c67cc4bc8d8a55e5b4383e32a7d45e6323abe..2e84b0e7ab825419e4a2e500634db9cdbadf0fcc 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 38c34e460e3459340cb5b5addc7086a00a6b5e43..d5e64568fd589ebd9cf5c6d696cd0407562999b8 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 fd5ad37a212dade1ebfe5a8841f59e6d14af4a83..0d2b581483695f1466bb85a69e6b207d500f950b 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 7379d1a942a3feec030cb634ff783209fc6aa756..7a1e995a3361c7448f612e65a39170f9313d3968 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 833c3e95019180bd597479a7a0ed14173e4d8144..a2b7c280387327ed75e8b8b2bdadde49a98f50aa 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 53ded6be7f82889e13422ad80049d17a190d2f70..e17d629d225b51cc4f022221e9fca31f34fd8e65 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 b6757b140939118176633a40bb25411893d63805..8746cb89d1a09190fbc552a67b91b2e5f0b9f749 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 c7a8d8d1e97b39fa5cab26e67a7a9efd2f179576..be2726ede4429746eaf3486516ab48f1d8df0125 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 3d3c7419b201442c22157a50adbc4e1ff1d7178e..8e5c522d2bec90a71a83ee533c408496b0f2be67 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 22641f77e22f83572272b5cfbf7a4a83a2741a4b..0281f5a5c6dad9ea7a0ac9db94d28886102ce36a 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 a720e1493b28793254a2385ba1e1caed5d121dbd..a92622c1e332084e172c5639510eaf3dcb5a8778 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 a72960f4f01cc006b7b5e97f9be7e52b946348ff..c6d9554ce37d07d2b6c856ad2db2902e926e5422 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 d28a7950721f64414c5fa21b7b4d65aa511643a1..4eebfb09d16ab0ceb9d79ee5ef42bd9514769978 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 b612a2ef1d15f1f83746bcce4ce2da17ee2648e0..a4646af87a9b9a06198679b30d08a69648ff7953 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 95b6a00ead4d6bdef1bf3cbb20cb56be6eb03444..0315e4ebc330e0f979020f3c1385b454e5e9c78e 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 78b8688682febad93e171b88ab2a5be110ab7ec3..f9f277820bc7caf367c234dd7ddfa45927f66414 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 6dd54b473b138d71098fc072263219b9ec6534a7..3aed41418ce85feb16c67dc0da4cfe73bb5ef43c 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 5ffeac522ffee1c598d88974ac639b0d540b9fbb..9524f53b970d22a808777b6125aa77be81978ec3 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 a0a508f53cf02b52ebc9a4a082e302e315bf51ab..41aacd4edbcb2440d086fc90105acf1355770b1e 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 c2c0aad2a663c5fb0a4a730812060da9d121a9ab..375530776d2aa549de42fff72fdc5f0fdf02182d 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 bbdc4629d2d827000e9e900e5cbf445202d81297..1fd644203bffe0e01ded0dfb318df92701e348dd 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 a03aa8e96a4d64e83736619dc3273c907ee62d07..8c4372974d62a3a719a4e422f452f66bab4e2e50 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 f8340367eb1a6d4130b839e489a115dbc929ffe3..c9d6b0d8f6031e725de70cc8ec77d5c49a2b4806 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 5fd3e86ee640f72f9de9ae4fd227287e231512f8..8f073556e7a33e64150963e456b19b2e61d40e9f 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 ee3ed54fd0a38e8bf584cb385cc8857c9b145df9..9d03bb69411d218a9f0059d3e6debd66d1d0e2dc 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 43993ae48e73dd627ad959a2d4da3260d547666d..ea25ca73c3c251923091ec6010a0aba8ac9fb245 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 6ac90a2a0b1de81b5b4257d5eb20cf5bd34d0b57..09bfa24584491d82f81a24119b6950454a12b371 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 4ecdf569d59bf91d6784fdab7f1be79f275e89a5..32e4828badb7957e7151ab60ded8816f01248afe 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 946c1b500047dd9ddc7250748f80b7f285962e77..417ba731b9e91419eb1b3f57962c55d8e62e3122 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 ef9df84f754755b4bea8717a041f3efe0f3597dc..d86693ee2105c7dedc9ce52b2ed1cafbddf0ff1d 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 d466989d67f69a591b202f2254110077d6eaebc8..3e4763fb67fc13151ffca78633e81c6835dcb807 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 f11ea485cf549115e9adaa9f80ad57e43845703f..584e6f22b81fac8f24f4dfaf9388c3c7d44ae859 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 6728718cdc3da5f3e4ba1969db0fccc88074a912..06ed76c2ec5630dcadf2fdde0d6c18ba0d14902b 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 ebdf8a3fe11a23ad224cdb9ab78c2f5b4881cf73..8c3fc5933bd8b2df225f6fbe440f93d1cca48ece 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 e8ed1c5e7e57d910f398ed6d8775838d3cb92113..abaefde28c3900e2d6dea91a78f32c3e1dc57e29 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 54830bc8c2f028c8b87fdf3e5c31d22490f2a29f..442bf74891993656a8de00f9093f05fb2d141328 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 1c2cc379f2f3ff9f3f2d4bc0097445edb39b58cd..6ff61dd6523b670ef48e092f86ba5429ea80f7b7 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 d1a267836ab9280c1bfab24590d9db5f4d1d4d5a..a033f60816865dc1168362e58f9a766b2b7d629f 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 be59e3c2d9e7a9b73d6ce531aa3369c613ab357f..19c60c5be0f842517d7f2d062997e79a7888fca3 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 ebe5f32f7d28fcdd039dae14e1eb741e8ad5ce69..afeee72e419653af2074a018fe830b700a6a9685 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;
 }
index 853aadf3d87ca04816fe123ab84afca20ae48884..f4cf89fd767b8cd626b57a46c578e9f33847c464 100644 (file)
@@ -82,14 +82,14 @@ struct endpoint_notify_t {
         *
         * @return                      priority
         */
-       u_int32_t (*get_priority) (endpoint_notify_t *this);
+       uint32_t (*get_priority) (endpoint_notify_t *this);
 
        /**
         * Sets the priority of this endpoint.
         *
         * @param priority      priority
         */
-       void (*set_priority) (endpoint_notify_t *this, u_int32_t priority);
+       void (*set_priority) (endpoint_notify_t *this, uint32_t priority);
 
        /**
         * Returns the endpoint type of this endpoint.
index 7f158f5481926aa578ee4566b7e385eb2b893d10..fecd05f056e9460e839a956e8c6aeece8763f7cd 100644 (file)
@@ -35,32 +35,32 @@ struct private_fragment_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Reserved byte
         */
-       u_int8_t reserved;
+       uint8_t reserved;
 
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Fragment ID.
         */
-       u_int16_t fragment_id;
+       uint16_t fragment_id;
 
        /**
         * Fragment number.
         */
-       u_int8_t fragment_number;
+       uint8_t fragment_number;
 
        /**
         * Flags
         */
-       u_int8_t flags;
+       uint8_t flags;
 
        /**
         * The contained fragment data.
@@ -145,13 +145,13 @@ METHOD(payload_t, get_length, size_t,
        return this->payload_length;
 }
 
-METHOD(fragment_payload_t, get_id, u_int16_t,
+METHOD(fragment_payload_t, get_id, uint16_t,
        private_fragment_payload_t *this)
 {
        return this->fragment_id;
 }
 
-METHOD(fragment_payload_t, get_number, u_int8_t,
+METHOD(fragment_payload_t, get_number, uint8_t,
        private_fragment_payload_t *this)
 {
        return this->fragment_number;
@@ -210,7 +210,7 @@ fragment_payload_t *fragment_payload_create()
 /*
  * Described in header
  */
-fragment_payload_t *fragment_payload_create_from_data(u_int8_t num, bool last,
+fragment_payload_t *fragment_payload_create_from_data(uint8_t num, bool last,
                                                                                                          chunk_t data)
 {
        private_fragment_payload_t *this;
index a49cf32ddfbf87f70f12c132c9407ae84d429679..a756601a01d46cd10bc4b035172eb3607e4565b9 100644 (file)
@@ -42,14 +42,14 @@ struct fragment_payload_t {
         *
         * @return                              fragment ID
         */
-       u_int16_t (*get_id)(fragment_payload_t *this);
+       uint16_t (*get_id)(fragment_payload_t *this);
 
        /**
         * Get the fragment number. Defines the order of the fragments.
         *
         * @return                              fragment number
         */
-       u_int8_t (*get_number)(fragment_payload_t *this);
+       uint8_t (*get_number)(fragment_payload_t *this);
 
        /**
         * Check if this is the last fragment.
@@ -88,7 +88,7 @@ fragment_payload_t *fragment_payload_create();
  * @param data         fragment data (gets cloned)
  * @return                     fragment_payload_t object
  */
-fragment_payload_t *fragment_payload_create_from_data(u_int8_t num, bool last,
+fragment_payload_t *fragment_payload_create_from_data(uint8_t num, bool last,
                                                                                                          chunk_t data);
 
 #endif /** FRAGMENT_PAYLOAD_H_ @}*/
index a12b018e5090b866921a5e2028bdfff299266701..eac820742a64edfe28f756840b23974bf40c4a25 100644 (file)
@@ -34,17 +34,17 @@ struct private_hash_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Reserved byte
         */
-       u_int8_t reserved;
+       uint8_t reserved;
 
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * The contained hash value.
index bb8aab748058923924e5f4ea2a65c0e59d2e904d..ae0b19a9d0448f7e16b0b021ae8b04ee8ffb6f81 100644 (file)
@@ -38,7 +38,7 @@ struct private_id_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Critical flag.
@@ -53,17 +53,17 @@ struct private_id_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;
 
        /**
         * Type of the ID Data.
         */
-       u_int8_t id_type;
+       uint8_t id_type;
 
        /**
         * The contained id data value.
@@ -73,12 +73,12 @@ struct private_id_payload_t {
        /**
         * Tunneled protocol ID for IKEv1 quick modes.
         */
-       u_int8_t protocol_id;
+       uint8_t protocol_id;
 
        /**
         * Tunneled port for IKEv1 quick modes.
         */
-       u_int16_t port;
+       uint16_t port;
 
        /**
         * one of PLV2_ID_INITIATOR, PLV2_ID_RESPONDER, IDv1 and PLV1_NAT_OA
@@ -334,7 +334,7 @@ METHOD(id_payload_t, get_ts, traffic_selector_t*,
 METHOD(id_payload_t, get_encoded, chunk_t,
        private_id_payload_t *this)
 {
-       u_int16_t port = htons(this->port);
+       uint16_t port = htons(this->port);
        return chunk_cat("cccc", chunk_from_thing(this->id_type),
                                         chunk_from_thing(this->protocol_id),
                                         chunk_from_thing(port), this->id_data);
@@ -400,7 +400,7 @@ id_payload_t *id_payload_create_from_identification(payload_type_t type,
 id_payload_t *id_payload_create_from_ts(traffic_selector_t *ts)
 {
        private_id_payload_t *this;
-       u_int8_t mask;
+       uint8_t mask;
        host_t *net;
 
        this = (private_id_payload_t*)id_payload_create(PLV1_ID);
@@ -419,7 +419,7 @@ id_payload_t *id_payload_create_from_ts(traffic_selector_t *ts)
        }
        else if (ts->to_subnet(ts, &net, &mask))
        {
-               u_int8_t netmask[16], len, byte;
+               uint8_t netmask[16], len, byte;
 
                if (ts->get_type(ts) == TS_IPV4_ADDR_RANGE)
                {
index c96738a347f490c8e3402eea8aa969f3caa0b8ec..61a0424e32c0bb285ae26bc0dc9220b2b000f60d 100644 (file)
@@ -37,31 +37,31 @@ struct private_ike_header_t {
        /**
         * SPI of the initiator.
         */
-       u_int64_t initiator_spi;
+       uint64_t initiator_spi;
 
        /**
         * SPI of the responder.
         */
-       u_int64_t responder_spi;
+       uint64_t responder_spi;
 
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
        /**
         * IKE major version.
         */
-       u_int8_t  maj_version;
+       uint8_t  maj_version;
 
        /**
         * IKE minor version.
         */
-       u_int8_t  min_version;
+       uint8_t  min_version;
 
        /**
         * Exchange type .
         */
-       u_int8_t  exchange_type;
+       uint8_t  exchange_type;
 
        /**
         * Flags of the Message.
@@ -106,12 +106,12 @@ struct private_ike_header_t {
        /**
         * Associated Message-ID.
         */
-       u_int32_t message_id;
+       uint32_t message_id;
 
        /**
         * Length of the whole IKEv2-Message (header and all payloads).
         */
-       u_int32_t length;
+       uint32_t length;
 };
 
 ENUM_BEGIN(exchange_type_names, ID_PROT, TRANSACTION,
@@ -290,50 +290,50 @@ METHOD(payload_t, get_length, size_t,
        return this->length;
 }
 
-METHOD(ike_header_t, get_initiator_spi, u_int64_t,
+METHOD(ike_header_t, get_initiator_spi, uint64_t,
        private_ike_header_t *this)
 {
        return this->initiator_spi;
 }
 
 METHOD(ike_header_t, set_initiator_spi, void,
-       private_ike_header_t *this, u_int64_t initiator_spi)
+       private_ike_header_t *this, uint64_t initiator_spi)
 {
        this->initiator_spi = initiator_spi;
 }
 
-METHOD(ike_header_t, get_responder_spi, u_int64_t,
+METHOD(ike_header_t, get_responder_spi, uint64_t,
        private_ike_header_t *this)
 {
        return this->responder_spi;
 }
 
 METHOD(ike_header_t, set_responder_spi, void,
-       private_ike_header_t *this, u_int64_t responder_spi)
+       private_ike_header_t *this, uint64_t responder_spi)
 {
        this->responder_spi = responder_spi;
 }
 
-METHOD(ike_header_t, get_maj_version, u_int8_t,
+METHOD(ike_header_t, get_maj_version, uint8_t,
        private_ike_header_t *this)
 {
        return this->maj_version;
 }
 
 METHOD(ike_header_t, set_maj_version, void,
-       private_ike_header_t *this, u_int8_t major)
+       private_ike_header_t *this, uint8_t major)
 {
        this->maj_version = major;
 }
 
-METHOD(ike_header_t, get_min_version, u_int8_t,
+METHOD(ike_header_t, get_min_version, uint8_t,
        private_ike_header_t *this)
 {
        return this->min_version;
 }
 
 METHOD(ike_header_t, set_min_version, void,
-       private_ike_header_t *this, u_int8_t minor)
+       private_ike_header_t *this, uint8_t minor)
 {
        this->min_version = minor;
 }
@@ -411,26 +411,26 @@ METHOD(ike_header_t, set_authonly_flag, void,
        this->flags.authonly = authonly;
 }
 
-METHOD(ike_header_t, get_exchange_type, u_int8_t,
+METHOD(ike_header_t, get_exchange_type, uint8_t,
        private_ike_header_t *this)
 {
        return this->exchange_type;
 }
 
 METHOD(ike_header_t, set_exchange_type, void,
-       private_ike_header_t *this, u_int8_t exchange_type)
+       private_ike_header_t *this, uint8_t exchange_type)
 {
        this->exchange_type = exchange_type;
 }
 
-METHOD(ike_header_t, get_message_id, u_int32_t,
+METHOD(ike_header_t, get_message_id, uint32_t,
        private_ike_header_t *this)
 {
        return this->message_id;
 }
 
 METHOD(ike_header_t, set_message_id, void,
-       private_ike_header_t *this, u_int32_t message_id)
+       private_ike_header_t *this, uint32_t message_id)
 {
        this->message_id = message_id;
 }
index d9a44dd0cc858cb339606e4a672fd07a66a02b4a..fa89c393910412d89328e4124c81820f01e01d2a 100644 (file)
@@ -153,56 +153,56 @@ struct ike_header_t {
         *
         * @return                              initiator_spi
         */
-       u_int64_t (*get_initiator_spi) (ike_header_t *this);
+       uint64_t (*get_initiator_spi) (ike_header_t *this);
 
        /**
         * Set the initiator spi.
         *
         * @param initiator_spi initiator_spi
         */
-       void (*set_initiator_spi) (ike_header_t *this, u_int64_t initiator_spi);
+       void (*set_initiator_spi) (ike_header_t *this, uint64_t initiator_spi);
 
        /**
         * Get the responder spi.
         *
         * @return                              responder_spi
         */
-       u_int64_t (*get_responder_spi) (ike_header_t *this);
+       uint64_t (*get_responder_spi) (ike_header_t *this);
 
        /**
         * Set the responder spi.
         *
         * @param responder_spi responder_spi
         */
-       void (*set_responder_spi) (ike_header_t *this, u_int64_t responder_spi);
+       void (*set_responder_spi) (ike_header_t *this, uint64_t responder_spi);
 
        /**
         * Get the major version.
         *
         * @return                              major version
         */
-       u_int8_t (*get_maj_version) (ike_header_t *this);
+       uint8_t (*get_maj_version) (ike_header_t *this);
 
        /**
         * Set the major version.
         *
         * @param major                 major version
         */
-       void (*set_maj_version) (ike_header_t *this, u_int8_t major);
+       void (*set_maj_version) (ike_header_t *this, uint8_t major);
 
        /**
         * Get the minor version.
         *
         * @return                              minor version
         */
-       u_int8_t (*get_min_version) (ike_header_t *this);
+       uint8_t (*get_min_version) (ike_header_t *this);
 
        /**
         * Set the minor version.
         *
         * @param minor                 minor version
         */
-       void (*set_min_version) (ike_header_t *this, u_int8_t minor);
+       void (*set_min_version) (ike_header_t *this, uint8_t minor);
 
        /**
         * Get the response flag.
@@ -293,28 +293,28 @@ struct ike_header_t {
         *
         * @return                              exchange type
         */
-       u_int8_t (*get_exchange_type) (ike_header_t *this);
+       uint8_t (*get_exchange_type) (ike_header_t *this);
 
        /**
         * Set the  exchange type.
         *
         * @param exchange_type exchange type
         */
-       void (*set_exchange_type) (ike_header_t *this, u_int8_t exchange_type);
+       void (*set_exchange_type) (ike_header_t *this, uint8_t exchange_type);
 
        /**
         * Get the message id.
         *
         * @return                              message id
         */
-       u_int32_t (*get_message_id) (ike_header_t *this);
+       uint32_t (*get_message_id) (ike_header_t *this);
 
        /**
         * Set the message id.
         *
         * @param initiator_spi message id
         */
-       void (*set_message_id) (ike_header_t *this, u_int32_t message_id);
+       void (*set_message_id) (ike_header_t *this, uint32_t message_id);
 
        /**
         * Destroys a ike_header_t object.
index 50fd73f907d776a1214068c2c156ab9ec97b3913..37f3adf88331e1132c5136d9c0b3c35ad8a17f8b 100644 (file)
@@ -36,7 +36,7 @@ struct private_ke_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -51,17 +51,17 @@ struct private_ke_payload_t {
        /**
         * Reserved bytes
         */
-       u_int8_t reserved_byte[2];
+       uint8_t reserved_byte[2];
 
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * DH Group Number.
         */
-       u_int16_t dh_group_number;
+       uint16_t dh_group_number;
 
        /**
         * Key Exchange Data of this KE payload.
index b0d1c601aac1b135a28ef7e1d50971adc392750c..17a0417dc7202e6a9a740759a9ff04fbf37abba8 100644 (file)
@@ -37,7 +37,7 @@ struct private_nonce_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -52,7 +52,7 @@ struct private_nonce_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * The contained nonce value.
index f32a1273f2977144119189143ec17cd9e9969235..ca7ef3a458e25d6ef78560a946fbaad82cead4fe 100644 (file)
@@ -260,7 +260,7 @@ struct private_notify_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -275,27 +275,27 @@ struct private_notify_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Domain of interpretation, IKEv1 only.
         */
-       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;
 
        /**
         * Notify message type.
         */
-       u_int16_t notify_type;
+       uint16_t notify_type;
 
        /**
         * Security parameter index (spi).
@@ -596,14 +596,14 @@ METHOD(payload_t, get_length, size_t,
        return this->payload_length;
 }
 
-METHOD(notify_payload_t, get_protocol_id, u_int8_t,
+METHOD(notify_payload_t, get_protocol_id, uint8_t,
        private_notify_payload_t *this)
 {
        return this->protocol_id;
 }
 
 METHOD(notify_payload_t, set_protocol_id, void,
-       private_notify_payload_t *this, u_int8_t protocol_id)
+       private_notify_payload_t *this, uint8_t protocol_id)
 {
        this->protocol_id = protocol_id;
 }
@@ -620,7 +620,7 @@ METHOD(notify_payload_t, set_notify_type, void,
        this->notify_type = notify_type;
 }
 
-METHOD(notify_payload_t, get_spi, u_int32_t,
+METHOD(notify_payload_t, get_spi, uint32_t,
        private_notify_payload_t *this)
 {
        switch (this->protocol_id)
@@ -629,7 +629,7 @@ METHOD(notify_payload_t, get_spi, u_int32_t,
                case PROTO_ESP:
                        if (this->spi.len == 4)
                        {
-                               return *((u_int32_t*)this->spi.ptr);
+                               return *((uint32_t*)this->spi.ptr);
                        }
                default:
                        break;
@@ -638,7 +638,7 @@ METHOD(notify_payload_t, get_spi, u_int32_t,
 }
 
 METHOD(notify_payload_t, set_spi, void,
-       private_notify_payload_t *this, u_int32_t spi)
+       private_notify_payload_t *this, uint32_t spi)
 {
        chunk_free(&this->spi);
        switch (this->protocol_id)
@@ -646,7 +646,7 @@ METHOD(notify_payload_t, set_spi, void,
                case PROTO_AH:
                case PROTO_ESP:
                        this->spi = chunk_alloc(4);
-                       *((u_int32_t*)this->spi.ptr) = spi;
+                       *((uint32_t*)this->spi.ptr) = spi;
                        break;
                default:
                        break;
index 69075738331467837ac173c0db264c30604bf314..04160bbfcab1da805b41d43ce3e5e48976d3999c 100644 (file)
@@ -200,14 +200,14 @@ struct notify_payload_t {
         *
         * @return                      protocol id of this payload
         */
-       u_int8_t (*get_protocol_id) (notify_payload_t *this);
+       uint8_t (*get_protocol_id) (notify_payload_t *this);
 
        /**
         * Sets the protocol id of this payload.
         *
         * @param protocol_id   protocol id to set
         */
-       void (*set_protocol_id) (notify_payload_t *this, u_int8_t protocol_id);
+       void (*set_protocol_id) (notify_payload_t *this, uint8_t protocol_id);
 
        /**
         * Gets the notify message type of this payload.
@@ -230,7 +230,7 @@ struct notify_payload_t {
         *
         * @return              SPI value
         */
-       u_int32_t (*get_spi) (notify_payload_t *this);
+       uint32_t (*get_spi) (notify_payload_t *this);
 
        /**
         * Sets the spi of this payload.
@@ -239,7 +239,7 @@ struct notify_payload_t {
         *
         * @param spi   SPI value
         */
-       void (*set_spi) (notify_payload_t *this, u_int32_t spi);
+       void (*set_spi) (notify_payload_t *this, uint32_t spi);
 
        /**
         * Returns the currently set spi of this payload.
index f7c2754e05c315a154ec68c2354b7149ce19e9cb..6d1894edbf1d4151965f0aa42d901ddd9257d39d 100644 (file)
@@ -268,7 +268,7 @@ payload_t *payload_create(payload_type_t type)
 /**
  * See header.
  */
-bool payload_is_known(payload_type_t type, u_int8_t maj_ver)
+bool payload_is_known(payload_type_t type, uint8_t maj_ver)
 {
        if (type >= PL_HEADER)
        {
index 72003894f30783869168f37e219f0a191fbe60fc..8ba1ef9f57c93e06ee7bcba76397c44e4d47ce88 100644 (file)
@@ -413,7 +413,7 @@ payload_t *payload_create(payload_type_t type);
  * @param maj_ver      major IKE version (use 0 to skip version check)
  * @return                     FALSE if payload type handled as unknown payload
  */
-bool payload_is_known(payload_type_t type, u_int8_t maj_ver);
+bool payload_is_known(payload_type_t type, uint8_t maj_ver);
 
 /**
  * Get the value field in a payload using encoding rules.
index 65ce667c76a1a98129596b5b9c622c86b134e442..1e63617e885a0fe6b90646b930135ae1104ba898 100644 (file)
@@ -45,37 +45,37 @@ struct private_proposal_substructure_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * reserved byte
         */
-       u_int8_t reserved;
+       uint8_t reserved;
 
        /**
         * Length of this payload.
         */
-       u_int16_t proposal_length;
+       uint16_t proposal_length;
 
        /**
         * Proposal number.
         */
-       u_int8_t proposal_number;
+       uint8_t proposal_number;
 
        /**
         * Protocol ID.
         */
-       u_int8_t protocol_id;
+       uint8_t protocol_id;
 
        /**
         * SPI size of the following SPI.
         */
-       u_int8_t  spi_size;
+       uint8_t  spi_size;
 
        /**
         * Number of transforms.
         */
-       u_int8_t  transforms_count;
+       uint8_t  transforms_count;
 
        /**
         * SPI is stored as chunk.
@@ -479,24 +479,24 @@ METHOD(proposal_substructure_t, set_is_last_proposal, void,
 }
 
 METHOD(proposal_substructure_t, set_proposal_number, void,
-       private_proposal_substructure_t *this,u_int8_t proposal_number)
+       private_proposal_substructure_t *this,uint8_t proposal_number)
 {
        this->proposal_number = proposal_number;
 }
 
-METHOD(proposal_substructure_t, get_proposal_number, u_int8_t,
+METHOD(proposal_substructure_t, get_proposal_number, uint8_t,
        private_proposal_substructure_t *this)
 {
        return this->proposal_number;
 }
 
 METHOD(proposal_substructure_t, set_protocol_id, void,
-       private_proposal_substructure_t *this,u_int8_t protocol_id)
+       private_proposal_substructure_t *this,uint8_t protocol_id)
 {
        this->protocol_id = protocol_id;
 }
 
-METHOD(proposal_substructure_t, get_protocol_id, u_int8_t,
+METHOD(proposal_substructure_t, get_protocol_id, uint8_t,
        private_proposal_substructure_t *this)
 {
        return this->protocol_id;
@@ -518,7 +518,7 @@ METHOD(proposal_substructure_t, get_spi, chunk_t,
 }
 
 METHOD(proposal_substructure_t, get_cpi, bool,
-       private_proposal_substructure_t *this, u_int16_t *cpi)
+       private_proposal_substructure_t *this, uint16_t *cpi)
 {
 
        transform_substructure_t *transform;
@@ -554,7 +554,7 @@ static void add_to_proposal_v2(proposal_t *proposal,
 {
        transform_attribute_t *tattr;
        enumerator_t *enumerator;
-       u_int16_t key_length = 0;
+       uint16_t key_length = 0;
 
        enumerator = transform->create_attribute_enumerator(transform);
        while (enumerator->enumerate(enumerator, &tattr))
@@ -576,8 +576,8 @@ static void add_to_proposal_v2(proposal_t *proposal,
  * Map IKEv1 to IKEv2 algorithms
  */
 typedef struct {
-       u_int16_t ikev1;
-       u_int16_t ikev2;
+       uint16_t ikev1;
+       uint16_t ikev2;
 } algo_map_t;
 
 /**
@@ -681,8 +681,8 @@ static algo_map_t map_auth[] = {
 /**
  * Map an IKEv1 to an IKEv2 identifier
  */
-static u_int16_t ikev2_from_ikev1(algo_map_t *map, int count, u_int16_t def,
-                                                                 u_int16_t value)
+static uint16_t ikev2_from_ikev1(algo_map_t *map, int count, uint16_t def,
+                                                                 uint16_t value)
 {
        int i;
 
@@ -699,7 +699,7 @@ static u_int16_t ikev2_from_ikev1(algo_map_t *map, int count, u_int16_t def,
 /**
  * Map an IKEv2 to an IKEv1 identifier
  */
-static u_int16_t ikev1_from_ikev2(algo_map_t *map, int count, u_int16_t value)
+static uint16_t ikev1_from_ikev2(algo_map_t *map, int count, uint16_t value)
 {
        int i;
 
@@ -716,7 +716,7 @@ static u_int16_t ikev1_from_ikev2(algo_map_t *map, int count, u_int16_t value)
 /**
  * Get IKEv2 algorithm from IKEv1 identifier
  */
-static u_int16_t get_alg_from_ikev1(transform_type_t type, u_int16_t value)
+static uint16_t get_alg_from_ikev1(transform_type_t type, uint16_t value)
 {
        switch (type)
        {
@@ -737,7 +737,7 @@ static u_int16_t get_alg_from_ikev1(transform_type_t type, u_int16_t value)
 /**
  * Get IKEv1 algorithm from IKEv2 identifier
  */
-static u_int16_t get_ikev1_from_alg(transform_type_t type, u_int16_t value)
+static uint16_t get_ikev1_from_alg(transform_type_t type, uint16_t value)
 {
        switch (type)
        {
@@ -755,8 +755,8 @@ static u_int16_t get_ikev1_from_alg(transform_type_t type, u_int16_t value)
 /**
  * Get IKEv2 algorithm from IKEv1 ESP/AH transform ID
  */
-static u_int16_t get_alg_from_ikev1_transid(transform_type_t type,
-                                                                                       u_int16_t value)
+static uint16_t get_alg_from_ikev1_transid(transform_type_t type,
+                                                                                       uint16_t value)
 {
        switch (type)
        {
@@ -774,8 +774,8 @@ static u_int16_t get_alg_from_ikev1_transid(transform_type_t type,
 /**
  * Get IKEv1 ESP/AH transform ID from IKEv2 identifier
  */
-static u_int16_t get_ikev1_transid_from_alg(transform_type_t type,
-                                                                                       u_int16_t value)
+static uint16_t get_ikev1_transid_from_alg(transform_type_t type,
+                                                                                       uint16_t value)
 {
        switch (type)
        {
@@ -791,7 +791,7 @@ static u_int16_t get_ikev1_transid_from_alg(transform_type_t type,
 /**
  * Get IKEv1 authentication algorithm from IKEv2 identifier
  */
-static u_int16_t get_alg_from_ikev1_auth(u_int16_t value)
+static uint16_t get_alg_from_ikev1_auth(uint16_t value)
 {
        return ikev2_from_ikev1(map_auth, countof(map_auth), AUTH_UNDEFINED, value);
 }
@@ -799,7 +799,7 @@ static u_int16_t get_alg_from_ikev1_auth(u_int16_t value)
 /**
  * Get IKEv1 authentication algorithm from IKEv2 identifier
  */
-static u_int16_t get_ikev1_auth_from_alg(u_int16_t value)
+static uint16_t get_ikev1_auth_from_alg(uint16_t value)
 {
        return ikev1_from_ikev2(map_auth, countof(map_auth), value);
 }
@@ -807,7 +807,7 @@ static u_int16_t get_ikev1_auth_from_alg(u_int16_t value)
 /**
  * Get IKEv1 authentication attribute from auth_method_t
  */
-static u_int16_t get_ikev1_auth(auth_method_t method)
+static uint16_t get_ikev1_auth(auth_method_t method)
 {
        switch (method)
        {
@@ -842,7 +842,7 @@ static u_int16_t get_ikev1_auth(auth_method_t method)
 /**
  * Get IKEv1 encapsulation mode
  */
-static u_int16_t get_ikev1_mode(ipsec_mode_t mode, encap_t udp)
+static uint16_t get_ikev1_mode(ipsec_mode_t mode, encap_t udp)
 {
        switch (mode)
        {
@@ -880,8 +880,8 @@ static void add_to_proposal_v1_ike(proposal_t *proposal,
        transform_attribute_type_t type;
        transform_attribute_t *tattr;
        enumerator_t *enumerator;
-       u_int16_t value, key_length = 0;
-       u_int16_t encr = ENCR_UNDEFINED;
+       uint16_t value, key_length = 0;
+       uint16_t encr = ENCR_UNDEFINED;
 
        enumerator = transform->create_attribute_enumerator(transform);
        while (enumerator->enumerate(enumerator, &tattr))
@@ -932,7 +932,7 @@ static void add_to_proposal_v1(proposal_t *proposal,
        transform_attribute_type_t type;
        transform_attribute_t *tattr;
        enumerator_t *enumerator;
-       u_int16_t encr, value, key_length = 0;
+       uint16_t encr, value, key_length = 0;
 
        enumerator = transform->create_attribute_enumerator(transform);
        while (enumerator->enumerate(enumerator, &tattr))
@@ -985,15 +985,15 @@ METHOD(proposal_substructure_t, get_proposals, void,
        transform_substructure_t *transform;
        enumerator_t *enumerator;
        proposal_t *proposal = NULL;
-       u_int64_t spi = 0;
+       uint64_t spi = 0;
 
        switch (this->spi.len)
        {
                case 4:
-                       spi =  *((u_int32_t*)this->spi.ptr);
+                       spi =  *((uint32_t*)this->spi.ptr);
                        break;
                case 8:
-                       spi = *((u_int64_t*)this->spi.ptr);
+                       spi = *((uint64_t*)this->spi.ptr);
                        break;
                default:
                        break;
@@ -1042,7 +1042,7 @@ METHOD(proposal_substructure_t, create_substructure_enumerator, enumerator_t*,
 /**
  * Get an attribute from any transform, 0 if not found
  */
-static u_int64_t get_attr(private_proposal_substructure_t *this,
+static uint64_t get_attr(private_proposal_substructure_t *this,
                                                  transform_attribute_type_t type)
 {
        enumerator_t *transforms, *attributes;
@@ -1071,7 +1071,7 @@ static u_int64_t get_attr(private_proposal_substructure_t *this,
 /**
  * Look up a lifetime duration of a given kind in all transforms
  */
-static u_int64_t get_life_duration(private_proposal_substructure_t *this,
+static uint64_t get_life_duration(private_proposal_substructure_t *this,
                                transform_attribute_type_t type_attr, ikev1_life_type_t type,
                                transform_attribute_type_t dur_attr)
 {
@@ -1105,10 +1105,10 @@ static u_int64_t get_life_duration(private_proposal_substructure_t *this,
        return 0;
 }
 
-METHOD(proposal_substructure_t, get_lifetime, u_int32_t,
+METHOD(proposal_substructure_t, get_lifetime, uint32_t,
        private_proposal_substructure_t *this)
 {
-       u_int32_t duration;
+       uint32_t duration;
 
        switch (this->protocol_id)
        {
@@ -1129,7 +1129,7 @@ METHOD(proposal_substructure_t, get_lifetime, u_int32_t,
        }
 }
 
-METHOD(proposal_substructure_t, get_lifebytes, u_int64_t,
+METHOD(proposal_substructure_t, get_lifebytes, uint64_t,
        private_proposal_substructure_t *this)
 {
        switch (this->protocol_id)
@@ -1259,11 +1259,11 @@ proposal_substructure_t *proposal_substructure_create(payload_type_t type)
  * Add an IKEv1 IKE proposal to the substructure
  */
 static void set_from_proposal_v1_ike(private_proposal_substructure_t *this,
-                                                                        proposal_t *proposal, u_int32_t lifetime,
+                                                                        proposal_t *proposal, uint32_t lifetime,
                                                                         auth_method_t method, int number)
 {
        transform_substructure_t *transform;
-       u_int16_t alg, key_size;
+       uint16_t alg, key_size;
        enumerator_t *enumerator;
 
        transform = transform_substructure_create_type(PLV1_TRANSFORM_SUBSTRUCTURE,
@@ -1330,11 +1330,11 @@ static void set_from_proposal_v1_ike(private_proposal_substructure_t *this,
  * Add an IKEv1 ESP/AH proposal to the substructure
  */
 static void set_from_proposal_v1(private_proposal_substructure_t *this,
-                               proposal_t *proposal, u_int32_t lifetime, u_int64_t lifebytes,
+                               proposal_t *proposal, uint32_t lifetime, uint64_t lifebytes,
                                ipsec_mode_t mode, encap_t udp, int number)
 {
        transform_substructure_t *transform = NULL;
-       u_int16_t alg, transid, key_size;
+       uint16_t alg, transid, key_size;
        enumerator_t *enumerator;
 
        enumerator = proposal->create_enumerator(proposal, ENCRYPTION_ALGORITHM);
@@ -1420,7 +1420,7 @@ static void set_from_proposal_v2(private_proposal_substructure_t *this,
                                                                 proposal_t *proposal)
 {
        transform_substructure_t *transform;
-       u_int16_t alg, key_size;
+       uint16_t alg, key_size;
        enumerator_t *enumerator;
 
        /* encryption algorithm is only available in ESP */
@@ -1485,8 +1485,8 @@ static void set_from_proposal_v2(private_proposal_substructure_t *this,
  */
 static void set_data(private_proposal_substructure_t *this, proposal_t *proposal)
 {
-       u_int64_t spi64;
-       u_int32_t spi32;
+       uint64_t spi64;
+       uint32_t spi32;
 
        /* add SPI, if necessary */
        switch (proposal->get_protocol(proposal))
@@ -1533,7 +1533,7 @@ proposal_substructure_t *proposal_substructure_create_from_proposal_v2(
  * See header.
  */
 proposal_substructure_t *proposal_substructure_create_from_proposal_v1(
-                       proposal_t *proposal, u_int32_t lifetime, u_int64_t lifebytes,
+                       proposal_t *proposal, uint32_t lifetime, uint64_t lifebytes,
                        auth_method_t auth, ipsec_mode_t mode, encap_t udp)
 {
        private_proposal_substructure_t *this;
@@ -1562,7 +1562,7 @@ proposal_substructure_t *proposal_substructure_create_from_proposal_v1(
  * See header.
  */
 proposal_substructure_t *proposal_substructure_create_from_proposals_v1(
-                       linked_list_t *proposals, u_int32_t lifetime, u_int64_t lifebytes,
+                       linked_list_t *proposals, uint32_t lifetime, uint64_t lifebytes,
                        auth_method_t auth, ipsec_mode_t mode, encap_t udp)
 {
        private_proposal_substructure_t *this = NULL;
@@ -1607,8 +1607,8 @@ proposal_substructure_t *proposal_substructure_create_from_proposals_v1(
  * See header.
  */
 proposal_substructure_t *proposal_substructure_create_for_ipcomp_v1(
-                       u_int32_t lifetime, u_int64_t lifebytes, u_int16_t cpi,
-                       ipsec_mode_t mode, encap_t udp, u_int8_t proposal_number)
+                       uint32_t lifetime, uint64_t lifebytes, uint16_t cpi,
+                       ipsec_mode_t mode, encap_t udp, uint8_t proposal_number)
 {
        private_proposal_substructure_t *this;
        transform_substructure_t *transform;
index c4614b88fade3e8d1ac0dc60d21ebd752acf6817..796c10890573739bde0ceba3aecdd5cf7da760d7 100644 (file)
@@ -59,13 +59,13 @@ struct proposal_substructure_t {
         * @param id                    proposal number to set
         */
        void (*set_proposal_number) (proposal_substructure_t *this,
-                                                                u_int8_t proposal_number);
+                                                                uint8_t proposal_number);
        /**
         * get proposal number of current proposal.
         *
         * @return                      proposal number of current proposal substructure.
         */
-       u_int8_t (*get_proposal_number) (proposal_substructure_t *this);
+       uint8_t (*get_proposal_number) (proposal_substructure_t *this);
 
        /**
         * Sets the protocol id of current proposal.
@@ -73,14 +73,14 @@ struct proposal_substructure_t {
         * @param id            protocol id to set
         */
        void (*set_protocol_id) (proposal_substructure_t *this,
-                                                        u_int8_t protocol_id);
+                                                        uint8_t protocol_id);
 
        /**
         * get protocol id of current proposal.
         *
         * @return                      protocol id of current proposal substructure.
         */
-       u_int8_t (*get_protocol_id) (proposal_substructure_t *this);
+       uint8_t (*get_protocol_id) (proposal_substructure_t *this);
 
        /**
         * Sets the next_payload field of this substructure
@@ -114,7 +114,7 @@ struct proposal_substructure_t {
         * @param cpi           the CPI if a supported algorithm is proposed
         * @return                      TRUE if a supported algorithm is proposed
         */
-       bool (*get_cpi) (proposal_substructure_t *this, u_int16_t *cpi);
+       bool (*get_cpi) (proposal_substructure_t *this, uint16_t *cpi);
 
        /**
         * Get proposals contained in a propsal_substructure_t.
@@ -135,14 +135,14 @@ struct proposal_substructure_t {
         *
         * @return                                      lifetime, in seconds
         */
-       u_int32_t (*get_lifetime)(proposal_substructure_t *this);
+       uint32_t (*get_lifetime)(proposal_substructure_t *this);
 
        /**
         * Get the (shortest) life duration of a proposal (IKEv1 only).
         *
         * @return                                      life duration, in bytes
         */
-       u_int64_t (*get_lifebytes)(proposal_substructure_t *this);
+       uint64_t (*get_lifebytes)(proposal_substructure_t *this);
 
        /**
         * Get the first authentication method from the proposal (IKEv1 only).
@@ -193,7 +193,7 @@ proposal_substructure_t *proposal_substructure_create_from_proposal_v2(
  * @return                     proposal_substructure_t object PLV1_PROPOSAL_SUBSTRUCTURE
  */
 proposal_substructure_t *proposal_substructure_create_from_proposal_v1(
-                       proposal_t *proposal,  u_int32_t lifetime, u_int64_t lifebytes,
+                       proposal_t *proposal,  uint32_t lifetime, uint64_t lifebytes,
                        auth_method_t auth, ipsec_mode_t mode, encap_t udp);
 
 /**
@@ -208,7 +208,7 @@ proposal_substructure_t *proposal_substructure_create_from_proposal_v1(
  * @return                     IKEv1 proposal_substructure_t PLV1_PROPOSAL_SUBSTRUCTURE
  */
 proposal_substructure_t *proposal_substructure_create_from_proposals_v1(
-                       linked_list_t *proposals, u_int32_t lifetime, u_int64_t lifebytes,
+                       linked_list_t *proposals, uint32_t lifetime, uint64_t lifebytes,
                        auth_method_t auth, ipsec_mode_t mode, encap_t udp);
 
 /**
@@ -224,7 +224,7 @@ proposal_substructure_t *proposal_substructure_create_from_proposals_v1(
  * @return                                     IKEv1 proposal_substructure_t PLV1_PROPOSAL_SUBSTRUCTURE
  */
 proposal_substructure_t *proposal_substructure_create_for_ipcomp_v1(
-                       u_int32_t lifetime, u_int64_t lifebytes, u_int16_t cpi,
-                       ipsec_mode_t mode, encap_t udp, u_int8_t proposal_number);
+                       uint32_t lifetime, uint64_t lifebytes, uint16_t cpi,
+                       ipsec_mode_t mode, encap_t udp, uint8_t proposal_number);
 
 #endif /** PROPOSAL_SUBSTRUCTURE_H_ @}*/
index 407038a2db6a20b73efefb6623e7ed009104e47b..9c0b071da7d18b024a9be7e51b08f6083550e634 100644 (file)
@@ -41,7 +41,7 @@ struct private_sa_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -56,7 +56,7 @@ struct private_sa_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Proposals in this payload are stored in a linked_list_t.
@@ -71,12 +71,12 @@ struct private_sa_payload_t {
        /**
         * IKEv1 DOI
         */
-       u_int32_t doi;
+       uint32_t doi;
 
        /**
         * IKEv1 situation
         */
-       u_int32_t situation;
+       uint32_t situation;
 };
 
 /**
@@ -342,7 +342,7 @@ METHOD(sa_payload_t, get_proposals, linked_list_t*,
 }
 
 METHOD(sa_payload_t, get_ipcomp_proposals, linked_list_t*,
-       private_sa_payload_t *this, u_int16_t *cpi)
+       private_sa_payload_t *this, uint16_t *cpi)
 {
        int current_proposal = -1, unsupported_proposal = -1;
        enumerator_t *enumerator;
@@ -353,8 +353,8 @@ METHOD(sa_payload_t, get_ipcomp_proposals, linked_list_t*,
        enumerator = this->proposals->create_enumerator(this->proposals);
        while (enumerator->enumerate(enumerator, &substruct))
        {
-               u_int8_t proposal_number = substruct->get_proposal_number(substruct);
-               u_int8_t protocol_id = substruct->get_protocol_id(substruct);
+               uint8_t proposal_number = substruct->get_proposal_number(substruct);
+               uint8_t protocol_id = substruct->get_protocol_id(substruct);
 
                if (proposal_number == unsupported_proposal)
                {
@@ -403,12 +403,12 @@ METHOD(sa_payload_t, create_substructure_enumerator, enumerator_t*,
        return this->proposals->create_enumerator(this->proposals);
 }
 
-METHOD(sa_payload_t, get_lifetime, u_int32_t,
+METHOD(sa_payload_t, get_lifetime, uint32_t,
        private_sa_payload_t *this)
 {
        proposal_substructure_t *substruct;
        enumerator_t *enumerator;
-       u_int32_t lifetime = 0;
+       uint32_t lifetime = 0;
 
        enumerator = this->proposals->create_enumerator(this->proposals);
        if (enumerator->enumerate(enumerator, &substruct))
@@ -420,12 +420,12 @@ METHOD(sa_payload_t, get_lifetime, u_int32_t,
        return lifetime;
 }
 
-METHOD(sa_payload_t, get_lifebytes, u_int64_t,
+METHOD(sa_payload_t, get_lifebytes, uint64_t,
        private_sa_payload_t *this)
 {
        proposal_substructure_t *substruct;
        enumerator_t *enumerator;
-       u_int64_t lifebytes = 0;
+       uint64_t lifebytes = 0;
 
        enumerator = this->proposals->create_enumerator(this->proposals);
        if (enumerator->enumerate(enumerator, &substruct))
@@ -558,9 +558,9 @@ sa_payload_t *sa_payload_create_from_proposal_v2(proposal_t *proposal)
  * Described in header.
  */
 sa_payload_t *sa_payload_create_from_proposals_v1(linked_list_t *proposals,
-                                                               u_int32_t lifetime, u_int64_t lifebytes,
+                                                               uint32_t lifetime, uint64_t lifebytes,
                                                                auth_method_t auth, ipsec_mode_t mode,
-                                                               encap_t udp, u_int16_t cpi)
+                                                               encap_t udp, uint16_t cpi)
 {
        proposal_substructure_t *substruct;
        private_sa_payload_t *this;
@@ -580,7 +580,7 @@ sa_payload_t *sa_payload_create_from_proposals_v1(linked_list_t *proposals,
        substruct->set_is_last_proposal(substruct, FALSE);
        if (cpi)
        {
-               u_int8_t proposal_number = substruct->get_proposal_number(substruct);
+               uint8_t proposal_number = substruct->get_proposal_number(substruct);
 
                substruct = proposal_substructure_create_for_ipcomp_v1(lifetime,
                                        lifebytes, cpi, mode, udp, proposal_number);
@@ -602,9 +602,9 @@ sa_payload_t *sa_payload_create_from_proposals_v1(linked_list_t *proposals,
  * Described in header.
  */
 sa_payload_t *sa_payload_create_from_proposal_v1(proposal_t *proposal,
-                                                               u_int32_t lifetime, u_int64_t lifebytes,
+                                                               uint32_t lifetime, uint64_t lifebytes,
                                                                auth_method_t auth, ipsec_mode_t mode,
-                                                               encap_t udp, u_int16_t cpi)
+                                                               encap_t udp, uint16_t cpi)
 {
        private_sa_payload_t *this;
        linked_list_t *proposals;
index 0ddf3619cf6b696106a172d62b3f6c799ce52dfc..f01c45130a8b4e68b419f24a19b7dbf776e283d5 100644 (file)
@@ -57,21 +57,21 @@ struct sa_payload_t {
         * @param cpi                   the CPI of the first IPComp (sub)proposal
         * @return                              a list containing proposal_ts
         */
-       linked_list_t *(*get_ipcomp_proposals) (sa_payload_t *this, u_int16_t *cpi);
+       linked_list_t *(*get_ipcomp_proposals) (sa_payload_t *this, uint16_t *cpi);
 
        /**
         * Get the (shortest) lifetime of a proposal (IKEv1 only).
         *
         * @return                                      lifetime, in seconds
         */
-       u_int32_t (*get_lifetime)(sa_payload_t *this);
+       uint32_t (*get_lifetime)(sa_payload_t *this);
 
        /**
         * Get the (shortest) life duration of a proposal (IKEv1 only).
         *
         * @return                                      life duration, in bytes
         */
-       u_int64_t (*get_lifebytes)(sa_payload_t *this);
+       uint64_t (*get_lifebytes)(sa_payload_t *this);
 
        /**
         * Get the first authentication method from the proposal (IKEv1 only).
@@ -138,9 +138,9 @@ sa_payload_t *sa_payload_create_from_proposal_v2(proposal_t *proposal);
  * @return                                     sa_payload_t object
  */
 sa_payload_t *sa_payload_create_from_proposals_v1(linked_list_t *proposals,
-                                                       u_int32_t lifetime, u_int64_t lifebytes,
+                                                       uint32_t lifetime, uint64_t lifebytes,
                                                        auth_method_t auth, ipsec_mode_t mode, encap_t udp,
-                                                       u_int16_t cpi);
+                                                       uint16_t cpi);
 
 /**
  * Creates an IKEv1 sa_payload_t object from a single proposal.
@@ -155,8 +155,8 @@ sa_payload_t *sa_payload_create_from_proposals_v1(linked_list_t *proposals,
  * @return                                     sa_payload_t object
  */
 sa_payload_t *sa_payload_create_from_proposal_v1(proposal_t *proposal,
-                                                       u_int32_t lifetime, u_int64_t lifebytes,
+                                                       uint32_t lifetime, uint64_t lifebytes,
                                                        auth_method_t auth, ipsec_mode_t mode, encap_t udp,
-                                                       u_int16_t cpi);
+                                                       uint16_t cpi);
 
 #endif /** SA_PAYLOAD_H_ @}*/
index 83618ff5d59a9e5dafe36f02a47904ad31fc40ec..f69fee3ae2ce42792feef2863b3a39c844936f67 100644 (file)
@@ -35,27 +35,27 @@ struct private_traffic_selector_substructure_t {
        /**
         * Type of traffic selector.
         */
-       u_int8_t ts_type;
+       uint8_t ts_type;
 
        /**
         * IP Protocol ID.
         */
-       u_int8_t ip_protocol_id;
+       uint8_t ip_protocol_id;
 
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Start port number.
         */
-       u_int16_t start_port;
+       uint16_t start_port;
 
        /**
         * End port number.
         */
-       u_int16_t end_port;
+       uint16_t end_port;
 
        /**
         * Starting address.
index d3fbe84768ce5a19d7a66643b0bfd317a1602114..c7a54435bd0e591893d446f273a245ce3eade424 100644 (file)
@@ -62,7 +62,7 @@ struct traffic_selector_substructure_t {
         * @return                      type of traffic selector
         *
         */
-       u_int8_t (*get_protocol_id) (traffic_selector_substructure_t *this);
+       uint8_t (*get_protocol_id) (traffic_selector_substructure_t *this);
 
        /**
         * Set the IP protocol ID of Traffic selector
@@ -70,7 +70,7 @@ struct traffic_selector_substructure_t {
         * @param protocol_id   protocol ID of traffic selector
         */
        void (*set_protocol_id) (traffic_selector_substructure_t *this,
-                                                         u_int8_t protocol_id);
+                                                         uint8_t protocol_id);
 
        /**
         * Get the start port and address as host_t object.
index 4a5b52dcf46eb506ec91c43bef851e3e55df4133..860607faf4f95a84294ceab482e990e12386ae9f 100644 (file)
@@ -85,12 +85,12 @@ struct private_transform_attribute_t {
        /**
         * Type of the attribute.
         */
-       u_int16_t attribute_type;
+       uint16_t attribute_type;
 
        /**
         * Attribute Length if attribute_format is 0, attribute Value otherwise.
         */
-       u_int16_t attribute_length_or_value;
+       uint16_t attribute_length_or_value;
 
        /**
         * Attribute value as chunk if attribute_format is 0 (FALSE).
@@ -185,10 +185,10 @@ METHOD(transform_attribute_t, get_value_chunk, chunk_t,
        return this->attribute_value;
 }
 
-METHOD(transform_attribute_t, get_value, u_int64_t,
+METHOD(transform_attribute_t, get_value, uint64_t,
        private_transform_attribute_t *this)
 {
-       u_int64_t value = 0;
+       uint64_t value = 0;
 
        if (this->attribute_format)
        {
@@ -203,7 +203,7 @@ METHOD(transform_attribute_t, get_value, u_int64_t,
        return untoh64((char*)&value);
 }
 
-METHOD(transform_attribute_t, get_attribute_type, u_int16_t,
+METHOD(transform_attribute_t, get_attribute_type, uint16_t,
        private_transform_attribute_t *this)
 {
        return this->attribute_type;
@@ -250,7 +250,7 @@ transform_attribute_t *transform_attribute_create(payload_type_t type)
  * Described in header.
  */
 transform_attribute_t *transform_attribute_create_value(payload_type_t type,
-                                                       transform_attribute_type_t kind, u_int64_t value)
+                                                       transform_attribute_type_t kind, uint64_t value)
 {
        private_transform_attribute_t *this;
 
@@ -265,7 +265,7 @@ transform_attribute_t *transform_attribute_create_value(payload_type_t type,
        }
        else if (value <= UINT32_MAX)
        {
-               u_int32_t val32;
+               uint32_t val32;
 
                val32 = htonl(value);
                this->attribute_value = chunk_clone(chunk_from_thing(val32));
index 87e283b184a6304d07361cbf5a6d50380ce84870..2e86a409c2783d18dfbd091d738c75f0c2f03bae 100644 (file)
@@ -109,14 +109,14 @@ struct transform_attribute_t {
         *
         * @return              value
         */
-       u_int64_t (*get_value) (transform_attribute_t *this);
+       uint64_t (*get_value) (transform_attribute_t *this);
 
        /**
         * get the type of the attribute.
         *
         * @return              type of the value
         */
-       u_int16_t (*get_attribute_type) (transform_attribute_t *this);
+       uint16_t (*get_attribute_type) (transform_attribute_t *this);
 
        /**
         * Destroys an transform_attribute_t object.
@@ -141,6 +141,6 @@ transform_attribute_t *transform_attribute_create(payload_type_t type);
  * @return                             transform_attribute_t object
  */
 transform_attribute_t *transform_attribute_create_value(payload_type_t type,
-                                                       transform_attribute_type_t kind, u_int64_t value);
+                                                       transform_attribute_type_t kind, uint64_t value);
 
 #endif /** TRANSFORM_ATTRIBUTE_H_ @}*/
index 6885d61817375888bdf73b1eadd98a607f3f5298..11e4b462d457a996640da2e5c4dc356a066b3128 100644 (file)
@@ -40,32 +40,32 @@ struct private_transform_substructure_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Reserved byte
         */
-       u_int8_t reserved[3];
+       uint8_t reserved[3];
 
        /**
         * Length of this payload.
         */
-       u_int16_t transform_length;
+       uint16_t transform_length;
 
        /**
         * Type or number, Type of the transform in IKEv2, number in IKEv2.
         */
-       u_int8_t transform_ton;
+       uint8_t transform_ton;
 
        /**
         * Transform ID, as encoded in IKEv1.
         */
-       u_int8_t transform_id_v1;
+       uint8_t transform_id_v1;
 
        /**
         * Transform ID, as encoded in IKEv2.
         */
-       u_int16_t transform_id_v2;
+       uint16_t transform_id_v2;
 
        /**
         * Transforms Attributes are stored in a linked_list_t.
@@ -235,13 +235,13 @@ METHOD(payload_t, set_next_type, void,
 {
 }
 
-METHOD(transform_substructure_t, get_transform_type_or_number, u_int8_t,
+METHOD(transform_substructure_t, get_transform_type_or_number, uint8_t,
        private_transform_substructure_t *this)
 {
        return this->transform_ton;
 }
 
-METHOD(transform_substructure_t, get_transform_id, u_int16_t,
+METHOD(transform_substructure_t, get_transform_id, uint16_t,
        private_transform_substructure_t *this)
 {
        if (this->type == PLV2_TRANSFORM_SUBSTRUCTURE)
@@ -303,7 +303,7 @@ transform_substructure_t *transform_substructure_create(payload_type_t type)
  * Described in header
  */
 transform_substructure_t *transform_substructure_create_type(payload_type_t type,
-                               u_int8_t type_or_number, u_int16_t id)
+                               uint8_t type_or_number, uint16_t id)
 {
        private_transform_substructure_t *this;
 
index ba821d3bddfa04269be319f0ec6c1a005df4bfac..e75dc27bbfecbf4742e5def1532ceae337d772a8 100644 (file)
@@ -72,14 +72,14 @@ struct transform_substructure_t {
         *
         * @return                      Transform type of current transform substructure.
         */
-       u_int8_t (*get_transform_type_or_number) (transform_substructure_t *this);
+       uint8_t (*get_transform_type_or_number) (transform_substructure_t *this);
 
        /**
         * Get transform id of the current transform.
         *
         * @return                      Transform id of current transform substructure.
         */
-       u_int16_t (*get_transform_id) (transform_substructure_t *this);
+       uint16_t (*get_transform_id) (transform_substructure_t *this);
 
        /**
         * Create an enumerator over transform attributes.
@@ -111,6 +111,6 @@ transform_substructure_t *transform_substructure_create(payload_type_t type);
  * @return                                     transform_substructure_t object
  */
 transform_substructure_t *transform_substructure_create_type(payload_type_t type,
-                                                                               u_int8_t type_or_number, u_int16_t id);
+                                                                               uint8_t type_or_number, uint16_t id);
 
 #endif /** TRANSFORM_SUBSTRUCTURE_H_ @}*/
index e74b9ae1b849dc4dcd3a8d231560b84a625a4bc5..0b2d4de57703b592785736d5d6dc29e073db23c9 100644 (file)
@@ -42,7 +42,7 @@ struct private_ts_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -62,12 +62,12 @@ struct private_ts_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * Number of traffic selectors
         */
-       u_int8_t ts_num;
+       uint8_t ts_num;
 
        /**
         * Contains the traffic selectors of type traffic_selector_substructure_t.
index c69254fc008c39ee1c12e23ca6a7e2c63e20d50e..adbf2c8f29ffe6f1f2f7f0eef7f7d18d2e2db93c 100644 (file)
@@ -39,7 +39,7 @@ struct private_unknown_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t next_payload;
+       uint8_t next_payload;
 
        /**
         * Critical flag.
@@ -54,7 +54,7 @@ struct private_unknown_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * The contained data.
index 400e0640dfd975c760dc0645fed3233ae2b9cb71..7db9a69d37c45d60bca91c136effd8605f67d5cd 100644 (file)
@@ -34,7 +34,7 @@ struct private_vendor_id_payload_t {
        /**
         * Next payload type.
         */
-       u_int8_t  next_payload;
+       uint8_t  next_payload;
 
        /**
         * Critical flag.
@@ -49,7 +49,7 @@ struct private_vendor_id_payload_t {
        /**
         * Length of this payload.
         */
-       u_int16_t payload_length;
+       uint16_t payload_length;
 
        /**
         * The contained data.
index be37d30e539cc0685763a1a911a3e75e233ec8c9..71121908bc573a4c6ca4515475004017fe7fb25c 100644 (file)
@@ -39,7 +39,7 @@ struct private_kernel_handler_t {
 /**
  * convert an IP protocol identifier to the IKEv2 specific protocol identifier.
  */
-static inline protocol_id_t proto_ip2ike(u_int8_t protocol)
+static inline protocol_id_t proto_ip2ike(uint8_t protocol)
 {
        switch (protocol)
        {
@@ -53,7 +53,7 @@ static inline protocol_id_t proto_ip2ike(u_int8_t protocol)
 }
 
 METHOD(kernel_listener_t, acquire, bool,
-       private_kernel_handler_t *this, u_int32_t reqid,
+       private_kernel_handler_t *this, uint32_t reqid,
        traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
 {
        if (src_ts && dst_ts)
@@ -71,7 +71,7 @@ METHOD(kernel_listener_t, acquire, bool,
 }
 
 METHOD(kernel_listener_t, expire, bool,
-       private_kernel_handler_t *this, u_int8_t protocol, u_int32_t spi,
+       private_kernel_handler_t *this, uint8_t protocol, uint32_t spi,
        host_t *dst, bool hard)
 {
        protocol_id_t proto = proto_ip2ike(protocol);
@@ -93,7 +93,7 @@ METHOD(kernel_listener_t, expire, bool,
 }
 
 METHOD(kernel_listener_t, mapping, bool,
-       private_kernel_handler_t *this, u_int8_t protocol, u_int32_t spi,
+       private_kernel_handler_t *this, uint8_t protocol, uint32_t spi,
        host_t *dst, host_t *remote)
 {
        protocol_id_t proto = proto_ip2ike(protocol);
@@ -108,7 +108,7 @@ METHOD(kernel_listener_t, mapping, bool,
 }
 
 METHOD(kernel_listener_t, migrate, bool,
-       private_kernel_handler_t *this, u_int32_t reqid,
+       private_kernel_handler_t *this, uint32_t reqid,
        traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
        policy_dir_t direction, host_t *local, host_t *remote)
 {
index 40c4ee589df6ffca468aee88bbad3107e225b1d0..bc3f9079d5c7265da1d60213707faf52253d85da 100644 (file)
@@ -62,12 +62,12 @@ struct kernel_algorithm_t {
        /**
         * Identifier specified in IKE
         */
-       u_int16_t ike;
+       uint16_t ike;
 
        /**
         * Identifier as defined in pfkeyv2.h
         */
-       u_int16_t kernel;
+       uint16_t kernel;
 
        /**
         * Name of the algorithm in linux crypto API
@@ -166,7 +166,7 @@ METHOD(kernel_interface_t, get_features, kernel_feature_t,
 
 METHOD(kernel_interface_t, get_spi, status_t,
        private_kernel_interface_t *this, host_t *src, host_t *dst,
-       u_int8_t protocol, u_int32_t *spi)
+       uint8_t protocol, uint32_t *spi)
 {
        if (!this->ipsec)
        {
@@ -177,7 +177,7 @@ METHOD(kernel_interface_t, get_spi, status_t,
 
 METHOD(kernel_interface_t, get_cpi, status_t,
        private_kernel_interface_t *this, host_t *src, host_t *dst,
-       u_int16_t *cpi)
+       uint16_t *cpi)
 {
        if (!this->ipsec)
        {
@@ -191,7 +191,7 @@ METHOD(kernel_interface_t, get_cpi, status_t,
  */
 typedef struct {
        /** allocated reqid */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** references to this entry */
        u_int refs;
        /** inbound mark used for SA */
@@ -327,9 +327,9 @@ static array_t *array_from_ts_list(linked_list_t *list)
 METHOD(kernel_interface_t, alloc_reqid, status_t,
        private_kernel_interface_t *this,
        linked_list_t *local_ts, linked_list_t *remote_ts,
-       mark_t mark_in, mark_t mark_out, u_int32_t *reqid)
+       mark_t mark_in, mark_t mark_out, uint32_t *reqid)
 {
-       static u_int32_t counter = 0;
+       static uint32_t counter = 0;
        reqid_entry_t *entry = NULL, *tmpl;
        status_t status = SUCCESS;
 
@@ -379,7 +379,7 @@ METHOD(kernel_interface_t, alloc_reqid, status_t,
 }
 
 METHOD(kernel_interface_t, release_reqid, status_t,
-       private_kernel_interface_t *this, u_int32_t reqid,
+       private_kernel_interface_t *this, uint32_t reqid,
        mark_t mark_in, mark_t mark_out)
 {
        reqid_entry_t *entry, tmpl = {
@@ -416,10 +416,10 @@ METHOD(kernel_interface_t, release_reqid, status_t,
 
 METHOD(kernel_interface_t, add_sa, status_t,
        private_kernel_interface_t *this, host_t *src, host_t *dst,
-       u_int32_t spi, u_int8_t protocol, u_int32_t reqid, mark_t mark,
-       u_int32_t tfc, lifetime_cfg_t *lifetime, u_int16_t enc_alg, chunk_t enc_key,
-       u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
-       u_int16_t ipcomp, u_int16_t cpi, u_int32_t replay_window,
+       uint32_t spi, uint8_t protocol, uint32_t reqid, mark_t mark,
+       uint32_t tfc, lifetime_cfg_t *lifetime, uint16_t enc_alg, chunk_t enc_key,
+       uint16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
+       uint16_t ipcomp, uint16_t cpi, uint32_t replay_window,
        bool initiator, bool encap, bool esn, bool inbound, bool update,
        linked_list_t *src_ts, linked_list_t *dst_ts)
 {
@@ -434,8 +434,8 @@ METHOD(kernel_interface_t, add_sa, status_t,
 }
 
 METHOD(kernel_interface_t, update_sa, status_t,
-       private_kernel_interface_t *this, u_int32_t spi, u_int8_t protocol,
-       u_int16_t cpi, host_t *src, host_t *dst, host_t *new_src, host_t *new_dst,
+       private_kernel_interface_t *this, uint32_t spi, uint8_t protocol,
+       uint16_t cpi, host_t *src, host_t *dst, host_t *new_src, host_t *new_dst,
        bool encap, bool new_encap, mark_t mark)
 {
        if (!this->ipsec)
@@ -448,8 +448,8 @@ METHOD(kernel_interface_t, update_sa, status_t,
 
 METHOD(kernel_interface_t, query_sa, status_t,
        private_kernel_interface_t *this, host_t *src, host_t *dst,
-       u_int32_t spi, u_int8_t protocol, mark_t mark,
-       u_int64_t *bytes, u_int64_t *packets, time_t *time)
+       uint32_t spi, uint8_t protocol, mark_t mark,
+       uint64_t *bytes, uint64_t *packets, time_t *time)
 {
        if (!this->ipsec)
        {
@@ -460,8 +460,8 @@ METHOD(kernel_interface_t, query_sa, status_t,
 }
 
 METHOD(kernel_interface_t, del_sa, status_t,
-       private_kernel_interface_t *this, host_t *src, host_t *dst, u_int32_t spi,
-       u_int8_t protocol, u_int16_t cpi, mark_t mark)
+       private_kernel_interface_t *this, host_t *src, host_t *dst, uint32_t spi,
+       uint8_t protocol, uint16_t cpi, mark_t mark)
 {
        if (!this->ipsec)
        {
@@ -594,7 +594,7 @@ METHOD(kernel_interface_t, del_ip, status_t,
 
 METHOD(kernel_interface_t, add_route, status_t,
        private_kernel_interface_t *this, chunk_t dst_net,
-       u_int8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
+       uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
 {
        if (!this->net)
        {
@@ -606,7 +606,7 @@ METHOD(kernel_interface_t, add_route, status_t,
 
 METHOD(kernel_interface_t, del_route, status_t,
        private_kernel_interface_t *this, chunk_t dst_net,
-       u_int8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
+       uint8_t prefixlen, host_t *gateway, host_t *src_ip, char *if_name)
 {
        if (!this->net)
        {
@@ -627,7 +627,7 @@ METHOD(kernel_interface_t, bypass_socket, bool,
 }
 
 METHOD(kernel_interface_t, enable_udp_decap, bool,
-       private_kernel_interface_t *this, int fd, int family, u_int16_t port)
+       private_kernel_interface_t *this, int fd, int family, uint16_t port)
 {
        if (!this->ipsec)
        {
@@ -803,7 +803,7 @@ METHOD(kernel_interface_t, remove_listener, void,
 }
 
 METHOD(kernel_interface_t, acquire, void,
-       private_kernel_interface_t *this, u_int32_t reqid,
+       private_kernel_interface_t *this, uint32_t reqid,
        traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
 {
        kernel_listener_t *listener;
@@ -823,7 +823,7 @@ METHOD(kernel_interface_t, acquire, void,
 }
 
 METHOD(kernel_interface_t, expire, void,
-       private_kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+       private_kernel_interface_t *this, uint8_t protocol, uint32_t spi,
        host_t *dst, bool hard)
 {
        kernel_listener_t *listener;
@@ -844,7 +844,7 @@ METHOD(kernel_interface_t, expire, void,
 }
 
 METHOD(kernel_interface_t, mapping, void,
-       private_kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+       private_kernel_interface_t *this, uint8_t protocol, uint32_t spi,
        host_t *dst, host_t *remote)
 {
        kernel_listener_t *listener;
@@ -865,7 +865,7 @@ METHOD(kernel_interface_t, mapping, void,
 }
 
 METHOD(kernel_interface_t, migrate, void,
-       private_kernel_interface_t *this, u_int32_t reqid,
+       private_kernel_interface_t *this, uint32_t reqid,
        traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
        policy_dir_t direction, host_t *local, host_t *remote)
 {
@@ -919,8 +919,8 @@ METHOD(kernel_interface_t, tun, void,
 }
 
 METHOD(kernel_interface_t, register_algorithm, void,
-       private_kernel_interface_t *this, u_int16_t alg_id, transform_type_t type,
-       u_int16_t kernel_id, char *kernel_name)
+       private_kernel_interface_t *this, uint16_t alg_id, transform_type_t type,
+       uint16_t kernel_id, char *kernel_name)
 {
        kernel_algorithm_t *algorithm;
 
@@ -937,8 +937,8 @@ METHOD(kernel_interface_t, register_algorithm, void,
 }
 
 METHOD(kernel_interface_t, lookup_algorithm, bool,
-       private_kernel_interface_t *this, u_int16_t alg_id, transform_type_t type,
-       u_int16_t *kernel_id, char **kernel_name)
+       private_kernel_interface_t *this, uint16_t alg_id, transform_type_t type,
+       uint16_t *kernel_id, char **kernel_name)
 {
        kernel_algorithm_t *algorithm;
        enumerator_t *enumerator;
index 6793c6cc6f56198101e83412e2a7836294eb2cf7..ec6e140ba6d6800f30a1d7e148f2c3a491f19f70 100644 (file)
@@ -108,7 +108,7 @@ struct kernel_interface_t {
         * @return                      SUCCESS if operation completed
         */
        status_t (*get_spi)(kernel_interface_t *this, host_t *src, host_t *dst,
-                                               u_int8_t protocol, u_int32_t *spi);
+                                               uint8_t protocol, uint32_t *spi);
 
        /**
         * Get a Compression Parameter Index (CPI) from the kernel.
@@ -119,7 +119,7 @@ struct kernel_interface_t {
         * @return                      SUCCESS if operation completed
         */
        status_t (*get_cpi)(kernel_interface_t *this, host_t *src, host_t *dst,
-                                               u_int16_t *cpi);
+                                               uint16_t *cpi);
 
        /**
         * Allocate or confirm a reqid to use for a given SA pair.
@@ -141,7 +141,7 @@ struct kernel_interface_t {
        status_t (*alloc_reqid)(kernel_interface_t *this,
                                                        linked_list_t *local_ts, linked_list_t *remote_ts,
                                                        mark_t mark_in, mark_t mark_out,
-                                                       u_int32_t *reqid);
+                                                       uint32_t *reqid);
 
        /**
         * Release a previously allocated reqid.
@@ -151,7 +151,7 @@ struct kernel_interface_t {
         * @param mark_out      outbound mark on SA
         * @return                      SUCCESS if reqid released
         */
-       status_t (*release_reqid)(kernel_interface_t *this, u_int32_t reqid,
+       status_t (*release_reqid)(kernel_interface_t *this, uint32_t reqid,
                                                          mark_t mark_in, mark_t mark_out);
 
        /**
@@ -186,13 +186,13 @@ struct kernel_interface_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*add_sa) (kernel_interface_t *this,
-                                               host_t *src, host_t *dst, u_int32_t spi,
-                                               u_int8_t protocol, u_int32_t reqid, mark_t mark,
-                                               u_int32_t tfc, lifetime_cfg_t *lifetime,
-                                               u_int16_t enc_alg, chunk_t enc_key,
-                                               u_int16_t int_alg, chunk_t int_key,
-                                               ipsec_mode_t mode, u_int16_t ipcomp, u_int16_t cpi,
-                                               u_int32_t replay_window, bool initiator, bool encap,
+                                               host_t *src, host_t *dst, uint32_t spi,
+                                               uint8_t protocol, uint32_t reqid, mark_t mark,
+                                               uint32_t tfc, lifetime_cfg_t *lifetime,
+                                               uint16_t enc_alg, chunk_t enc_key,
+                                               uint16_t int_alg, chunk_t int_key,
+                                               ipsec_mode_t mode, uint16_t ipcomp, uint16_t cpi,
+                                               uint32_t replay_window, bool initiator, bool encap,
                                                bool esn, bool inbound, bool update,
                                                linked_list_t *src_ts, linked_list_t *dst_ts);
 
@@ -218,7 +218,7 @@ struct kernel_interface_t {
         *                                        the kernel interface can't update the SA
         */
        status_t (*update_sa)(kernel_interface_t *this,
-                                                 u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+                                                 uint32_t spi, uint8_t protocol, uint16_t cpi,
                                                  host_t *src, host_t *dst,
                                                  host_t *new_src, host_t *new_dst,
                                                  bool encap, bool new_encap, mark_t mark);
@@ -237,8 +237,8 @@ struct kernel_interface_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*query_sa) (kernel_interface_t *this, host_t *src, host_t *dst,
-                                                 u_int32_t spi, u_int8_t protocol, mark_t mark,
-                                                 u_int64_t *bytes, u_int64_t *packets, time_t *time);
+                                                 uint32_t spi, uint8_t protocol, mark_t mark,
+                                                 uint64_t *bytes, uint64_t *packets, time_t *time);
 
        /**
         * Delete a previously installed SA from the SAD.
@@ -252,7 +252,7 @@ struct kernel_interface_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*del_sa) (kernel_interface_t *this, host_t *src, host_t *dst,
-                                               u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+                                               uint32_t spi, uint8_t protocol, uint16_t cpi,
                                                mark_t mark);
 
        /**
@@ -426,7 +426,7 @@ struct kernel_interface_t {
         *                                              ALREADY_DONE if the route already exists
         */
        status_t (*add_route) (kernel_interface_t *this, chunk_t dst_net,
-                                                  u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+                                                  uint8_t prefixlen, host_t *gateway, host_t *src_ip,
                                                   char *if_name);
 
        /**
@@ -440,7 +440,7 @@ struct kernel_interface_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*del_route) (kernel_interface_t *this, chunk_t dst_net,
-                                                  u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+                                                  uint8_t prefixlen, host_t *gateway, host_t *src_ip,
                                                   char *if_name);
 
        /**
@@ -461,7 +461,7 @@ struct kernel_interface_t {
         * @return                              TRUE if UDP decapsulation was enabled successfully
         */
        bool (*enable_udp_decap)(kernel_interface_t *this, int fd, int family,
-                                                        u_int16_t port);
+                                                        uint16_t port);
 
 
        /**
@@ -561,7 +561,7 @@ struct kernel_interface_t {
         * @param src_ts                source traffic selector
         * @param dst_ts                destination traffic selector
         */
-       void (*acquire)(kernel_interface_t *this, u_int32_t reqid,
+       void (*acquire)(kernel_interface_t *this, uint32_t reqid,
                                        traffic_selector_t *src_ts, traffic_selector_t *dst_ts);
 
        /**
@@ -572,7 +572,7 @@ struct kernel_interface_t {
         * @param dst                   destination address of expired SA
         * @param hard                  TRUE if it is a hard expire, FALSE otherwise
         */
-       void (*expire)(kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+       void (*expire)(kernel_interface_t *this, uint8_t protocol, uint32_t spi,
                                   host_t *dst, bool hard);
 
        /**
@@ -583,7 +583,7 @@ struct kernel_interface_t {
         * @param dst                   original destination address of SA
         * @param remote                new remote host
         */
-       void (*mapping)(kernel_interface_t *this, u_int8_t protocol, u_int32_t spi,
+       void (*mapping)(kernel_interface_t *this, uint8_t protocol, uint32_t spi,
                                        host_t *dst, host_t *remote);
 
        /**
@@ -596,7 +596,7 @@ struct kernel_interface_t {
         * @param local                 local host address to be used in the IKE_SA
         * @param remote                remote host address to be used in the IKE_SA
         */
-       void (*migrate)(kernel_interface_t *this, u_int32_t reqid,
+       void (*migrate)(kernel_interface_t *this, uint32_t reqid,
                                        traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
                                        policy_dir_t direction, host_t *local, host_t *remote);
 
@@ -623,8 +623,8 @@ struct kernel_interface_t {
         * @param kernel_id                     the kernel id of the algorithm
         * @param kernel_name           the kernel name of the algorithm
         */
-       void (*register_algorithm)(kernel_interface_t *this, u_int16_t alg_id,
-                                                          transform_type_t type, u_int16_t kernel_id,
+       void (*register_algorithm)(kernel_interface_t *this, uint16_t alg_id,
+                                                          transform_type_t type, uint16_t kernel_id,
                                                           char *kernel_name);
 
        /**
@@ -637,8 +637,8 @@ struct kernel_interface_t {
         * @param kernel_name           the kernel name of the algorithm (optional)
         * @return                                      TRUE if algorithm was found
         */
-       bool (*lookup_algorithm)(kernel_interface_t *this, u_int16_t alg_id,
-                                                        transform_type_t type, u_int16_t *kernel_id,
+       bool (*lookup_algorithm)(kernel_interface_t *this, uint16_t alg_id,
+                                                        transform_type_t type, uint16_t *kernel_id,
                                                         char **kernel_name);
 
        /**
index 31e06308e65bb00c4895b87fd9ab7e9e7f73f279..fdb5fc7613d9eb55677d1961a8a558ac1a7ac595 100644 (file)
@@ -62,7 +62,7 @@ struct kernel_ipsec_t {
         * @return                      SUCCESS if operation completed
         */
        status_t (*get_spi)(kernel_ipsec_t *this, host_t *src, host_t *dst,
-                                               u_int8_t protocol, u_int32_t *spi);
+                                               uint8_t protocol, uint32_t *spi);
 
        /**
         * Get a Compression Parameter Index (CPI) from the kernel.
@@ -73,7 +73,7 @@ struct kernel_ipsec_t {
         * @return                      SUCCESS if operation completed
         */
        status_t (*get_cpi)(kernel_ipsec_t *this, host_t *src, host_t *dst,
-                                               u_int16_t *cpi);
+                                               uint16_t *cpi);
 
        /**
         * Add an SA to the SAD.
@@ -107,13 +107,13 @@ struct kernel_ipsec_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*add_sa) (kernel_ipsec_t *this,
-                                               host_t *src, host_t *dst, u_int32_t spi,
-                                               u_int8_t protocol, u_int32_t reqid,
-                                               mark_t mark, u_int32_t tfc, lifetime_cfg_t *lifetime,
-                                               u_int16_t enc_alg, chunk_t enc_key,
-                                               u_int16_t int_alg, chunk_t int_key,
-                                               ipsec_mode_t mode, u_int16_t ipcomp, u_int16_t cpi,
-                                               u_int32_t replay_window, bool initiator, bool encap,
+                                               host_t *src, host_t *dst, uint32_t spi,
+                                               uint8_t protocol, uint32_t reqid,
+                                               mark_t mark, uint32_t tfc, lifetime_cfg_t *lifetime,
+                                               uint16_t enc_alg, chunk_t enc_key,
+                                               uint16_t int_alg, chunk_t int_key,
+                                               ipsec_mode_t mode, uint16_t ipcomp, uint16_t cpi,
+                                               uint32_t replay_window, bool initiator, bool encap,
                                                bool esn, bool inbound, bool update,
                                                linked_list_t *src_ts, linked_list_t *dst_ts);
 
@@ -139,7 +139,7 @@ struct kernel_ipsec_t {
         *                                        the kernel interface can't update the SA
         */
        status_t (*update_sa)(kernel_ipsec_t *this,
-                                                 u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+                                                 uint32_t spi, uint8_t protocol, uint16_t cpi,
                                                  host_t *src, host_t *dst,
                                                  host_t *new_src, host_t *new_dst,
                                                  bool encap, bool new_encap, mark_t mark);
@@ -158,8 +158,8 @@ struct kernel_ipsec_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*query_sa) (kernel_ipsec_t *this, host_t *src, host_t *dst,
-                                                 u_int32_t spi, u_int8_t protocol, mark_t mark,
-                                                 u_int64_t *bytes, u_int64_t *packets, time_t *time);
+                                                 uint32_t spi, uint8_t protocol, mark_t mark,
+                                                 uint64_t *bytes, uint64_t *packets, time_t *time);
 
        /**
         * Delete a previusly installed SA from the SAD.
@@ -173,7 +173,7 @@ struct kernel_ipsec_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*del_sa) (kernel_ipsec_t *this, host_t *src, host_t *dst,
-                                               u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+                                               uint32_t spi, uint8_t protocol, uint16_t cpi,
                                                mark_t mark);
 
        /**
@@ -272,7 +272,7 @@ struct kernel_ipsec_t {
         * @return                              TRUE if UDP decapsulation was enabled successfully
         */
        bool (*enable_udp_decap)(kernel_ipsec_t *this, int fd, int family,
-                                                        u_int16_t port);
+                                                        uint16_t port);
 
        /**
         * Destroy the implementation.
index 6426fae2aafd7af0fcd305e882c096862971794e..aaeb4f5b7626f8ce7e0f21cd7793db46f4e77d41 100644 (file)
@@ -43,7 +43,7 @@ struct kernel_listener_t {
         * @param dst_ts                destination traffic selector
         * @return                              TRUE to remain registered, FALSE to unregister
         */
-       bool (*acquire)(kernel_listener_t *this, u_int32_t reqid,
+       bool (*acquire)(kernel_listener_t *this, uint32_t reqid,
                                        traffic_selector_t *src_ts, traffic_selector_t *dst_ts);
 
        /**
@@ -55,7 +55,7 @@ struct kernel_listener_t {
         * @param hard                  TRUE if it is a hard expire, FALSE otherwise
         * @return                              TRUE to remain registered, FALSE to unregister
         */
-       bool (*expire)(kernel_listener_t *this, u_int8_t protocol, u_int32_t spi,
+       bool (*expire)(kernel_listener_t *this, uint8_t protocol, uint32_t spi,
                                   host_t *dst, bool hard);
 
        /**
@@ -67,7 +67,7 @@ struct kernel_listener_t {
         * @param remote                new remote host
         * @return                              TRUE to remain registered, FALSE to unregister
         */
-       bool (*mapping)(kernel_listener_t *this, u_int8_t protocol, u_int32_t spi,
+       bool (*mapping)(kernel_listener_t *this, uint8_t protocol, uint32_t spi,
                                        host_t *dst, host_t *remote);
 
        /**
@@ -81,7 +81,7 @@ struct kernel_listener_t {
         * @param remote                remote host address to be used in the IKE_SA
         * @return                              TRUE to remain registered, FALSE to unregister
         */
-       bool (*migrate)(kernel_listener_t *this, u_int32_t reqid,
+       bool (*migrate)(kernel_listener_t *this, uint32_t reqid,
                                        traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
                                        policy_dir_t direction, host_t *local, host_t *remote);
 
index 7fc644a7e39cd13a28173e1b81e073d541e99e25..4f3063deb3c5152e1872ab9f59d2f1347be6d33b 100644 (file)
@@ -156,7 +156,7 @@ struct kernel_net_t {
         *                                              ALREADY_DONE if the route already exists
         */
        status_t (*add_route) (kernel_net_t *this, chunk_t dst_net,
-                                                  u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+                                                  uint8_t prefixlen, host_t *gateway, host_t *src_ip,
                                                   char *if_name);
 
        /**
@@ -170,7 +170,7 @@ struct kernel_net_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*del_route) (kernel_net_t *this, chunk_t dst_net,
-                                                  u_int8_t prefixlen, host_t *gateway, host_t *src_ip,
+                                                  uint8_t prefixlen, host_t *gateway, host_t *src_ip,
                                                   char *if_name);
 
        /**
index ee357ca4df7c607ef08bf8d6f968a935dbfcc447..1bf93ad4029c18f28b94ba3c4948640477988f04 100644 (file)
@@ -81,17 +81,17 @@ struct private_receiver_t {
        /**
         * how many times we have used "secret" so far
         */
-       u_int32_t secret_used;
+       uint32_t secret_used;
 
        /**
         * time we did the cookie switch
         */
-       u_int32_t secret_switch;
+       uint32_t secret_switch;
 
        /**
         * time offset to use, hides our system time
         */
-       u_int32_t secret_offset;
+       uint32_t secret_offset;
 
        /**
         * the RNG to use for secret generation
@@ -106,7 +106,7 @@ struct private_receiver_t {
        /**
         * require cookies after this many half open IKE_SAs
         */
-       u_int32_t cookie_threshold;
+       uint32_t cookie_threshold;
 
        /**
         * timestamp of last cookie requested
@@ -116,7 +116,7 @@ struct private_receiver_t {
        /**
         * how many half open IKE_SAs per peer before blocking
         */
-       u_int32_t block_threshold;
+       uint32_t block_threshold;
 
        /**
         * Drop IKE_SA_INIT requests if processor job load exceeds this limit
@@ -192,9 +192,9 @@ static void send_notify(message_t *request, int major, exchange_type_t exchange,
  * build a cookie
  */
 static bool cookie_build(private_receiver_t *this, message_t *message,
-                                                u_int32_t t, chunk_t secret, chunk_t *cookie)
+                                                uint32_t t, chunk_t secret, chunk_t *cookie)
 {
-       u_int64_t spi = message->get_initiator_spi(message);
+       uint64_t spi = message->get_initiator_spi(message);
        host_t *ip = message->get_source(message);
        chunk_t input, hash;
 
@@ -216,14 +216,14 @@ static bool cookie_build(private_receiver_t *this, message_t *message,
 static bool cookie_verify(private_receiver_t *this, message_t *message,
                                                  chunk_t cookie)
 {
-       u_int32_t t, now;
+       uint32_t t, now;
        chunk_t reference;
        chunk_t secret;
 
        now = time_monotonic(NULL);
-       t = *(u_int32_t*)cookie.ptr;
+       t = *(uint32_t*)cookie.ptr;
 
-       if (cookie.len != sizeof(u_int32_t) +
+       if (cookie.len != sizeof(uint32_t) +
                        this->hasher->get_hash_size(this->hasher) ||
                t < now - this->secret_offset - COOKIE_LIFETIME)
        {
@@ -269,15 +269,15 @@ static bool check_cookie(private_receiver_t *this, message_t *message)
        data = message->get_packet_data(message);
        if (data.len <
                 IKE_HEADER_LENGTH + NOTIFY_PAYLOAD_HEADER_LENGTH +
-                sizeof(u_int32_t) + this->hasher->get_hash_size(this->hasher) ||
+                sizeof(uint32_t) + this->hasher->get_hash_size(this->hasher) ||
                *(data.ptr + 16) != PLV2_NOTIFY ||
-               *(u_int16_t*)(data.ptr + IKE_HEADER_LENGTH + 6) != htons(COOKIE))
+               *(uint16_t*)(data.ptr + IKE_HEADER_LENGTH + 6) != htons(COOKIE))
        {
                /* no cookie found */
                return FALSE;
        }
        data.ptr += IKE_HEADER_LENGTH + NOTIFY_PAYLOAD_HEADER_LENGTH;
-       data.len = sizeof(u_int32_t) + this->hasher->get_hash_size(this->hasher);
+       data.len = sizeof(uint32_t) + this->hasher->get_hash_size(this->hasher);
        if (!cookie_verify(this, message, data))
        {
                DBG2(DBG_NET, "found cookie, but content invalid");
@@ -290,7 +290,7 @@ static bool check_cookie(private_receiver_t *this, message_t *message)
  * Check if we currently require cookies
  */
 static bool cookie_required(private_receiver_t *this,
-                                                       u_int half_open, u_int32_t now)
+                                                       u_int half_open, uint32_t now)
 {
        if (this->cookie_threshold && half_open >= this->cookie_threshold)
        {
@@ -322,7 +322,7 @@ static bool cookie_required(private_receiver_t *this,
 static bool drop_ike_sa_init(private_receiver_t *this, message_t *message)
 {
        u_int half_open, half_open_r;
-       u_int32_t now;
+       uint32_t now;
 
        now = time_monotonic(NULL);
        half_open = charon->ike_sa_manager->get_half_open_count(
@@ -620,7 +620,7 @@ METHOD(receiver_t, destroy, void,
 receiver_t *receiver_create()
 {
        private_receiver_t *this;
-       u_int32_t now = time_monotonic(NULL);
+       uint32_t now = time_monotonic(NULL);
 
        INIT(this,
                .public = {
index e3cda3bea73859ce7e6c5d5a544dd83ace920a92..b084d96a226e2c68e50b735e6e3b668b10f98385 100644 (file)
@@ -99,7 +99,7 @@ struct socket_t {
         * @param nat_t                 TRUE to get the port used to float in case of NAT-T
         * @return                              the port
         */
-       u_int16_t (*get_port)(socket_t *this, bool nat_t);
+       uint16_t (*get_port)(socket_t *this, bool nat_t);
 
        /**
         * Get the address families this socket is listening on.
index 2a07e503cb525f96860539248cf274d5ef794dc0..564608d77ad969582af6e83112a4243c8ed451ef 100644 (file)
@@ -89,10 +89,10 @@ METHOD(socket_manager_t, sender, status_t,
        return status;
 }
 
-METHOD(socket_manager_t, get_port, u_int16_t,
+METHOD(socket_manager_t, get_port, uint16_t,
        private_socket_manager_t *this, bool nat_t)
 {
-       u_int16_t port = 0;
+       uint16_t port = 0;
        this->lock->read_lock(this->lock);
        if (this->socket)
        {
index a07d0804c06db677d20e0649f9a44f7d06061a50..cde7859c2daab2155931a9a69181d787928de5b2 100644 (file)
@@ -58,7 +58,7 @@ struct socket_manager_t {
         * @param nat_t                 TRUE to get the port used to float in case of NAT-T
         * @return                              the port, or 0, if no socket is registered
         */
-       u_int16_t (*get_port)(socket_manager_t *this, bool nat_t);
+       uint16_t (*get_port)(socket_manager_t *this, bool nat_t);
 
        /**
         * Get the address families the registered socket is listening on.
index 1de571c3f1bb07b4f2d846bfa5bbb50092d0b585..f4c143641a29e0c9f9e77750054688ed20cb02f1 100644 (file)
@@ -272,10 +272,10 @@ static void load_entries(private_attr_provider_t *this)
                                {
                                        if (family == AF_INET)
                                        {       /* IPv4 attributes contain a subnet mask */
-                                               u_int32_t netmask = 0;
+                                               uint32_t netmask = 0;
 
                                                if (mask)
-                                               {       /* shifting u_int32_t by 32 or more is undefined */
+                                               {       /* shifting uint32_t by 32 or more is undefined */
                                                        mask = 32 - mask;
                                                        netmask = htonl((0xFFFFFFFF >> mask) << mask);
                                                }
index 57a9d9e27898f387c5c5e0b114f6c41b8c223a6d..29f7cac4282fa4d3358e10b8309f233cc2afcd75 100644 (file)
@@ -57,7 +57,7 @@ struct private_connmark_listener_t {
 static bool ts2in(traffic_selector_t *ts,
                                  struct in_addr *addr, struct in_addr *mask)
 {
-       u_int8_t bits;
+       uint8_t bits;
        host_t *net;
 
        if (ts->get_type(ts) == TS_IPV4_ADDR_RANGE &&
@@ -120,15 +120,15 @@ static bool manage_rule(struct iptc_handle *ipth, const char *chain,
  */
 static bool manage_pre_esp_in_udp(private_connmark_listener_t *this,
                                                                  struct iptc_handle *ipth, bool add,
-                                                                 u_int mark, u_int32_t spi,
+                                                                 u_int mark, uint32_t spi,
                                                                  host_t *dst, host_t *src)
 {
-       u_int16_t match_size    = XT_ALIGN(sizeof(struct ipt_entry_match)) +
+       uint16_t match_size     = XT_ALIGN(sizeof(struct ipt_entry_match)) +
                                                          XT_ALIGN(sizeof(struct xt_udp));
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_mark_tginfo2));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -178,15 +178,15 @@ static bool manage_pre_esp_in_udp(private_connmark_listener_t *this,
  */
 static bool manage_pre_esp(private_connmark_listener_t *this,
                                                   struct iptc_handle *ipth, bool add,
-                                                  u_int mark, u_int32_t spi,
+                                                  u_int mark, uint32_t spi,
                                                   host_t *dst, host_t *src)
 {
-       u_int16_t match_size    = XT_ALIGN(sizeof(struct ipt_entry_match)) +
+       uint16_t match_size     = XT_ALIGN(sizeof(struct ipt_entry_match)) +
                                                          XT_ALIGN(sizeof(struct xt_esp));
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_mark_tginfo2));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -235,7 +235,7 @@ static bool manage_pre_esp(private_connmark_listener_t *this,
  */
 static bool manage_pre(private_connmark_listener_t *this,
                                           struct iptc_handle *ipth, bool add,
-                                          u_int mark, u_int32_t spi, bool encap,
+                                          u_int mark, uint32_t spi, bool encap,
                                           host_t *dst, host_t *src)
 {
        if (encap)
@@ -250,15 +250,15 @@ static bool manage_pre(private_connmark_listener_t *this,
  */
 static bool manage_in(private_connmark_listener_t *this,
                                          struct iptc_handle *ipth, bool add,
-                                         u_int mark, u_int32_t spi,
+                                         u_int mark, uint32_t spi,
                                          traffic_selector_t *dst, traffic_selector_t *src)
 {
-       u_int16_t match_size    = XT_ALIGN(sizeof(struct ipt_entry_match)) +
+       uint16_t match_size     = XT_ALIGN(sizeof(struct ipt_entry_match)) +
                                                          XT_ALIGN(sizeof(struct xt_policy_info));
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_connmark_tginfo1));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -316,12 +316,12 @@ static bool manage_out(private_connmark_listener_t *this,
                                           struct iptc_handle *ipth, bool add,
                                           traffic_selector_t *dst, traffic_selector_t *src)
 {
-       u_int16_t match_size    = XT_ALIGN(sizeof(struct ipt_entry_match)) +
+       uint16_t match_size     = XT_ALIGN(sizeof(struct ipt_entry_match)) +
                                                          XT_ALIGN(sizeof(struct xt_mark_mtinfo1));
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_connmark_tginfo1));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -402,7 +402,7 @@ static bool manage_policies(private_connmark_listener_t *this,
 {
        traffic_selector_t *local, *remote;
        enumerator_t *enumerator;
-       u_int32_t spi;
+       uint32_t spi;
        u_int mark;
        bool done = TRUE;
 
index 0fd1d33fd4ad73c1dbc606f540935d5156acd972..807c68274bc27bd7f74e0ccbd60d59bba8e07faf 100644 (file)
@@ -151,8 +151,8 @@ typedef enum {
  * DHCP option encoding, a TLV
  */
 typedef struct __attribute__((packed)) {
-       u_int8_t type;
-       u_int8_t len;
+       uint8_t type;
+       uint8_t len;
        char data[];
 } dhcp_option_t;
 
@@ -160,22 +160,22 @@ typedef struct __attribute__((packed)) {
  * DHCP message format, with a maximum size options buffer
  */
 typedef struct __attribute__((packed)) {
-       u_int8_t opcode;
-       u_int8_t hw_type;
-       u_int8_t hw_addr_len;
-       u_int8_t hop_count;
-       u_int32_t transaction_id;
-       u_int16_t number_of_seconds;
-       u_int16_t flags;
-       u_int32_t client_address;
-       u_int32_t your_address;
-       u_int32_t server_address;
-       u_int32_t gateway_address;
+       uint8_t opcode;
+       uint8_t hw_type;
+       uint8_t hw_addr_len;
+       uint8_t hop_count;
+       uint32_t transaction_id;
+       uint16_t number_of_seconds;
+       uint16_t flags;
+       uint32_t client_address;
+       uint32_t your_address;
+       uint32_t server_address;
+       uint32_t gateway_address;
        char client_hw_addr[6];
        char client_hw_padding[10];
        char server_hostname[64];
        char boot_filename[128];
-       u_int32_t magic_cookie;
+       uint32_t magic_cookie;
        char options[252];
 } dhcp_t;
 
@@ -191,7 +191,7 @@ static int prepare_dhcp(private_dhcp_socket_t *this,
        dhcp_option_t *option;
        int optlen = 0;
        host_t *src;
-       u_int32_t id;
+       uint32_t id;
 
        memset(dhcp, 0, sizeof(*dhcp));
        dhcp->opcode = BOOTREQUEST;
@@ -366,10 +366,10 @@ METHOD(dhcp_socket_t, enroll, dhcp_transaction_t*,
        private_dhcp_socket_t *this, identification_t *identity)
 {
        dhcp_transaction_t *transaction;
-       u_int32_t id;
+       uint32_t id;
        int try;
 
-       if (!this->rng->get_bytes(this->rng, sizeof(id), (u_int8_t*)&id))
+       if (!this->rng->get_bytes(this->rng, sizeof(id), (uint8_t*)&id))
        {
                DBG1(DBG_CFG, "DHCP DISCOVER failed, no transaction ID");
                return NULL;
index 22d3f3fdf66f91228a17597fcdef75604d7d3962..3ee88a698ba3f3117d2c5d9599b353d6292b4555 100644 (file)
@@ -32,7 +32,7 @@ struct private_dhcp_transaction_t {
        /**
         * DHCP transaction ID
         */
-       u_int32_t id;
+       uint32_t id;
 
        /**
         * Peer identity
@@ -63,7 +63,7 @@ typedef struct {
        chunk_t data;
 } attribute_entry_t;
 
-METHOD(dhcp_transaction_t, get_id, u_int32_t,
+METHOD(dhcp_transaction_t, get_id, uint32_t,
        private_dhcp_transaction_t *this)
 {
        return this->id;
@@ -157,7 +157,7 @@ METHOD(dhcp_transaction_t, destroy, void,
 /**
  * See header
  */
-dhcp_transaction_t *dhcp_transaction_create(u_int32_t id,
+dhcp_transaction_t *dhcp_transaction_create(uint32_t id,
                                                                                        identification_t *identity)
 {
        private_dhcp_transaction_t *this;
index 35f08e83643fdeb8c8f6c68ea8c3c12318e31c2c..0c614f7b15fe6994862742fd475b727085045a24 100644 (file)
@@ -37,7 +37,7 @@ struct dhcp_transaction_t {
         *
         * @return                      DHCP transaction identifier
         */
-       u_int32_t (*get_id)(dhcp_transaction_t *this);
+       uint32_t (*get_id)(dhcp_transaction_t *this);
 
        /**
         * Get the peer identity this transaction is used for.
@@ -103,7 +103,7 @@ struct dhcp_transaction_t {
  * @param identity     peer identity this transaction is used for
  * @return                     transaction instance
  */
-dhcp_transaction_t *dhcp_transaction_create(u_int32_t id,
+dhcp_transaction_t *dhcp_transaction_create(uint32_t id,
                                                                                        identification_t *identity);
 
 #endif /** DHCP_TRANSACTION_H_ @}*/
index 882ad9f0cb71847d285f57a3134158283954687c..b360eac34fc7254bfbe6dd503aa80402c876a613 100644 (file)
@@ -41,17 +41,17 @@ struct private_dnscert_t {
        /**
         * Certificate type
         */
-       u_int16_t cert_type;
+       uint16_t cert_type;
 
        /**
         * Key tag
         */
-       u_int16_t key_tag;
+       uint16_t key_tag;
 
        /**
         * Algorithm
         */
-       u_int8_t algorithm;
+       uint8_t algorithm;
 
        /**
         * Certificate
@@ -65,7 +65,7 @@ METHOD(dnscert_t, get_cert_type, dnscert_type_t,
        return this->cert_type;
 }
 
-METHOD(dnscert_t, get_key_tag, u_int16_t,
+METHOD(dnscert_t, get_key_tag, uint16_t,
        private_dnscert_t *this)
 {
        return this->key_tag;
index 567a9dfac6acdb4a1b5427d4174fe880434e5d62..31a26ff767692b643d15585d1cf414a3b4651542 100644 (file)
@@ -119,7 +119,7 @@ struct dnscert_t {
         *
         * @return                      keytag
         */
-       u_int16_t (*get_key_tag)(dnscert_t *this);
+       uint16_t (*get_key_tag)(dnscert_t *this);
 
        /**
         * Get the algorithm.
index 7c4cd5ce1e9401ff8af5baeff5d5d1936199d2d8..442fa4a99b30eaac84b3bbc113ee13854bd576a8 100644 (file)
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
 {
        char buf[128];
        int fd, len;
-       u_int16_t msglen;
+       uint16_t msglen;
 
        fd = make_connection();
        if (fd < 0)
index 99e297104c8752c3d39839e0614e014036bf8f4e..0f405746ea9ee4e9dc357604ddf6f5e870d07d81 100644 (file)
@@ -35,7 +35,7 @@ typedef struct duplicheck_msg_t duplicheck_msg_t;
  */
 struct duplicheck_msg_t {
        /** length of the identity following, in network order (excluding len). */
-       u_int16_t len;
+       uint16_t len;
        /** identity string, not null terminated */
        char identity[];
 } __attribute__((__packed__));
index f77b48b09eadff204097b6ea0744b9818129660b..501d1229f33dd8ec8e60a7254a9e57f4cbd16147 100644 (file)
@@ -75,7 +75,7 @@ METHOD(duplicheck_notify_t, send_, void,
 {
        enumerator_t *enumerator;
        stream_t *stream;
-       u_int16_t nlen;
+       uint16_t nlen;
        char buf[512];
        int len;
 
index 810a19c55d92f744b862be2c0f4e0b2ed7f165ee..3ab053ba6d340331ad5f32bba11d899da561ad58 100644 (file)
@@ -62,7 +62,7 @@ struct private_eap_aka_peer_t {
        /**
         * EAP message identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * MSK
@@ -77,7 +77,7 @@ struct private_eap_aka_peer_t {
        /**
         * Counter value if reauthentication is used
         */
-       u_int16_t counter;
+       uint16_t counter;
 };
 
 /**
@@ -105,7 +105,7 @@ static bool create_client_error(private_eap_aka_peer_t *this,
                                                                eap_payload_t **out)
 {
        simaka_message_t *message;
-       u_int16_t encoded;
+       uint16_t encoded;
 
        DBG1(DBG_IKE, "sending client error '%N'",
                 simaka_client_error_names, AKA_UNABLE_TO_PROCESS);
@@ -347,7 +347,7 @@ static status_t process_challenge(private_eap_aka_peer_t *this,
  */
 static bool counter_too_small(private_eap_aka_peer_t *this, chunk_t chunk)
 {
-       u_int16_t counter;
+       uint16_t counter;
 
        memcpy(&counter, chunk.ptr, sizeof(counter));
        counter = htons(counter);
@@ -483,7 +483,7 @@ static status_t process_notification(private_eap_aka_peer_t *this,
        {
                if (type == AT_NOTIFICATION)
                {
-                       u_int16_t code;
+                       uint16_t code;
 
                        memcpy(&code, data.ptr, sizeof(code));
                        code = ntohs(code);
@@ -594,7 +594,7 @@ METHOD(eap_method_t, initiate, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_aka_peer_t *this, u_int32_t *vendor)
+       private_eap_aka_peer_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_AKA;
@@ -611,14 +611,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_aka_peer_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_aka_peer_t *this, u_int8_t identifier)
+       private_eap_aka_peer_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 04bfc170b603e86495924cb905b5067a07a9e7cd..1ede5675725dcd63cc836781578b73170c586955 100644 (file)
@@ -65,7 +65,7 @@ struct private_eap_aka_server_t {
        /**
         * EAP message identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * Expected Result XRES
@@ -238,7 +238,7 @@ static status_t challenge(private_eap_aka_server_t *this, eap_payload_t **out)
  * Initiate  EAP-AKA/Request/Re-authentication message
  */
 static status_t reauthenticate(private_eap_aka_server_t *this,
-                                                          char mk[HASH_SIZE_SHA1], u_int16_t counter,
+                                                          char mk[HASH_SIZE_SHA1], uint16_t counter,
                                                           eap_payload_t **out)
 {
        simaka_message_t *message;
@@ -341,7 +341,7 @@ static status_t process_identity(private_eap_aka_server_t *this,
        if (this->use_reauth)
        {
                char mk[HASH_SIZE_SHA1];
-               u_int16_t counter;
+               uint16_t counter;
 
                permanent = this->mgr->provider_is_reauth(this->mgr, id, mk, &counter);
                if (permanent)
@@ -564,7 +564,7 @@ static status_t process_client_error(private_eap_aka_server_t *this,
        {
                if (type == AT_CLIENT_ERROR_CODE)
                {
-                       u_int16_t code;
+                       uint16_t code;
 
                        memcpy(&code, data.ptr, sizeof(code));
                        DBG1(DBG_IKE, "received EAP-AKA client error '%N'",
@@ -637,7 +637,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_aka_server_t *this, u_int32_t *vendor)
+       private_eap_aka_server_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_AKA;
@@ -654,14 +654,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_aka_server_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_aka_server_t *this, u_int8_t identifier)
+       private_eap_aka_server_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 93ea8d08c3c3d2b41eff9df9b664ec7156a88b41..cfe6407b017842fe852fdecb117439a920757842 100644 (file)
@@ -54,7 +54,7 @@ static chunk_t fmk = chunk_from_chars(0x41, 0x48, 0x41, 0x47);
 /**
  * Binary represnation of the polynom T^160 + T^5 + T^3 + T^2 + 1
  */
-static u_int8_t g[] = {
+static uint8_t g[] = {
        0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x2d
@@ -63,7 +63,7 @@ static u_int8_t g[] = {
 /**
  * Predefined random bits from the RAND Corporation book
  */
-static u_int8_t a[] = {
+static uint8_t a[] = {
        0x9d, 0xe9, 0xc9, 0xc8, 0xef, 0xd5, 0x78, 0x11,
        0x48, 0x23, 0x14, 0x01, 0x90, 0x1f, 0x2d, 0x49,
        0x3f, 0x4c, 0x63, 0x65
@@ -72,7 +72,7 @@ static u_int8_t a[] = {
 /**
  * Predefined random bits from the RAND Corporation book
  */
-static u_int8_t b[] = {
+static uint8_t b[] = {
        0x75, 0xef, 0xd1, 0x5c, 0x4b, 0x8f, 0x8f, 0x51,
        0x4e, 0xf3, 0xbc, 0xc3, 0x79, 0x4a, 0x76, 0x5e,
        0x7e, 0xec, 0x45, 0xe0
@@ -171,7 +171,7 @@ static void mpz_mod_poly(mpz_t r, mpz_t a, mpz_t b)
  * XOR the key into the SHA1 IV
  */
 static bool step3(prf_t *prf, u_char k[AKA_K_LEN],
-                                 u_char payload[AKA_PAYLOAD_LEN], u_int8_t h[HASH_SIZE_SHA1])
+                                 u_char payload[AKA_PAYLOAD_LEN], uint8_t h[HASH_SIZE_SHA1])
 {
        /* use the keyed hasher to build the hash */
        return prf->set_key(prf, chunk_create(k, AKA_K_LEN)) &&
@@ -243,7 +243,7 @@ static bool fx(prf_t *prf, u_char f, u_char k[AKA_K_LEN],
 /**
  * Calculation function of f1() and f1star()
  */
-static bool f1x(prf_t *prf, u_int8_t f, u_char k[AKA_K_LEN],
+static bool f1x(prf_t *prf, uint8_t f, u_char k[AKA_K_LEN],
                                u_char rand[AKA_RAND_LEN], u_char sqn[AKA_SQN_LEN],
                                u_char amf[AKA_AMF_LEN], u_char mac[AKA_MAC_LEN])
 {
index 3216446afcbd8ef86f2d57df12e1cd74023f0f96..d0f0595de2f2c87e68421050d43ed577efaab78d 100644 (file)
@@ -73,7 +73,7 @@ static bool entry_matches(eap_vendor_type_t *item, eap_vendor_type_t *other)
  * Load the given EAP method
  */
 static eap_method_t *load_method(private_eap_dynamic_t *this,
-                                                                eap_type_t type, u_int32_t vendor)
+                                                                eap_type_t type, uint32_t vendor)
 {
        eap_method_t *method;
 
@@ -171,7 +171,7 @@ METHOD(eap_method_t, process, status_t,
        private_eap_dynamic_t *this, eap_payload_t *in, eap_payload_t **out)
 {
        eap_type_t received_type, type;
-       u_int32_t received_vendor, vendor;
+       uint32_t received_vendor, vendor;
 
        received_type = in->get_type(in, &received_vendor);
        if (received_vendor == 0 && received_type == EAP_NAK)
@@ -225,7 +225,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_dynamic_t *this, u_int32_t *vendor)
+       private_eap_dynamic_t *this, uint32_t *vendor)
 {
        if (this->method)
        {
@@ -245,7 +245,7 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_dynamic_t *this)
 {
        if (this->method)
@@ -256,7 +256,7 @@ METHOD(eap_method_t, get_identifier, u_int8_t,
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_dynamic_t *this, u_int8_t identifier)
+       private_eap_dynamic_t *this, uint8_t identifier)
 {
        if (this->method)
        {
@@ -335,7 +335,7 @@ static void get_supported_eap_types(private_eap_dynamic_t *this)
 {
        enumerator_t *enumerator;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
 
        enumerator = charon->eap->create_enumerator(charon->eap, EAP_SERVER);
        while (enumerator->enumerate(enumerator, &type, &vendor))
index 5fcd9ebc9db237833019101902c307cc77f76349..6f5c38eddcd057697306b5e89d30b3dca7568775 100644 (file)
@@ -46,7 +46,7 @@ struct private_eap_gtc_t {
        /**
         * EAP message identififier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 };
 
 typedef struct eap_gtc_header_t eap_gtc_header_t;
@@ -56,15 +56,15 @@ typedef struct eap_gtc_header_t eap_gtc_header_t;
  */
 struct eap_gtc_header_t {
        /** EAP code (REQUEST/RESPONSE) */
-       u_int8_t code;
+       uint8_t code;
        /** unique message identifier */
-       u_int8_t identifier;
+       uint8_t identifier;
        /** length of whole message */
-       u_int16_t length;
+       uint16_t length;
        /** EAP type */
-       u_int8_t type;
+       uint8_t type;
        /** type data */
-       u_int8_t data[];
+       uint8_t data[];
 } __attribute__((__packed__));
 
 METHOD(eap_method_t, initiate_peer, status_t,
@@ -186,7 +186,7 @@ METHOD(eap_method_t, process_server, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_gtc_t *this, u_int32_t *vendor)
+       private_eap_gtc_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_GTC;
@@ -198,14 +198,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_gtc_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_gtc_t *this, u_int8_t identifier)
+       private_eap_gtc_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 6ecde065cfb1055ac70cd1f9bbbc561a850af7c9..7d6dc4addf44b5800d32bf40f284295266bb8938 100644 (file)
@@ -43,7 +43,7 @@ struct private_eap_identity_t {
        /**
         * EAP identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 };
 
 typedef struct eap_identity_header_t eap_identity_header_t;
@@ -53,15 +53,15 @@ typedef struct eap_identity_header_t eap_identity_header_t;
  */
 struct eap_identity_header_t {
        /** EAP code (REQUEST/RESPONSE) */
-       u_int8_t code;
+       uint8_t code;
        /** unique message identifier */
-       u_int8_t identifier;
+       uint8_t identifier;
        /** length of whole message */
-       u_int16_t length;
+       uint16_t length;
        /** EAP type */
-       u_int8_t type;
+       uint8_t type;
        /** identity data */
-       u_int8_t data[];
+       uint8_t data[];
 } __attribute__((__packed__));
 
 METHOD(eap_method_t, process_peer, status_t,
@@ -124,7 +124,7 @@ METHOD(eap_method_t, initiate_server, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_identity_t *this, u_int32_t *vendor)
+       private_eap_identity_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_IDENTITY;
@@ -141,14 +141,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_identity_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_identity_t *this, u_int8_t identifier)
+       private_eap_identity_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index d314e7a9e03b27b75ac172f1e030b4a27753a60c..2cb0db466cb9237d1c87e6fed12469b2a98f19c1 100644 (file)
@@ -49,7 +49,7 @@ struct private_eap_md5_t {
        /**
         * EAP message identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 };
 
 typedef struct eap_md5_header_t eap_md5_header_t;
@@ -59,17 +59,17 @@ typedef struct eap_md5_header_t eap_md5_header_t;
  */
 struct eap_md5_header_t {
        /** EAP code (REQUEST/RESPONSE) */
-       u_int8_t code;
+       uint8_t code;
        /** unique message identifier */
-       u_int8_t identifier;
+       uint8_t identifier;
        /** length of whole message */
-       u_int16_t length;
+       uint16_t length;
        /** EAP type */
-       u_int8_t type;
+       uint8_t type;
        /** length of value (challenge) */
-       u_int8_t value_size;
+       uint8_t value_size;
        /** actual value */
-       u_int8_t value[];
+       uint8_t value[];
 } __attribute__((__packed__));
 
 #define CHALLENGE_LEN 16
@@ -204,7 +204,7 @@ METHOD(eap_method_t, process_server, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_md5_t *this, u_int32_t *vendor)
+       private_eap_md5_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_MD5;
@@ -222,14 +222,14 @@ METHOD(eap_method_t, is_mutual, bool,
        return FALSE;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_md5_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_md5_t *this, u_int8_t identifier)
+       private_eap_md5_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 16978f4869267fd7a1940edb4e149f8af1999676..12f61f7f8e6e0343096f8ae59633d554133d29c5 100644 (file)
@@ -70,12 +70,12 @@ struct private_eap_mschapv2_t
        /**
         * EAP message identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * MS-CHAPv2-ID (session ID, increases with each retry)
         */
-       u_int8_t mschapv2id;
+       uint8_t mschapv2id;
 
        /**
         * Number of retries
@@ -179,21 +179,21 @@ typedef struct eap_mschapv2_response_t eap_mschapv2_response_t;
 struct eap_mschapv2_header_t
 {
        /** EAP code (REQUEST/RESPONSE) */
-       u_int8_t code;
+       uint8_t code;
        /** unique message identifier */
-       u_int8_t identifier;
+       uint8_t identifier;
        /** length of whole message */
-       u_int16_t length;
+       uint16_t length;
        /** EAP type */
-       u_int8_t type;
+       uint8_t type;
        /** MS-CHAPv2 OpCode */
-       u_int8_t opcode;
+       uint8_t opcode;
        /** MS-CHAPv2-ID (equals identifier) */
-       u_int8_t ms_chapv2_id;
+       uint8_t ms_chapv2_id;
        /** MS-Length (defined as length - 5) */
-       u_int16_t ms_length;
+       uint16_t ms_length;
        /** packet data (determined by OpCode) */
-       u_int8_t data[];
+       uint8_t data[];
 }__attribute__((__packed__));
 
 /**
@@ -202,11 +202,11 @@ struct eap_mschapv2_header_t
 struct eap_mschapv2_challenge_t
 {
        /** Value-Size */
-       u_int8_t value_size;
+       uint8_t value_size;
        /** Challenge */
-       u_int8_t challenge[CHALLENGE_LEN];
+       uint8_t challenge[CHALLENGE_LEN];
        /** Name */
-       u_int8_t name[];
+       uint8_t name[];
 }__attribute__((__packed__));
 
 /**
@@ -215,21 +215,21 @@ struct eap_mschapv2_challenge_t
 struct eap_mschapv2_response_t
 {
        /** Value-Size */
-       u_int8_t value_size;
+       uint8_t value_size;
        /** Response */
        struct
        {
                /* Peer-Challenge*/
-               u_int8_t peer_challenge[CHALLENGE_LEN];
+               uint8_t peer_challenge[CHALLENGE_LEN];
                /* Reserved (=zero) */
-               u_int8_t peer_reserved[8];
+               uint8_t peer_reserved[8];
                /* NT-Response */
-               u_int8_t nt_response[24];
+               uint8_t nt_response[24];
                /* Flags (=zero) */
-               u_int8_t flags;
+               uint8_t flags;
        } response;
        /** Name */
-       u_int8_t name[];
+       uint8_t name[];
 }__attribute__((__packed__));
 
 /**
@@ -597,10 +597,10 @@ static chunk_t extract_username(chunk_t id)
 /**
  * Set the ms_length field using aligned write
  */
-static void set_ms_length(eap_mschapv2_header_t *eap, u_int16_t len)
+static void set_ms_length(eap_mschapv2_header_t *eap, uint16_t len)
 {
        len = htons(len - 5);
-       memcpy(&eap->ms_length, &len, sizeof(u_int16_t));
+       memcpy(&eap->ms_length, &len, sizeof(uint16_t));
 }
 
 METHOD(eap_method_t, initiate_peer, status_t,
@@ -617,7 +617,7 @@ METHOD(eap_method_t, initiate_server, status_t,
        eap_mschapv2_header_t *eap;
        eap_mschapv2_challenge_t *cha;
        const char *name = MSCHAPV2_HOST_NAME;
-       u_int16_t len = CHALLENGE_PAYLOAD_LEN + sizeof(MSCHAPV2_HOST_NAME) - 1;
+       uint16_t len = CHALLENGE_PAYLOAD_LEN + sizeof(MSCHAPV2_HOST_NAME) - 1;
 
        rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK);
        if (!rng || !rng->allocate_bytes(rng, CHALLENGE_LEN, &this->challenge))
@@ -690,7 +690,7 @@ static status_t process_peer_challenge(private_eap_mschapv2_t *this,
        eap_mschapv2_challenge_t *cha;
        eap_mschapv2_response_t *res;
        chunk_t data, peer_challenge, userid, username, nt_hash;
-       u_int16_t len = RESPONSE_PAYLOAD_LEN;
+       uint16_t len = RESPONSE_PAYLOAD_LEN;
 
        data = in->get_data(in);
        eap = (eap_mschapv2_header_t*)data.ptr;
@@ -779,7 +779,7 @@ static status_t process_peer_success(private_eap_mschapv2_t *this,
        chunk_t data, auth_string = chunk_empty;
        char *message, *token, *msg = NULL;
        int message_len;
-       u_int16_t len = SHORT_HEADER_LEN;
+       uint16_t len = SHORT_HEADER_LEN;
 
        data = in->get_data(in);
        eap = (eap_mschapv2_header_t*)data.ptr;
@@ -1011,7 +1011,7 @@ static status_t process_server_retry(private_eap_mschapv2_t *this,
        rng_t *rng;
        chunk_t hex;
        char msg[FAILURE_MESSAGE_LEN];
-       u_int16_t len = HEADER_LEN + FAILURE_MESSAGE_LEN - 1; /* no null byte */
+       uint16_t len = HEADER_LEN + FAILURE_MESSAGE_LEN - 1; /* no null byte */
 
        if (++this->retries > MAX_RETRIES)
        {
@@ -1127,7 +1127,7 @@ static status_t process_server_response(private_eap_mschapv2_t *this,
        {
                chunk_t hex;
                char msg[AUTH_RESPONSE_LEN + sizeof(SUCCESS_MESSAGE)];
-               u_int16_t len = HEADER_LEN + AUTH_RESPONSE_LEN + sizeof(SUCCESS_MESSAGE);
+               uint16_t len = HEADER_LEN + AUTH_RESPONSE_LEN + sizeof(SUCCESS_MESSAGE);
 
                eap = alloca(len);
                eap->code = EAP_REQUEST;
@@ -1213,7 +1213,7 @@ METHOD(eap_method_t, process_server, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_mschapv2_t *this, u_int32_t *vendor)
+       private_eap_mschapv2_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_MSCHAPV2;
@@ -1230,14 +1230,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_mschapv2_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_mschapv2_t *this, u_int8_t identifier)
+       private_eap_mschapv2_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index c24dd578c7d9f913ebaa7339f90dc97d9f8ca5a0..4778a0977666f38965d7e2c48dbc3d0437591344 100644 (file)
@@ -76,7 +76,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_peap_t *this, u_int32_t *vendor)
+       private_eap_peap_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_PEAP;
@@ -93,14 +93,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_peap_t *this)
 {
        return this->tls_eap->get_identifier(this->tls_eap);
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_peap_t *this, u_int8_t identifier)
+       private_eap_peap_t *this, uint8_t identifier)
 {
        this->tls_eap->set_identifier(this->tls_eap, identifier);
 }
index 3f541ba2355c0535f95360bc5ea20681a60372f2..d5ce5fbc1d48ac967ee2038f90c69f8cbff278fd 100644 (file)
@@ -47,7 +47,7 @@ struct private_eap_peap_avp_t {
 METHOD(eap_peap_avp_t, build, void,
        private_eap_peap_avp_t *this, bio_writer_t *writer, chunk_t data)
 {
-       u_int8_t code;
+       uint8_t code;
        eap_packet_t *pkt;
        chunk_t avp_data;
 
@@ -71,10 +71,10 @@ METHOD(eap_peap_avp_t, build, void,
 
 METHOD(eap_peap_avp_t, process, status_t,
        private_eap_peap_avp_t* this, bio_reader_t *reader, chunk_t *data,
-       u_int8_t identifier)
+       uint8_t identifier)
 {
-       u_int8_t code;
-       u_int16_t len;
+       uint8_t code;
+       uint16_t len;
        eap_packet_t *pkt;
        chunk_t avp_data;
 
index 98c5f1912c332ca92d38df72219bb5d0ce134d8a..cc5930b6244523f2ab367bfa3179671d0f00bd6c 100644 (file)
@@ -45,7 +45,7 @@ struct eap_peap_avp_t {
         *                                      - NEED_MORE if another invocation of process/build needed
         */
        status_t (*process)(eap_peap_avp_t *this, bio_reader_t *reader,
-                                               chunk_t *data, u_int8_t identifier);
+                                               chunk_t *data, uint8_t identifier);
 
        /**
         * Build EAP-PEAP Message AVP to send out.
index f482c5b5476e725bfc0fa92f43b4a144b50e1b56..2668ac4324f04293e0b27962f11d0ad482a2b8d5 100644 (file)
@@ -71,7 +71,7 @@ METHOD(tls_application_t, process, status_t,
        eap_payload_t *in;
        eap_code_t code;
        eap_type_t type, received_type;
-       u_int32_t vendor, received_vendor;
+       uint32_t vendor, received_vendor;
 
        status = this->avp->process(this->avp, reader, &data,
                                                        this->ph1_method->get_identifier(this->ph1_method));
@@ -191,7 +191,7 @@ METHOD(tls_application_t, build, status_t,
        chunk_t data;
        eap_code_t code;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
 
        if (this->out)
        {
index 33b01e95e68402de0863baa80615897a8809aaa2..7f8348e066398f1c0d75d9c33e43298e64ec6492 100644 (file)
@@ -167,7 +167,7 @@ METHOD(tls_application_t, process, status_t,
        eap_payload_t *in;
        eap_code_t code;
        eap_type_t type = EAP_NAK, received_type;
-       u_int32_t vendor, received_vendor;
+       uint32_t vendor, received_vendor;
 
        status = this->avp->process(this->avp, reader, &data,
                                                        this->ph1_method->get_identifier(this->ph1_method));
@@ -336,7 +336,7 @@ METHOD(tls_application_t, build, status_t,
        chunk_t data;
        eap_code_t code;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
 
        if (this->ph2_method == NULL && this->start_phase2 && this->start_phase2_id)
        {
index 237f065fa23d17a3cca39810c4863cbc9f4d176f..a2530e653482114da9896f623e133dd5bd27ae50 100644 (file)
@@ -55,12 +55,12 @@ struct private_eap_radius_t {
        /**
         * EAP vendor, if any
         */
-       u_int32_t vendor;
+       uint32_t vendor;
 
        /**
         * EAP message identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * RADIUS client instance
@@ -86,15 +86,15 @@ static void add_eap_identity(private_eap_radius_t *this,
 {
        struct {
                /** EAP code (REQUEST/RESPONSE) */
-               u_int8_t code;
+               uint8_t code;
                /** unique message identifier */
-               u_int8_t identifier;
+               uint8_t identifier;
                /** length of whole message */
-               u_int16_t length;
+               uint16_t length;
                /** EAP type */
-               u_int8_t type;
+               uint8_t type;
                /** identity data */
-               u_int8_t data[];
+               uint8_t data[];
        } __attribute__((__packed__)) *hdr;
        chunk_t id, prefix;
        size_t len;
@@ -156,7 +156,7 @@ void eap_radius_build_attributes(radius_message_t *request)
        ike_sa_t *ike_sa;
        host_t *host;
        char buf[40], *station_id_fmt;;
-       u_int32_t value;
+       uint32_t value;
        chunk_t chunk;
 
        /* virtual NAS-Port-Type */
@@ -314,8 +314,8 @@ static void process_filter_id(radius_message_t *msg)
 {
        enumerator_t *enumerator;
        int type;
-       u_int8_t tunnel_tag;
-       u_int32_t tunnel_type;
+       uint8_t tunnel_tag;
+       uint32_t tunnel_type;
        chunk_t filter_id = chunk_empty, data;
        bool is_esp_tunnel = FALSE;
 
@@ -395,7 +395,7 @@ static void process_timeout(radius_message_t *msg)
 /**
  * Add a Cisco Unity configuration attribute
  */
-static void add_unity_attribute(eap_radius_provider_t *provider, u_int32_t id,
+static void add_unity_attribute(eap_radius_provider_t *provider, uint32_t id,
                                                                int type, chunk_t data)
 {
        switch (type)
@@ -417,7 +417,7 @@ static void add_unity_attribute(eap_radius_provider_t *provider, u_int32_t id,
  * Add a DNS/NBNS configuration attribute
  */
 static void add_nameserver_attribute(eap_radius_provider_t *provider,
-                                                                        u_int32_t id, int type, chunk_t data)
+                                                                        uint32_t id, int type, chunk_t data)
 {
        /* these are from different vendors, but there is currently no conflict */
        switch (type)
@@ -444,7 +444,7 @@ static void add_nameserver_attribute(eap_radius_provider_t *provider,
  * Add a UNITY_LOCAL_LAN or UNITY_SPLIT_INCLUDE attribute
  */
 static void add_unity_split_attribute(eap_radius_provider_t *provider,
-                                                       u_int32_t id, configuration_attribute_type_t type,
+                                                       uint32_t id, configuration_attribute_type_t type,
                                                        chunk_t data)
 {
        enumerator_t *enumerator;
@@ -701,7 +701,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_radius_t *this, u_int32_t *vendor)
+       private_eap_radius_t *this, uint32_t *vendor)
 {
        *vendor = this->vendor;
        return this->type;
@@ -721,14 +721,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_radius_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_radius_t *this, u_int8_t identifier)
+       private_eap_radius_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 4b7260349318655c57879e6fcafbd8e7b8469375..0c302af51df8bdcd5f0365ab5c8bcb9a269cd960 100644 (file)
@@ -54,7 +54,7 @@ struct private_eap_radius_accounting_t {
        /**
         * Session ID prefix
         */
-       u_int32_t prefix;
+       uint32_t prefix;
 
        /**
         * Format string we use for Called/Calling-Station-Id for a host
@@ -101,8 +101,8 @@ typedef enum {
  */
 typedef struct {
        struct {
-               u_int64_t sent;
-               u_int64_t received;
+               uint64_t sent;
+               uint64_t received;
        } bytes, packets;
 } usage_t;
 
@@ -133,7 +133,7 @@ static inline void sub_usage(usage_t *a, usage_t b)
  */
 typedef struct {
        /** unique CHILD_SA identifier */
-       u_int32_t id;
+       uint32_t id;
        /** usage stats for this SA */
        usage_t usage;
 } sa_entry_t;
@@ -172,7 +172,7 @@ typedef struct {
        radius_acct_terminate_cause_t cause;
        /* interim interval and timestamp of last update */
        struct {
-               u_int32_t interval;
+               uint32_t interval;
                time_t last;
        } interim;
        /** did we send Accounting-Start */
@@ -237,7 +237,7 @@ static int sa_find(const void *a, const void *b)
 /**
  * Update or create usage counters of a cached SA
  */
-static void update_sa(entry_t *entry, u_int32_t id, usage_t usage)
+static void update_sa(entry_t *entry, uint32_t id, usage_t usage)
 {
        sa_entry_t *sa, lookup;
 
@@ -402,7 +402,7 @@ static void add_ike_sa_parameters(private_eap_radius_accounting_t *this,
        host_t *vip, *host;
        char buf[MAX_RADIUS_ATTRIBUTE_SIZE + 1];
        chunk_t data;
-       u_int32_t value;
+       uint32_t value;
 
        /* virtual NAS-Port-Type */
        value = htonl(5);
@@ -461,7 +461,7 @@ static void add_ike_sa_parameters(private_eap_radius_accounting_t *this,
  * Get an existing or create a new entry from the locked session table
  */
 static entry_t* get_or_create_entry(private_eap_radius_accounting_t *this,
-                                                                       ike_sa_id_t *id, u_int32_t unique)
+                                                                       ike_sa_id_t *id, uint32_t unique)
 {
        entry_t *entry;
        time_t now;
@@ -520,7 +520,7 @@ static job_requeue_t send_interim(interim_data_t *data)
        enumerator_t *enumerator;
        ike_sa_t *ike_sa;
        entry_t *entry;
-       u_int32_t value;
+       uint32_t value;
        array_t *stats;
        sa_entry_t *sa, *found;
 
@@ -681,7 +681,7 @@ static void send_start(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa)
 {
        radius_message_t *message;
        entry_t *entry;
-       u_int32_t value;
+       uint32_t value;
 
        if (this->acct_req_vip && !has_vip(ike_sa))
        {
@@ -735,7 +735,7 @@ static void send_stop(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa)
        enumerator_t *enumerator;
        entry_t *entry;
        sa_entry_t *sa;
-       u_int32_t value;
+       uint32_t value;
 
        this->mutex->lock(this->mutex);
        entry = this->sessions->remove(this->sessions, ike_sa->get_id(ike_sa));
@@ -931,7 +931,7 @@ METHOD(listener_t, child_rekey, bool,
 
 METHOD(listener_t, children_migrate, bool,
        private_eap_radius_accounting_t *this, ike_sa_t *ike_sa, ike_sa_id_t *new,
-       u_int32_t unique)
+       uint32_t unique)
 {
        enumerator_t *enumerator;
        sa_entry_t *sa, *sa_new, *cached;
@@ -1020,7 +1020,7 @@ eap_radius_accounting_t *eap_radius_accounting_create()
                        .destroy = _destroy,
                },
                /* use system time as Session ID prefix */
-               .prefix = (u_int32_t)time(NULL),
+               .prefix = (uint32_t)time(NULL),
                .sessions = hashtable_create((hashtable_hash_t)hash,
                                                                         (hashtable_equals_t)equals, 32),
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
@@ -1050,7 +1050,7 @@ eap_radius_accounting_t *eap_radius_accounting_create()
 /**
  * See header
  */
-void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, u_int32_t interval)
+void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, uint32_t interval)
 {
        if (singleton)
        {
index 8d4f9a0e173216d4b4af7f1e08b3d29e2698a298..f7a19c9b57e48b794bfe5f2163e4355d4b2b96ce 100644 (file)
@@ -52,6 +52,6 @@ eap_radius_accounting_t *eap_radius_accounting_create();
  * @param ike_sa                       IKE_SA to send updates for
  * @param interval                     interval for interim updates
  */
-void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, u_int32_t interval);
+void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, uint32_t interval);
 
 #endif /** EAP_RADIUS_ACCOUNTING_H_ @}*/
index a0bf99efd7b93cb47d0a0611a44782e7ac9a10f2..fc9b39c3e1bb4dd091989ed4674998f25f542036 100644 (file)
@@ -293,7 +293,7 @@ static void process_disconnect(private_eap_radius_dae_t *this,
  * Apply a new lifetime to an IKE_SA
  */
 static void apply_lifetime(private_eap_radius_dae_t *this, ike_sa_id_t *id,
-                                                  u_int32_t lifetime)
+                                                  uint32_t lifetime)
 {
        ike_sa_t *ike_sa;
 
@@ -323,7 +323,7 @@ static void process_coa(private_eap_radius_dae_t *this,
        ike_sa_id_t *id;
        chunk_t data;
        int type;
-       u_int32_t lifetime = 0;
+       uint32_t lifetime = 0;
        bool lifetime_seen = FALSE;
 
        ids = get_matching_ike_sas(this, request, client);
index 52ea84070d1e0268046d369267d6c2440eea31fd..919e861be1bc730fa00c3277d79cfa8009808205 100644 (file)
@@ -63,9 +63,9 @@ struct private_eap_radius_forward_t {
  */
 typedef struct {
        /** vendor ID, 0 for standard attributes */
-       u_int32_t vendor;
+       uint32_t vendor;
        /** attribute type */
-       u_int8_t type;
+       uint8_t type;
 } attr_t;
 
 /**
@@ -132,7 +132,7 @@ static bool is_attribute_selected(linked_list_t *selector,
                                                                  radius_attribute_type_t type, chunk_t data)
 {
        enumerator_t *enumerator;
-       u_int32_t vendor = 0;
+       uint32_t vendor = 0;
        attr_t *sel;
        bool found = FALSE;
 
index 0f207fbe6aabd78604ef315f36e3454619069dd8..9a87ad38d2d9c4a3c8cbbbff8486e548da84e00a 100644 (file)
@@ -469,7 +469,7 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
 }
 
 METHOD(eap_radius_provider_t, add_framed_ip, void,
-       private_eap_radius_provider_t *this, u_int32_t id, host_t *ip)
+       private_eap_radius_provider_t *this, uint32_t id, host_t *ip)
 {
        this->listener.mutex->lock(this->listener.mutex);
        add_addr(this, this->listener.unclaimed, id, ip);
@@ -477,7 +477,7 @@ METHOD(eap_radius_provider_t, add_framed_ip, void,
 }
 
 METHOD(eap_radius_provider_t, add_attribute, void,
-       private_eap_radius_provider_t *this, u_int32_t id,
+       private_eap_radius_provider_t *this, uint32_t id,
        configuration_attribute_type_t type, chunk_t data)
 {
        attr_t *attr;
index 5a62f4a38b59d6cdb218058387d290d9bd437c8e..80971bddb434041bbbaaa89200f0343614bbcc61 100644 (file)
@@ -42,7 +42,7 @@ struct eap_radius_provider_t {
         * @param id                    IKE_SA unique identifier
         * @param ip                    IP address received from RADIUS server, gets owned
         */
-       void (*add_framed_ip)(eap_radius_provider_t *this, u_int32_t id,
+       void (*add_framed_ip)(eap_radius_provider_t *this, uint32_t id,
                                                  host_t *ip);
 
        /**
@@ -52,7 +52,7 @@ struct eap_radius_provider_t {
         * @param type                  attribute type
         * @param data                  attribute data
         */
-       void (*add_attribute)(eap_radius_provider_t *this, u_int32_t id,
+       void (*add_attribute)(eap_radius_provider_t *this, uint32_t id,
                                                  configuration_attribute_type_t type, chunk_t data);
 
        /**
index 2637b431433606056dc9fb2d13c40211652807b3..37f8a879ef5cb97ab742fa9a5782a91395764d94 100644 (file)
@@ -64,7 +64,7 @@ struct private_eap_sim_peer_t {
        /**
         * EAP message identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * EAP-SIM crypto helper
@@ -99,7 +99,7 @@ struct private_eap_sim_peer_t {
        /**
         * Counter value if reauthentication is used
         */
-       u_int16_t counter;
+       uint16_t counter;
 };
 
 /* version of SIM protocol we speak */
@@ -130,7 +130,7 @@ static bool create_client_error(private_eap_sim_peer_t *this,
                                                                simaka_client_error_t code, eap_payload_t **out)
 {
        simaka_message_t *message;
-       u_int16_t encoded;
+       uint16_t encoded;
 
        DBG1(DBG_IKE, "sending client error '%N'", simaka_client_error_names, code);
 
@@ -404,7 +404,7 @@ static status_t process_challenge(private_eap_sim_peer_t *this,
  */
 static bool counter_too_small(private_eap_sim_peer_t *this, chunk_t chunk)
 {
-       u_int16_t counter;
+       uint16_t counter;
 
        memcpy(&counter, chunk.ptr, sizeof(counter));
        counter = htons(counter);
@@ -540,7 +540,7 @@ static status_t process_notification(private_eap_sim_peer_t *this,
        {
                if (type == AT_NOTIFICATION)
                {
-                       u_int16_t code;
+                       uint16_t code;
 
                        memcpy(&code, data.ptr, sizeof(code));
                        code = ntohs(code);
@@ -650,7 +650,7 @@ METHOD(eap_method_t, initiate, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_sim_peer_t *this, u_int32_t *vendor)
+       private_eap_sim_peer_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_SIM;
@@ -667,14 +667,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_sim_peer_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_sim_peer_t *this, u_int8_t identifier)
+       private_eap_sim_peer_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 5aa54db3e6b737d6e649725086230daec811a480..3b413cfc64167d08dfdb8471869c38e2eaa806a9 100644 (file)
@@ -67,7 +67,7 @@ struct private_eap_sim_server_t {
        /**
         * unique EAP identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * concatenated SRES values
@@ -163,7 +163,7 @@ METHOD(eap_method_t, initiate, status_t,
  * Initiate  EAP-SIM/Request/Re-authentication message
  */
 static status_t reauthenticate(private_eap_sim_server_t *this,
-                                                          char mk[HASH_SIZE_SHA1], u_int16_t counter,
+                                                          char mk[HASH_SIZE_SHA1], uint16_t counter,
                                                           eap_payload_t **out)
 {
        simaka_message_t *message;
@@ -328,7 +328,7 @@ static status_t process_start(private_eap_sim_server_t *this,
                if (this->use_reauth && !nonce.len)
                {
                        char mk[HASH_SIZE_SHA1];
-                       u_int16_t counter;
+                       uint16_t counter;
 
                        permanent = this->mgr->provider_is_reauth(this->mgr, id,
                                                                                                          mk, &counter);
@@ -495,7 +495,7 @@ static status_t process_client_error(private_eap_sim_server_t *this,
        {
                if (type == AT_CLIENT_ERROR_CODE)
                {
-                       u_int16_t code;
+                       uint16_t code;
 
                        memcpy(&code, data.ptr, sizeof(code));
                        DBG1(DBG_IKE, "received EAP-SIM client error '%N'",
@@ -551,7 +551,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_sim_server_t *this, u_int32_t *vendor)
+       private_eap_sim_server_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_SIM;
@@ -568,14 +568,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_sim_server_t *this)
 {
        return this->identifier;
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_sim_server_t *this, u_int8_t identifier)
+       private_eap_sim_server_t *this, uint8_t identifier)
 {
        this->identifier = identifier;
 }
index 5bc5fd38292a204d52e25e78b1a0f8b5fb85bad0..153ec0f0dca8db2d247c65074a2af80e38c04b2b 100644 (file)
@@ -45,7 +45,7 @@ typedef struct {
        /** associated permanent identity */
        identification_t *permanent;
        /** counter value */
-       u_int16_t counter;
+       uint16_t counter;
        /** master key */
        char mk[HASH_SIZE_SHA1];
 } reauth_data_t;
@@ -68,7 +68,7 @@ static bool equals(identification_t *key1, identification_t *key2)
 
 METHOD(simaka_card_t, get_reauth, identification_t*,
        private_eap_simaka_reauth_card_t *this, identification_t *id,
-       char mk[HASH_SIZE_SHA1], u_int16_t *counter)
+       char mk[HASH_SIZE_SHA1], uint16_t *counter)
 {
        reauth_data_t *data;
        identification_t *reauth;
@@ -89,7 +89,7 @@ METHOD(simaka_card_t, get_reauth, identification_t*,
 
 METHOD(simaka_card_t, set_reauth, void,
        private_eap_simaka_reauth_card_t *this, identification_t *id,
-       identification_t* next, char mk[HASH_SIZE_SHA1], u_int16_t counter)
+       identification_t* next, char mk[HASH_SIZE_SHA1], uint16_t counter)
 {
        reauth_data_t *data;
 
index 937095ec1fe0036e13daf53b64d8bca8084f39d5..543b5579ba08be4411ffd335c779792bb0e6d159 100644 (file)
@@ -53,7 +53,7 @@ typedef struct {
        /** currently used reauthentication identity */
        identification_t *id;
        /** counter value */
-       u_int16_t counter;
+       uint16_t counter;
        /** master key */
        char mk[HASH_SIZE_SHA1];
 } reauth_data_t;
@@ -92,7 +92,7 @@ static identification_t *gen_identity(private_eap_simaka_reauth_provider_t *this
 
 METHOD(simaka_provider_t, is_reauth, identification_t*,
        private_eap_simaka_reauth_provider_t *this, identification_t *id,
-       char mk[HASH_SIZE_SHA1], u_int16_t *counter)
+       char mk[HASH_SIZE_SHA1], uint16_t *counter)
 {
        identification_t *permanent;
        reauth_data_t *data;
index bc01ba5df0c06cbbfc4c8a74b25691152c136d03..79e87dc89b56d2eb28422448caa21f624b301415 100644 (file)
@@ -74,7 +74,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_tls_t *this, u_int32_t *vendor)
+       private_eap_tls_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_TLS;
@@ -91,14 +91,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_tls_t *this)
 {
        return this->tls_eap->get_identifier(this->tls_eap);
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_tls_t *this, u_int8_t identifier)
+       private_eap_tls_t *this, uint8_t identifier)
 {
        this->tls_eap->set_identifier(this->tls_eap, identifier);
 }
index c99d47f8df9f64c55864acc4c0522d5980b64be0..9987c43d4b936f656a1bac24f0672a4033e25e5a 100644 (file)
@@ -76,7 +76,7 @@ METHOD(eap_method_t, process, status_t,
 }
 
 METHOD(eap_method_t, get_type, eap_type_t,
-       private_eap_ttls_t *this, u_int32_t *vendor)
+       private_eap_ttls_t *this, uint32_t *vendor)
 {
        *vendor = 0;
        return EAP_TTLS;
@@ -93,14 +93,14 @@ METHOD(eap_method_t, get_msk, status_t,
        return FAILED;
 }
 
-METHOD(eap_method_t, get_identifier, u_int8_t,
+METHOD(eap_method_t, get_identifier, uint8_t,
        private_eap_ttls_t *this)
 {
        return this->tls_eap->get_identifier(this->tls_eap);
 }
 
 METHOD(eap_method_t, set_identifier, void,
-       private_eap_ttls_t *this, u_int8_t identifier)
+       private_eap_ttls_t *this, uint8_t identifier)
 {
        this->tls_eap->set_identifier(this->tls_eap, identifier);
 }
index 47e0f8afb653d6b11e2fd9cb8bcaa06792341cd7..f75e3e0a617bf2be2f8486203cb1c7bd5abad4c1 100644 (file)
@@ -58,8 +58,8 @@ METHOD(eap_ttls_avp_t, build, void,
 {
        char zero_padding[] = { 0x00, 0x00, 0x00 };
        chunk_t   avp_padding;
-       u_int8_t  avp_flags;
-       u_int32_t avp_len;
+       uint8_t  avp_flags;
+       uint32_t avp_len;
 
        avp_flags = 0x40;
        avp_len = 8 + data.len;
@@ -81,9 +81,9 @@ METHOD(eap_ttls_avp_t, process, status_t,
        if (this->process_header)
        {
                bio_reader_t *header;
-               u_int32_t avp_code;
-               u_int8_t  avp_flags;
-               u_int32_t avp_len;
+               uint32_t avp_code;
+               uint8_t  avp_flags;
+               uint32_t avp_len;
                bool success;
 
                len = min(reader->remaining(reader), AVP_HEADER_LEN - this->inpos);
index e0b59a681b31b73807b9672c631e2ed06e21ee3b..be6a0812ea1f174c7c39b1b0a3d0ded8da7411f4 100644 (file)
@@ -75,8 +75,8 @@ METHOD(tls_application_t, process, status_t,
        eap_packet_t *pkt;
        eap_code_t code;
        eap_type_t type, received_type;
-       u_int32_t vendor, received_vendor;
-       u_int16_t eap_len;
+       uint32_t vendor, received_vendor;
+       uint16_t eap_len;
        size_t eap_pos = 0;
        bool concatenated = FALSE;
 
@@ -240,7 +240,7 @@ METHOD(tls_application_t, build, status_t,
        chunk_t data;
        eap_code_t code;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
 
        if (this->method == NULL && this->start_phase2)
        {
index 87c84359cc4b454e71aecc3fe0dab9c013cd5145..e19fc59721db5173bd6f65accf6050d7ffda1f1e 100644 (file)
@@ -50,7 +50,7 @@ typedef struct {
        /** list of remote selectors */
        linked_list_t *remote;
        /** reqid of CHILD_SA */
-       u_int32_t reqid;
+       uint32_t reqid;
 } entry_t;
 
 METHOD(listener_t, child_updown, bool,
index 9f66d74077b998ccdec802879bd33de9cef1a93b..c2715bd5ac9d07108613746a0a72bcaa03e4addc 100644 (file)
@@ -54,15 +54,15 @@ struct private_farp_spoofer_t {
  * IP over Ethernet ARP message
  */
 typedef struct __attribute__((packed)) {
-       u_int16_t hardware_type;
-       u_int16_t protocol_type;
-       u_int8_t hardware_size;
-       u_int8_t protocol_size;
-       u_int16_t opcode;
-       u_int8_t sender_mac[6];
-       u_int8_t sender_ip[4];
-       u_int8_t target_mac[6];
-       u_int8_t target_ip[4];
+       uint16_t hardware_type;
+       uint16_t protocol_type;
+       uint8_t hardware_size;
+       uint8_t protocol_size;
+       uint16_t opcode;
+       uint8_t sender_mac[6];
+       uint8_t sender_ip[4];
+       uint8_t target_mac[6];
+       uint8_t target_ip[4];
 } arp_t;
 
 /**
index 40aaa7f25b885f00dfd6ed397c139c10473f179e..ce390973700f891d7289bce4d21e1c399b502e50 100644 (file)
@@ -55,7 +55,7 @@ struct private_kernel_listener_t {
        /**
         * current broadcast address of internal network
         */
-       u_int32_t broadcast;
+       uint32_t broadcast;
 
        /**
         * LAN interface index
@@ -105,7 +105,7 @@ static void send_net(private_forecast_forwarder_t *this,
 /**
  * Send a broadcast/multicast packet to a peer
  */
-static void send_peer(private_forecast_forwarder_t *this, u_int32_t dst,
+static void send_peer(private_forecast_forwarder_t *this, uint32_t dst,
                                          void *buf, size_t len, int mark)
 {
        struct sockaddr_in addr = {
@@ -317,7 +317,7 @@ static void join_groups(private_kernel_listener_t *this, struct sockaddr *addr)
 /**
  * Attach the socket filter to the socket
  */
-static bool attach_filter(int fd, u_int32_t broadcast)
+static bool attach_filter(int fd, uint32_t broadcast)
 {
        struct sock_filter filter_code[] = {
                /* destination address: is ... */
index 8f7f2600c7f59bd55b88dbb3cf5bfc2b9973551a..3f252db2d6e5c6eb25ac3abb65b6f665fbd25669 100644 (file)
@@ -67,7 +67,7 @@ struct private_forecast_listener_t {
        /**
         * Broadcast address on LAN interface, network order
         */
-       u_int32_t broadcast;
+       uint32_t broadcast;
 };
 
 /**
@@ -85,13 +85,13 @@ typedef struct {
        /** remote IKE_SA endpoint */
        host_t *rhost;
        /** inbound SPI */
-       u_int32_t spi;
+       uint32_t spi;
        /** use UDP encapsulation */
        bool encap;
        /** whether we should allow reencapsulation of IPsec received forecasts */
        bool reinject;
        /** broadcast address used for that entry */
-       u_int32_t broadcast;
+       uint32_t broadcast;
 } entry_t;
 
 /**
@@ -115,7 +115,7 @@ static void entry_destroy(entry_t *entry)
 static bool ts2in(traffic_selector_t *ts,
                                  struct in_addr *addr, struct in_addr *mask)
 {
-       u_int8_t bits;
+       uint8_t bits;
        host_t *net;
 
        if (ts->get_type(ts) == TS_IPV4_ADDR_RANGE &&
@@ -179,12 +179,12 @@ static bool manage_rule(struct iptc_handle *ipth, const char *chain,
 static bool manage_pre_esp_in_udp(struct iptc_handle *ipth,
                                                                  entry_t *entry, bool add)
 {
-       u_int16_t match_size    = XT_ALIGN(sizeof(struct ipt_entry_match)) +
+       uint16_t match_size     = XT_ALIGN(sizeof(struct ipt_entry_match)) +
                                                          XT_ALIGN(sizeof(struct xt_udp));
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_mark_tginfo2));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -240,12 +240,12 @@ static bool manage_pre_esp_in_udp(struct iptc_handle *ipth,
  */
 static bool manage_pre_esp(struct iptc_handle *ipth, entry_t *entry, bool add)
 {
-       u_int16_t match_size    = XT_ALIGN(sizeof(struct ipt_entry_match)) +
+       uint16_t match_size     = XT_ALIGN(sizeof(struct ipt_entry_match)) +
                                                          XT_ALIGN(sizeof(struct xt_esp));
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry)) + match_size;
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_mark_tginfo2));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -306,10 +306,10 @@ static bool manage_pre(struct iptc_handle *ipth, entry_t *entry, bool add)
  */
 static bool manage_out(struct iptc_handle *ipth, entry_t *entry, bool add)
 {
-       u_int16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry));
-       u_int16_t target_size   = XT_ALIGN(sizeof(struct ipt_entry_target)) +
+       uint16_t target_offset = XT_ALIGN(sizeof(struct ipt_entry));
+       uint16_t target_size    = XT_ALIGN(sizeof(struct ipt_entry_target)) +
                                                          XT_ALIGN(sizeof(struct xt_mark_tginfo2));
-       u_int16_t entry_size    = target_offset + target_size;
+       uint16_t entry_size     = target_offset + target_size;
        u_char ipt[entry_size], *pos = ipt;
        struct ipt_entry *e;
 
@@ -617,7 +617,7 @@ METHOD(listener_t, ike_update, bool,
  * Filter to map entries to ts/mark
  */
 static bool ts_filter(entry_t *entry, traffic_selector_t **ts,
-                                         traffic_selector_t **out, void *dummy, u_int32_t *mark,
+                                         traffic_selector_t **out, void *dummy, uint32_t *mark,
                                          void *dummy2, bool *reinject)
 {
        *out = *ts;
index 2b271a8e7a491333a3eac3826db1abf28c2b08b3..b20ef876adfc2abf7b65e0337ed5be67f2517117 100644 (file)
@@ -83,7 +83,7 @@ static host_t* offset2host(pool_t *pool, int offset)
 {
        chunk_t addr;
        host_t *host;
-       u_int32_t *pos;
+       uint32_t *pos;
 
        if (offset > pool->size)
        {
@@ -93,11 +93,11 @@ static host_t* offset2host(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);
@@ -111,7 +111,7 @@ static host_t* offset2host(pool_t *pool, int offset)
 static int host2offset(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))
        {
@@ -129,8 +129,8 @@ static int host2offset(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;
index 832dcf4acbee5daf988f2f2ef1cad82915263adb..8394eb7223511285318bb23fb94f5232010e4222 100644 (file)
@@ -206,7 +206,7 @@ static status_t rekey_children(ike_sa_t *ike_sa)
        linked_list_t *children;
        struct {
                protocol_id_t protocol;
-               u_int32_t spi;
+               uint32_t spi;
        } *info;
 
        children = linked_list_create();
index 7dafb16932eafc5083922aefc56ca4520c9f1142..8c9f66aa762978cc01ae431cf930d22bae090c26 100644 (file)
@@ -55,7 +55,7 @@ METHOD(listener_t, child_keys, bool,
        ha_message_t *m;
        chunk_t secret;
        proposal_t *proposal;
-       u_int16_t alg, len;
+       uint16_t alg, len;
        linked_list_t *local_ts, *remote_ts;
        enumerator_t *enumerator;
        traffic_selector_t *ts;
@@ -69,7 +69,7 @@ METHOD(listener_t, child_keys, bool,
        m = ha_message_create(HA_CHILD_ADD);
 
        m->add_attribute(m, HA_IKE_ID, ike_sa->get_id(ike_sa));
-       m->add_attribute(m, HA_INITIATOR, (u_int8_t)initiator);
+       m->add_attribute(m, HA_INITIATOR, (uint8_t)initiator);
        m->add_attribute(m, HA_INBOUND_SPI, child_sa->get_spi(child_sa, TRUE));
        m->add_attribute(m, HA_OUTBOUND_SPI, child_sa->get_spi(child_sa, FALSE));
        m->add_attribute(m, HA_INBOUND_CPI, child_sa->get_cpi(child_sa, TRUE));
index ce90f5bfeb0c4464faf871c8c87b8e6aec76a5c3..ee66b844246dcd090ee1a4f978acf8ecc0de51a4 100644 (file)
@@ -131,8 +131,8 @@ static void process_ike_add(private_ha_dispatcher_t *this, ha_message_t *message
        enumerator_t *enumerator;
        ike_sa_t *ike_sa = NULL, *old_sa = NULL;
        ike_version_t version = IKEV2;
-       u_int16_t encr = 0, len = 0, integ = 0, prf = 0, old_prf = PRF_UNDEFINED;
-       u_int16_t dh_grp = 0;
+       uint16_t encr = 0, len = 0, integ = 0, prf = 0, old_prf = PRF_UNDEFINED;
+       uint16_t dh_grp = 0;
        chunk_t nonce_i = chunk_empty, nonce_r = chunk_empty;
        chunk_t secret = chunk_empty, old_skd = chunk_empty;
        chunk_t dh_local = chunk_empty, dh_remote = chunk_empty, psk = chunk_empty;
@@ -486,7 +486,7 @@ static void process_ike_mid(private_ha_dispatcher_t *this,
        ha_message_value_t value;
        enumerator_t *enumerator;
        ike_sa_t *ike_sa = NULL;
-       u_int32_t mid = 0;
+       uint32_t mid = 0;
 
        enumerator = message->create_attribute_enumerator(message);
        while (enumerator->enumerate(enumerator, &attribute, &value))
@@ -652,11 +652,11 @@ static void process_child_add(private_ha_dispatcher_t *this,
        child_sa_t *child_sa;
        proposal_t *proposal;
        bool initiator = FALSE, failed = FALSE, ok = FALSE;
-       u_int32_t inbound_spi = 0, outbound_spi = 0;
-       u_int16_t inbound_cpi = 0, outbound_cpi = 0;
-       u_int8_t mode = MODE_TUNNEL, ipcomp = 0;
-       u_int16_t encr = 0, integ = 0, len = 0, dh_grp = 0;
-       u_int16_t esn = NO_EXT_SEQ_NUMBERS;
+       uint32_t inbound_spi = 0, outbound_spi = 0;
+       uint16_t inbound_cpi = 0, outbound_cpi = 0;
+       uint8_t mode = MODE_TUNNEL, ipcomp = 0;
+       uint16_t encr = 0, integ = 0, len = 0, dh_grp = 0;
+       uint16_t esn = NO_EXT_SEQ_NUMBERS;
        u_int seg_i, seg_o;
        chunk_t nonce_i = chunk_empty, nonce_r = chunk_empty, secret = chunk_empty;
        chunk_t encr_i, integ_i, encr_r, integ_r;
@@ -777,7 +777,7 @@ static void process_child_add(private_ha_dispatcher_t *this,
        if (ike_sa->get_version(ike_sa) == IKEV1)
        {
                keymat_v1_t *keymat_v1 = (keymat_v1_t*)ike_sa->get_keymat(ike_sa);
-               u_int32_t spi_i, spi_r;
+               uint32_t spi_i, spi_r;
 
                spi_i = initiator ? inbound_spi : outbound_spi;
                spi_r = initiator ? outbound_spi : inbound_spi;
@@ -889,7 +889,7 @@ static void process_child_delete(private_ha_dispatcher_t *this,
        enumerator_t *enumerator;
        ike_sa_t *ike_sa = NULL;
        child_sa_t *child_sa;
-       u_int32_t spi = 0;
+       uint32_t spi = 0;
 
        enumerator = message->create_attribute_enumerator(message);
        while (enumerator->enumerate(enumerator, &attribute, &value))
index 3ffcaee6b3e7393e244477a312e03a9d4e6e1d79..992ccb06cf7331a4d6c5e3078b24360bdd44ed5e 100644 (file)
@@ -78,7 +78,7 @@ METHOD(listener_t, ike_keys, bool,
        ha_message_t *m;
        chunk_t secret;
        proposal_t *proposal;
-       u_int16_t alg, len;
+       uint16_t alg, len;
 
        if (this->tunnel && this->tunnel->is_sa(this->tunnel, ike_sa))
        {       /* do not sync SA between nodes */
@@ -168,7 +168,7 @@ METHOD(listener_t, ike_updown, bool,
        {
                enumerator_t *enumerator;
                peer_cfg_t *peer_cfg;
-               u_int32_t extension, condition;
+               uint32_t extension, condition;
                host_t *addr;
                ike_sa_id_t *id;
                identification_t *eap_id;
@@ -349,7 +349,7 @@ METHOD(listener_t, message_hook, bool,
                ha_message_t *m;
                notify_payload_t *notify;
                chunk_t data;
-               u_int32_t seq;
+               uint32_t seq;
 
                notify = message->get_notify(message, DPD_R_U_THERE);
                if (notify)
index bd43dc35144c87b1871279f5ba2baed8fe9a6ec7..061741eb7628654f50c1ffd5e0ef5b3473a2646b 100644 (file)
@@ -15,8 +15,8 @@
 
 #include "ha_kernel.h"
 
-typedef u_int32_t u32;
-typedef u_int8_t u8;
+typedef uint32_t u32;
+typedef uint8_t u8;
 
 #include <sys/utsname.h>
 #include <string.h>
@@ -115,9 +115,9 @@ static jhash_version_t get_jhash_version()
 /**
  * jhash algorithm of two words, as used in kernel (using 0 as initval)
  */
-static u_int32_t jhash(jhash_version_t version, u_int32_t a, u_int32_t b)
+static uint32_t jhash(jhash_version_t version, uint32_t a, uint32_t b)
 {
-       u_int32_t c = 0;
+       uint32_t c = 0;
 
        switch (version)
        {
@@ -162,7 +162,7 @@ static u_int32_t jhash(jhash_version_t version, u_int32_t a, u_int32_t b)
 /**
  * Segmentate a calculated hash
  */
-static u_int hash2segment(private_ha_kernel_t *this, u_int64_t hash)
+static u_int hash2segment(private_ha_kernel_t *this, uint64_t hash)
 {
        return ((hash * this->count) >> 32) + 1;
 }
@@ -170,11 +170,11 @@ static u_int hash2segment(private_ha_kernel_t *this, u_int64_t hash)
 /**
  * Get a host as an integer for hashing
  */
-static u_int32_t host2int(host_t *host)
+static uint32_t host2int(host_t *host)
 {
        if (host->get_family(host) == AF_INET)
        {
-               return *(u_int32_t*)host->get_address(host).ptr;
+               return *(uint32_t*)host->get_address(host).ptr;
        }
        return 0;
 }
@@ -183,7 +183,7 @@ METHOD(ha_kernel_t, get_segment, u_int,
        private_ha_kernel_t *this, host_t *host)
 {
        unsigned long hash;
-       u_int32_t addr;
+       uint32_t addr;
 
        addr = host2int(host);
        hash = jhash(this->version, ntohl(addr), 0);
@@ -192,10 +192,10 @@ METHOD(ha_kernel_t, get_segment, u_int,
 }
 
 METHOD(ha_kernel_t, get_segment_spi, u_int,
-       private_ha_kernel_t *this, host_t *host, u_int32_t spi)
+       private_ha_kernel_t *this, host_t *host, uint32_t spi)
 {
        unsigned long hash;
-       u_int32_t addr;
+       uint32_t addr;
 
        addr = host2int(host);
        hash = jhash(this->version, ntohl(addr), ntohl(spi));
index 7b56f1e3ac67b32a9ad999e09e8349b4f446227b..bd0a3825bcbce8a158883054d4d852d99d79ea8d 100644 (file)
@@ -45,7 +45,7 @@ struct ha_kernel_t {
         * @param spi           SPI to include in hash
         * @return                      segment number
         */
-       u_int (*get_segment_spi)(ha_kernel_t *this, host_t *host, u_int32_t spi);
+       u_int (*get_segment_spi)(ha_kernel_t *this, host_t *host, uint32_t spi);
 
        /**
         * Get the segment an arbitrary integer is in.
index b40219ce1473af183c33a84292fcd4477cf530f1..42dfaf0e2125617693b194280fa6b95d5555514b 100644 (file)
@@ -67,10 +67,10 @@ typedef struct ike_sa_id_encoding_t ike_sa_id_encoding_t;
  * Encoding if an ike_sa_id_t
  */
 struct ike_sa_id_encoding_t {
-       u_int8_t ike_version;
-       u_int64_t initiator_spi;
-       u_int64_t responder_spi;
-       u_int8_t initiator;
+       uint8_t ike_version;
+       uint64_t initiator_spi;
+       uint64_t responder_spi;
+       uint8_t initiator;
 } __attribute__((packed));
 
 typedef struct identification_encoding_t identification_encoding_t;
@@ -79,8 +79,8 @@ typedef struct identification_encoding_t identification_encoding_t;
  * Encoding of a identification_t
  */
 struct identification_encoding_t {
-       u_int8_t type;
-       u_int8_t len;
+       uint8_t type;
+       uint8_t len;
        char encoding[];
 } __attribute__((packed));
 
@@ -90,8 +90,8 @@ typedef struct host_encoding_t host_encoding_t;
  * encoding of a host_t
  */
 struct host_encoding_t {
-       u_int16_t port;
-       u_int8_t family;
+       uint16_t port;
+       uint8_t family;
        char encoding[];
 } __attribute__((packed));
 
@@ -101,11 +101,11 @@ typedef struct ts_encoding_t ts_encoding_t;
  * encoding of a traffic_selector_t
  */
 struct ts_encoding_t {
-       u_int8_t type;
-       u_int8_t protocol;
-       u_int16_t from_port;
-       u_int16_t to_port;
-       u_int8_t dynamic;
+       uint8_t type;
+       uint8_t protocol;
+       uint16_t from_port;
+       uint16_t to_port;
+       uint8_t dynamic;
        char encoding[];
 } __attribute__((packed));
 
@@ -139,9 +139,9 @@ METHOD(ha_message_t, add_attribute, void,
        size_t len;
        va_list args;
 
-       check_buf(this, sizeof(u_int8_t));
+       check_buf(this, sizeof(uint8_t));
        this->buf.ptr[this->buf.len] = attribute;
-       this->buf.len += sizeof(u_int8_t);
+       this->buf.len += sizeof(uint8_t);
 
        va_start(args, attribute);
        switch (attribute)
@@ -215,13 +215,13 @@ METHOD(ha_message_t, add_attribute, void,
                        this->buf.len += len;
                        break;
                }
-               /* u_int8_t */
+               /* uint8_t */
                case HA_IKE_VERSION:
                case HA_INITIATOR:
                case HA_IPSEC_MODE:
                case HA_IPCOMP:
                {
-                       u_int8_t val;
+                       uint8_t val;
 
                        val = va_arg(args, u_int);
                        check_buf(this, sizeof(val));
@@ -229,7 +229,7 @@ METHOD(ha_message_t, add_attribute, void,
                        this->buf.len += sizeof(val);
                        break;
                }
-               /* u_int16_t */
+               /* uint16_t */
                case HA_ALG_DH:
                case HA_ALG_PRF:
                case HA_ALG_OLD_PRF:
@@ -241,26 +241,26 @@ METHOD(ha_message_t, add_attribute, void,
                case HA_SEGMENT:
                case HA_ESN:
                {
-                       u_int16_t val;
+                       uint16_t val;
 
                        val = va_arg(args, u_int);
                        check_buf(this, sizeof(val));
-                       *(u_int16_t*)(this->buf.ptr + this->buf.len) = htons(val);
+                       *(uint16_t*)(this->buf.ptr + this->buf.len) = htons(val);
                        this->buf.len += sizeof(val);
                        break;
                }
-               /** u_int32_t */
+               /** uint32_t */
                case HA_CONDITIONS:
                case HA_EXTENSIONS:
                case HA_INBOUND_SPI:
                case HA_OUTBOUND_SPI:
                case HA_MID:
                {
-                       u_int32_t val;
+                       uint32_t val;
 
                        val = va_arg(args, u_int);
                        check_buf(this, sizeof(val));
-                       *(u_int32_t*)(this->buf.ptr + this->buf.len) = htonl(val);
+                       *(uint32_t*)(this->buf.ptr + this->buf.len) = htonl(val);
                        this->buf.len += sizeof(val);
                        break;
                }
@@ -277,11 +277,11 @@ METHOD(ha_message_t, add_attribute, void,
                        chunk_t chunk;
 
                        chunk = va_arg(args, chunk_t);
-                       check_buf(this, chunk.len + sizeof(u_int16_t));
-                       *(u_int16_t*)(this->buf.ptr + this->buf.len) = htons(chunk.len);
-                       memcpy(this->buf.ptr + this->buf.len + sizeof(u_int16_t),
+                       check_buf(this, chunk.len + sizeof(uint16_t));
+                       *(uint16_t*)(this->buf.ptr + this->buf.len) = htons(chunk.len);
+                       memcpy(this->buf.ptr + this->buf.len + sizeof(uint16_t),
                                   chunk.ptr, chunk.len);
-                       this->buf.len += chunk.len + sizeof(u_int16_t);;
+                       this->buf.len += chunk.len + sizeof(uint16_t);;
                        break;
                }
                /** traffic_selector_t */
@@ -309,7 +309,7 @@ METHOD(ha_message_t, add_attribute, void,
                default:
                {
                        DBG1(DBG_CFG, "unable to encode, attribute %d unknown", attribute);
-                       this->buf.len -= sizeof(u_int8_t);
+                       this->buf.len -= sizeof(uint8_t);
                        break;
                }
        }
@@ -435,22 +435,22 @@ METHOD(enumerator_t, attribute_enumerate, bool,
                        this->buf = chunk_skip(this->buf, len + 1);
                        return TRUE;
                }
-               /* u_int8_t */
+               /* uint8_t */
                case HA_IKE_VERSION:
                case HA_INITIATOR:
                case HA_IPSEC_MODE:
                case HA_IPCOMP:
                {
-                       if (this->buf.len < sizeof(u_int8_t))
+                       if (this->buf.len < sizeof(uint8_t))
                        {
                                return FALSE;
                        }
-                       value->u8 = *(u_int8_t*)this->buf.ptr;
+                       value->u8 = *(uint8_t*)this->buf.ptr;
                        *attr_out = attr;
-                       this->buf = chunk_skip(this->buf, sizeof(u_int8_t));
+                       this->buf = chunk_skip(this->buf, sizeof(uint8_t));
                        return TRUE;
                }
-               /** u_int16_t */
+               /** uint16_t */
                case HA_ALG_DH:
                case HA_ALG_PRF:
                case HA_ALG_OLD_PRF:
@@ -462,29 +462,29 @@ METHOD(enumerator_t, attribute_enumerate, bool,
                case HA_SEGMENT:
                case HA_ESN:
                {
-                       if (this->buf.len < sizeof(u_int16_t))
+                       if (this->buf.len < sizeof(uint16_t))
                        {
                                return FALSE;
                        }
-                       value->u16 = ntohs(*(u_int16_t*)this->buf.ptr);
+                       value->u16 = ntohs(*(uint16_t*)this->buf.ptr);
                        *attr_out = attr;
-                       this->buf = chunk_skip(this->buf, sizeof(u_int16_t));
+                       this->buf = chunk_skip(this->buf, sizeof(uint16_t));
                        return TRUE;
                }
-               /** u_int32_t */
+               /** uint32_t */
                case HA_CONDITIONS:
                case HA_EXTENSIONS:
                case HA_INBOUND_SPI:
                case HA_OUTBOUND_SPI:
                case HA_MID:
                {
-                       if (this->buf.len < sizeof(u_int32_t))
+                       if (this->buf.len < sizeof(uint32_t))
                        {
                                return FALSE;
                        }
-                       value->u32 = ntohl(*(u_int32_t*)this->buf.ptr);
+                       value->u32 = ntohl(*(uint32_t*)this->buf.ptr);
                        *attr_out = attr;
-                       this->buf = chunk_skip(this->buf, sizeof(u_int32_t));
+                       this->buf = chunk_skip(this->buf, sizeof(uint32_t));
                        return TRUE;
                }
                /** chunk_t */
@@ -499,12 +499,12 @@ METHOD(enumerator_t, attribute_enumerate, bool,
                {
                        size_t len;
 
-                       if (this->buf.len < sizeof(u_int16_t))
+                       if (this->buf.len < sizeof(uint16_t))
                        {
                                return FALSE;
                        }
-                       len = ntohs(*(u_int16_t*)this->buf.ptr);
-                       this->buf = chunk_skip(this->buf, sizeof(u_int16_t));
+                       len = ntohs(*(uint16_t*)this->buf.ptr);
+                       this->buf = chunk_skip(this->buf, sizeof(uint16_t));
                        if (this->buf.len < len)
                        {
                                return FALSE;
index fe1786edf66bea77005f907753066feea4b4c7e4..630c8af8f0aeb41820da289f9b84cc23110b4ada 100644 (file)
@@ -92,9 +92,9 @@ enum ha_message_attribute_t {
        HA_REMOTE_ADDR,
        /** char*, name of configuration */
        HA_CONFIG_NAME,
-       /** u_int32_t, bitset of ike_condition_t */
+       /** uint32_t, bitset of ike_condition_t */
        HA_CONDITIONS,
-       /** u_int32_t, bitset of ike_extension_t */
+       /** uint32_t, bitset of ike_extension_t */
        HA_EXTENSIONS,
        /** host_t*, local virtual IP */
        HA_LOCAL_VIP,
@@ -102,7 +102,7 @@ enum ha_message_attribute_t {
        HA_REMOTE_VIP,
        /** host_t*, known peer addresses (used for MOBIKE) */
        HA_PEER_ADDR,
-       /** u_int8_t, initiator of an exchange, TRUE for local */
+       /** uint8_t, initiator of an exchange, TRUE for local */
        HA_INITIATOR,
        /** chunk_t, initiators nonce */
        HA_NONCE_I,
@@ -112,41 +112,41 @@ enum ha_message_attribute_t {
        HA_SECRET,
        /** chunk_t, SKd of old SA if rekeying */
        HA_OLD_SKD,
-       /** u_int16_t, pseudo random function */
+       /** uint16_t, pseudo random function */
        HA_ALG_PRF,
-       /** u_int16_t, old pseudo random function if rekeying */
+       /** uint16_t, old pseudo random function if rekeying */
        HA_ALG_OLD_PRF,
-       /** u_int16_t, encryption algorithm */
+       /** uint16_t, encryption algorithm */
        HA_ALG_ENCR,
-       /** u_int16_t, encryption key size in bytes */
+       /** uint16_t, encryption key size in bytes */
        HA_ALG_ENCR_LEN,
-       /** u_int16_t, integrity protection algorithm */
+       /** uint16_t, integrity protection algorithm */
        HA_ALG_INTEG,
-       /** u_int16_t, DH group */
+       /** uint16_t, DH group */
        HA_ALG_DH,
-       /** u_int8_t, IPsec mode, TUNNEL|TRANSPORT|... */
+       /** uint8_t, IPsec mode, TUNNEL|TRANSPORT|... */
        HA_IPSEC_MODE,
-       /** u_int8_t, IPComp protocol */
+       /** uint8_t, IPComp protocol */
        HA_IPCOMP,
-       /** u_int32_t, inbound security parameter index */
+       /** uint32_t, inbound security parameter index */
        HA_INBOUND_SPI,
-       /** u_int32_t, outbound security parameter index */
+       /** uint32_t, outbound security parameter index */
        HA_OUTBOUND_SPI,
-       /** u_int16_t, inbound security parameter index */
+       /** uint16_t, inbound security parameter index */
        HA_INBOUND_CPI,
-       /** u_int16_t, outbound security parameter index */
+       /** uint16_t, outbound security parameter index */
        HA_OUTBOUND_CPI,
        /** traffic_selector_t*, local traffic selector */
        HA_LOCAL_TS,
        /** traffic_selector_t*, remote traffic selector */
        HA_REMOTE_TS,
-       /** u_int32_t, message ID */
+       /** uint32_t, message ID */
        HA_MID,
-       /** u_int16_t, HA segment */
+       /** uint16_t, HA segment */
        HA_SEGMENT,
-       /** u_int16_t, Extended Sequence numbers */
+       /** uint16_t, Extended Sequence numbers */
        HA_ESN,
-       /** u_int8_t, IKE version */
+       /** uint8_t, IKE version */
        HA_IKE_VERSION,
        /** chunk_t, own DH public value */
        HA_LOCAL_DH,
@@ -162,9 +162,9 @@ enum ha_message_attribute_t {
  * Union to enumerate typed attributes in a message
  */
 union ha_message_value_t {
-       u_int8_t u8;
-       u_int16_t u16;
-       u_int32_t u32;
+       uint8_t u8;
+       uint16_t u16;
+       uint32_t u32;
        char *str;
        chunk_t chunk;
        ike_sa_id_t *ike_sa_id;
index 76da38082e5fba36715f055ec5004242c5f8a7bd..31d47e371fc9e5129d0c343f9f003a9f04555aa3 100644 (file)
@@ -25,7 +25,7 @@
 
 typedef struct ha_segments_t ha_segments_t;
 
-typedef u_int16_t segment_mask_t;
+typedef uint16_t segment_mask_t;
 
 /**
  * maximum number of segments
index dd2399366e2afee8e3f2244d983a309537c02ddb..fd8e6466a2b59f43e86438a85ad38a2b7f3b97ff 100644 (file)
@@ -79,7 +79,7 @@ struct private_ha_tunnel_t {
        /**
         * Reqid of installed trap
         */
-       u_int32_t trap;
+       uint32_t trap;
 
        /**
         * backend for HA SA
index ca126d7721bf604d4ed08dcd9c5203a2f4574ec2..5ca1e27bcecb7239a1428df98a7350275cba62e0 100644 (file)
@@ -34,17 +34,17 @@ struct private_ipseckey_t {
        /**
         * Precedence
         */
-       u_int8_t precedence;
+       uint8_t precedence;
 
        /**
         * Gateway type
         */
-       u_int8_t gateway_type;
+       uint8_t gateway_type;
 
        /**
         * Algorithm
         */
-       u_int8_t algorithm;
+       uint8_t algorithm;
 
        /**
         * Gateway
@@ -57,7 +57,7 @@ struct private_ipseckey_t {
        chunk_t public_key;
 };
 
-METHOD(ipseckey_t, get_precedence, u_int8_t,
+METHOD(ipseckey_t, get_precedence, uint8_t,
        private_ipseckey_t *this)
 {
        return this->precedence;
@@ -102,7 +102,7 @@ ipseckey_t *ipseckey_create_frm_rr(rr_t *rr)
 {
        private_ipseckey_t *this;
        bio_reader_t *reader = NULL;
-       u_int8_t label;
+       uint8_t label;
        chunk_t tmp;
 
        INIT(this,
index 5885daeee5f43a6829e89ddcd94efce91ebb9950..b19ec89209be5c2db9bfba7b5010074e070929cd 100644 (file)
@@ -85,7 +85,7 @@ struct ipseckey_t {
         *
         * @return              precedence
         */
-       u_int8_t (*get_precedence)(ipseckey_t *this);
+       uint8_t (*get_precedence)(ipseckey_t *this);
 
        /**
         * Get the type of the gateway.
index 3ff6dd87dd7d75adc1d69d0cc79db8fa06894e6d..6c041ce268f19a291126d852c70c2a434398dc99 100644 (file)
@@ -136,7 +136,7 @@ METHOD(credential_set_t, create_cert_enumerator, enumerator_t*,
        rr_set_t *rrset;
        rr_t *rrsig;
        bio_reader_t *reader;
-       u_int32_t nBefore, nAfter;
+       uint32_t nBefore, nAfter;
        chunk_t ignore;
        char *fqdn;
 
index 6a8a96821a9cf0a73bd8dc3eae265c2fa99703d9..3633213f3d9ee6899315c2f489d0da57b25b4f5a 100644 (file)
@@ -617,7 +617,7 @@ METHOD(kernel_net_t, del_ip, status_t,
  * Add or remove a route
  */
 static status_t manage_route(private_kernel_iph_net_t *this, bool add,
-                                       chunk_t dst, u_int8_t prefixlen, host_t *gtw, char *name)
+                                       chunk_t dst, uint8_t prefixlen, host_t *gtw, char *name)
 {
        MIB_IPFORWARD_ROW2 row = {
                .DestinationPrefix = {
@@ -705,14 +705,14 @@ static status_t manage_route(private_kernel_iph_net_t *this, bool add,
 }
 
 METHOD(kernel_net_t, add_route, status_t,
-       private_kernel_iph_net_t *this, chunk_t dst, u_int8_t prefixlen,
+       private_kernel_iph_net_t *this, chunk_t dst, uint8_t prefixlen,
        host_t *gateway, host_t *src, char *name)
 {
        return manage_route(this, TRUE, dst, prefixlen, gateway, name);
 }
 
 METHOD(kernel_net_t, del_route, status_t,
-       private_kernel_iph_net_t *this, chunk_t dst, u_int8_t prefixlen,
+       private_kernel_iph_net_t *this, chunk_t dst, uint8_t prefixlen,
        host_t *gateway, host_t *src, char *name)
 {
        return manage_route(this, FALSE, dst, prefixlen, gateway, name);
index 4c8771e96b449483baa8e4525224b8b502e3fc2b..e6274e846367d2cbb5bcc3dd74cba9f31547b557 100644 (file)
@@ -108,7 +108,7 @@ struct route_entry_t {
        /** Destination net */
        chunk_t dst_net;
        /** Destination net prefixlen */
-       u_int8_t prefixlen;
+       uint8_t prefixlen;
        /** Reference to exclude route, if any */
        exclude_route_t *exclude;
 };
@@ -151,15 +151,15 @@ typedef struct policy_entry_t policy_entry_t;
  */
 struct policy_entry_t {
        /** Direction of this policy: in, out, forward */
-       u_int8_t direction;
+       uint8_t direction;
        /** Parameters of installed policy */
        struct {
                /** Subnet and port */
                host_t *net;
                /** Subnet mask */
-               u_int8_t mask;
+               uint8_t mask;
                /** Protocol */
-               u_int8_t proto;
+               uint8_t proto;
        } src, dst;
        /** Associated route installed for this policy */
        route_entry_t *route;
@@ -222,7 +222,7 @@ static inline bool policy_entry_equals(policy_entry_t *a,
 /**
  * Expiration callback
  */
-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);
 }
@@ -235,24 +235,24 @@ METHOD(kernel_ipsec_t, get_features, kernel_feature_t,
 
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_kernel_libipsec_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_libipsec_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_libipsec_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)
 {
@@ -263,8 +263,8 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
 }
 
 METHOD(kernel_ipsec_t, update_sa, status_t,
-       private_kernel_libipsec_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_libipsec_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 NOT_SUPPORTED;
@@ -272,8 +272,8 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
 
 METHOD(kernel_ipsec_t, query_sa, status_t,
        private_kernel_libipsec_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);
@@ -281,7 +281,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
 
 METHOD(kernel_ipsec_t, del_sa, status_t,
        private_kernel_libipsec_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);
 }
@@ -641,7 +641,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
 }
 
 METHOD(kernel_ipsec_t, enable_udp_decap, bool,
-       private_kernel_libipsec_ipsec_t *this, int fd, int family, u_int16_t port)
+       private_kernel_libipsec_ipsec_t *this, int fd, int family, uint16_t port)
 {
        return NOT_SUPPORTED;
 }
index 6d9d63a98ba2c7444ee28942fd339b697e73edb3..cbce0a57bfc2f117bbfa0eee718e64f1e89d2b82 100644 (file)
@@ -347,7 +347,7 @@ struct route_entry_t {
        chunk_t dst_net;
 
        /** Destination net prefixlen */
-       u_int8_t prefixlen;
+       uint8_t prefixlen;
 };
 
 /**
@@ -470,7 +470,7 @@ typedef struct policy_sa_fwd_t policy_sa_fwd_t;
  */
 struct policy_sa_t {
        /** Priority assigned to the policy when installed with this SA */
-       u_int32_t priority;
+       uint32_t priority;
 
        /** Type of the policy */
        policy_type_t type;
@@ -546,13 +546,13 @@ typedef struct policy_entry_t policy_entry_t;
 struct policy_entry_t {
 
        /** Direction of this policy: in, out, forward */
-       u_int8_t direction;
+       uint8_t direction;
 
        /** Parameters of installed policy */
        struct xfrm_selector sel;
 
        /** Optional mark */
-       u_int32_t mark;
+       uint32_t mark;
 
        /** Associated route installed for this policy */
        route_entry_t *route;
@@ -561,7 +561,7 @@ struct policy_entry_t {
        linked_list_t *used_by;
 
        /** reqid for this policy */
-       u_int32_t reqid;
+       uint32_t reqid;
 };
 
 /**
@@ -606,10 +606,10 @@ static bool policy_equals(policy_entry_t *key, policy_entry_t *other_key)
 /**
  * Calculate the priority of a policy
  */
-static inline u_int32_t get_priority(policy_entry_t *policy,
+static inline uint32_t get_priority(policy_entry_t *policy,
                                                                         policy_priority_t prio)
 {
-       u_int32_t priority = PRIO_BASE;
+       uint32_t priority = PRIO_BASE;
        switch (prio)
        {
                case POLICY_PRIORITY_FALLBACK:
@@ -636,7 +636,7 @@ static inline u_int32_t get_priority(policy_entry_t *policy,
 /**
  * Convert the general ipsec mode to the one defined in xfrm.h
  */
-static u_int8_t mode2kernel(ipsec_mode_t mode)
+static uint8_t mode2kernel(ipsec_mode_t mode)
 {
        switch (mode)
        {
@@ -663,7 +663,7 @@ static void host2xfrm(host_t *host, xfrm_address_t *xfrm)
 /**
  * Convert a struct xfrm_address to a host_t
  */
-static host_t* xfrm2host(int family, xfrm_address_t *xfrm, u_int16_t port)
+static host_t* xfrm2host(int family, xfrm_address_t *xfrm, uint16_t port)
 {
        chunk_t chunk;
 
@@ -685,7 +685,7 @@ static host_t* xfrm2host(int family, xfrm_address_t *xfrm, u_int16_t port)
  * Convert a traffic selector address range to subnet and its mask.
  */
 static void ts2subnet(traffic_selector_t* ts,
-                                         xfrm_address_t *net, u_int8_t *mask)
+                                         xfrm_address_t *net, uint8_t *mask)
 {
        host_t *net_host;
        chunk_t net_chunk;
@@ -700,7 +700,7 @@ static void ts2subnet(traffic_selector_t* ts,
  * Convert a traffic selector port range to port/portmask
  */
 static void ts2ports(traffic_selector_t* ts,
-                                        u_int16_t *port, u_int16_t *mask)
+                                        uint16_t *port, uint16_t *mask)
 {
        uint16_t from, to, bitmask;
        int bit;
@@ -742,7 +742,7 @@ static struct xfrm_selector ts2selector(traffic_selector_t *src,
                                                                                traffic_selector_t *dst)
 {
        struct xfrm_selector sel;
-       u_int16_t port;
+       uint16_t port;
 
        memset(&sel, 0, sizeof(sel));
        sel.family = (src->get_type(src) == TS_IPV4_ADDR_RANGE) ? AF_INET : AF_INET6;
@@ -775,8 +775,8 @@ static struct xfrm_selector ts2selector(traffic_selector_t *src,
 static traffic_selector_t* selector2ts(struct xfrm_selector *sel, bool src)
 {
        u_char *addr;
-       u_int8_t prefixlen;
-       u_int16_t port = 0;
+       uint8_t prefixlen;
+       uint16_t port = 0;
        host_t *host = NULL;
 
        if (src)
@@ -833,7 +833,7 @@ static void process_acquire(private_kernel_netlink_ipsec_t *this,
        struct rtattr *rta;
        size_t rtasize;
        traffic_selector_t *src_ts, *dst_ts;
-       u_int32_t reqid = 0;
+       uint32_t reqid = 0;
        int proto = 0;
 
        acquire = NLMSG_DATA(hdr);
@@ -878,8 +878,8 @@ static void process_expire(private_kernel_netlink_ipsec_t *this,
                                                   struct nlmsghdr *hdr)
 {
        struct xfrm_user_expire *expire;
-       u_int32_t spi;
-       u_int8_t protocol;
+       uint32_t spi;
+       uint8_t protocol;
        host_t *dst;
 
        expire = NLMSG_DATA(hdr);
@@ -913,7 +913,7 @@ static void process_migrate(private_kernel_netlink_ipsec_t *this,
        host_t *local = NULL, *remote = NULL;
        host_t *old_src = NULL, *old_dst = NULL;
        host_t *new_src = NULL, *new_dst = NULL;
-       u_int32_t reqid = 0;
+       uint32_t reqid = 0;
        policy_dir_t dir;
 
        policy_id = NLMSG_DATA(hdr);
@@ -981,7 +981,7 @@ static void process_mapping(private_kernel_netlink_ipsec_t *this,
                                                        struct nlmsghdr *hdr)
 {
        struct xfrm_user_mapping *mapping;
-       u_int32_t spi;
+       uint32_t spi;
 
        mapping = NLMSG_DATA(hdr);
        spi = mapping->id.spi;
@@ -1080,13 +1080,13 @@ METHOD(kernel_ipsec_t, get_features, kernel_feature_t,
  * Get an SPI for a specific protocol from the kernel.
  */
 static status_t get_spi_internal(private_kernel_netlink_ipsec_t *this,
-       host_t *src, host_t *dst, u_int8_t proto, u_int32_t min, u_int32_t max,
-       u_int32_t *spi)
+       host_t *src, host_t *dst, uint8_t proto, uint32_t min, uint32_t max,
+       uint32_t *spi)
 {
        netlink_buf_t request;
        struct nlmsghdr *hdr, *out;
        struct xfrm_userspi_info *userspi;
-       u_int32_t received_spi = 0;
+       uint32_t received_spi = 0;
        size_t len;
 
        memset(&request, 0, sizeof(request));
@@ -1147,7 +1147,7 @@ static status_t get_spi_internal(private_kernel_netlink_ipsec_t *this,
 
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_kernel_netlink_ipsec_t *this, host_t *src, host_t *dst,
-       u_int8_t protocol, u_int32_t *spi)
+       uint8_t protocol, uint32_t *spi)
 {
        if (get_spi_internal(this, src, dst, protocol,
                                                 0xc0000000, 0xcFFFFFFF, spi) != SUCCESS)
@@ -1162,9 +1162,9 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
 
 METHOD(kernel_ipsec_t, get_cpi, status_t,
        private_kernel_netlink_ipsec_t *this, host_t *src, host_t *dst,
-       u_int16_t *cpi)
+       uint16_t *cpi)
 {
-       u_int32_t received_spi = 0;
+       uint32_t received_spi = 0;
 
        if (get_spi_internal(this, src, dst, IPPROTO_COMP,
                                                 0x100, 0xEFFF, &received_spi) != SUCCESS)
@@ -1173,7 +1173,7 @@ METHOD(kernel_ipsec_t, get_cpi, status_t,
                return FAILED;
        }
 
-       *cpi = htons((u_int16_t)ntohl(received_spi));
+       *cpi = htons((uint16_t)ntohl(received_spi));
 
        DBG2(DBG_KNL, "got CPI %.4x", ntohs(*cpi));
        return SUCCESS;
@@ -1201,10 +1201,10 @@ static bool add_mark(struct nlmsghdr *hdr, int buflen, mark_t mark)
 
 METHOD(kernel_ipsec_t, add_sa, status_t,
        private_kernel_netlink_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)
 {
@@ -1212,7 +1212,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
        char *alg_name;
        struct nlmsghdr *hdr;
        struct xfrm_usersa_info *sa;
-       u_int16_t icv_size = 64;
+       uint16_t icv_size = 64;
        ipsec_mode_t original_mode = mode;
        traffic_selector_t *first_src_ts, *first_dst_ts;
        status_t status = FAILED;
@@ -1483,7 +1483,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
 
        if (tfc && protocol == IPPROTO_ESP && mode == MODE_TUNNEL)
        {       /* the kernel supports TFC padding only for tunnel mode ESP SAs */
-               u_int32_t *tfcpad;
+               uint32_t *tfcpad;
 
                tfcpad = netlink_reserve(hdr, sizeof(request), XFRMA_TFCPAD,
                                                                 sizeof(*tfcpad));
@@ -1501,9 +1501,9 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
                        /* for ESN or larger replay windows we need the new
                         * XFRMA_REPLAY_ESN_VAL attribute to configure a bitmap */
                        struct xfrm_replay_state_esn *replay;
-                       u_int32_t bmp_size;
+                       uint32_t bmp_size;
 
-                       bmp_size = round_up(replay_window, sizeof(u_int32_t) * 8) / 8;
+                       bmp_size = round_up(replay_window, sizeof(uint32_t) * 8) / 8;
                        replay = netlink_reserve(hdr, sizeof(request), XFRMA_REPLAY_ESN_VAL,
                                                                         sizeof(*replay) + bmp_size);
                        if (!replay)
@@ -1511,7 +1511,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
                                goto failed;
                        }
                        /* bmp_len contains number uf __u32's */
-                       replay->bmp_len = bmp_size / sizeof(u_int32_t);
+                       replay->bmp_len = bmp_size / sizeof(uint32_t);
                        replay->replay_window = replay_window;
                        DBG2(DBG_KNL, "  using replay window of %u packets", replay_window);
 
@@ -1555,10 +1555,10 @@ failed:
  * Allocates into one the replay state structure we get from the kernel.
  */
 static void get_replay_state(private_kernel_netlink_ipsec_t *this,
-                                                        u_int32_t spi, u_int8_t protocol,
+                                                        uint32_t spi, uint8_t protocol,
                                                         host_t *dst, mark_t mark,
                                                         struct xfrm_replay_state_esn **replay_esn,
-                                                        u_int32_t *replay_esn_len,
+                                                        uint32_t *replay_esn_len,
                                                         struct xfrm_replay_state **replay,
                                                         struct xfrm_lifetime_cur **lifetime)
 {
@@ -1658,8 +1658,8 @@ static void get_replay_state(private_kernel_netlink_ipsec_t *this,
 
 METHOD(kernel_ipsec_t, query_sa, status_t,
        private_kernel_netlink_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)
 {
        netlink_buf_t request;
        struct nlmsghdr *out = NULL, *hdr;
@@ -1759,7 +1759,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
 
 METHOD(kernel_ipsec_t, del_sa, status_t,
        private_kernel_netlink_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)
 {
        netlink_buf_t request;
        struct nlmsghdr *hdr;
@@ -1816,8 +1816,8 @@ METHOD(kernel_ipsec_t, del_sa, status_t,
 }
 
 METHOD(kernel_ipsec_t, update_sa, status_t,
-       private_kernel_netlink_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_netlink_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)
 {
        netlink_buf_t request;
@@ -1831,7 +1831,7 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
        struct xfrm_replay_state *replay = NULL;
        struct xfrm_replay_state_esn *replay_esn = NULL;
        struct xfrm_lifetime_cur *lifetime = NULL;
-       u_int32_t replay_esn_len = 0;
+       uint32_t replay_esn_len = 0;
        status_t status = FAILED;
 
        /* if IPComp is used, we first update the IPComp SA */
@@ -2032,7 +2032,7 @@ METHOD(kernel_ipsec_t, flush_sas, status_t,
        struct nlmsghdr *hdr;
        struct xfrm_usersa_flush *flush;
        struct {
-               u_int8_t proto;
+               uint8_t proto;
                char *name;
        } protos[] = {
                { IPPROTO_AH, "AH" },
@@ -2115,7 +2115,7 @@ static status_t add_policy_internal(private_kernel_netlink_ipsec_t *this,
        {
                struct xfrm_user_tmpl *tmpl;
                struct {
-                       u_int8_t proto;
+                       uint8_t proto;
                        bool use;
                } protos[] = {
                        { IPPROTO_COMP, ipsec->cfg.ipcomp.transform != IPCOMP_NONE },
@@ -2491,7 +2491,7 @@ METHOD(kernel_ipsec_t, del_policy, status_t,
        struct nlmsghdr *hdr;
        struct xfrm_userpolicy_id *policy_id;
        bool is_installed = TRUE;
-       u_int32_t priority;
+       uint32_t priority;
        ipsec_sa_t assigned_sa = {
                .src = src,
                .dst = dst,
@@ -2699,7 +2699,7 @@ typedef struct {
        /** layer 4 protocol */
        int proto;
        /** port number, network order */
-       u_int16_t port;
+       uint16_t port;
 } bypass_t;
 
 /**
@@ -2839,7 +2839,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
 }
 
 METHOD(kernel_ipsec_t, enable_udp_decap, bool,
-       private_kernel_netlink_ipsec_t *this, int fd, int family, u_int16_t port)
+       private_kernel_netlink_ipsec_t *this, int fd, int family, uint16_t port)
 {
        int type = UDP_ENCAP_ESPINUDP;
 
index f4394a14fc9a0a1f1a9029308da7f800a8e121b1..e297e356a457ea1a8c53466941202265809e668d 100644 (file)
@@ -278,7 +278,7 @@ struct route_entry_t {
        chunk_t dst_net;
 
        /** Destination net prefixlen */
-       u_int8_t prefixlen;
+       uint8_t prefixlen;
 };
 
 /**
@@ -513,12 +513,12 @@ struct private_kernel_netlink_net_t {
        /**
         * MTU to set on installed routes
         */
-       u_int32_t mtu;
+       uint32_t mtu;
 
        /**
         * MSS to set on installed routes
         */
-       u_int32_t mss;
+       uint32_t mss;
 };
 
 /**
@@ -526,7 +526,7 @@ struct private_kernel_netlink_net_t {
  */
 static status_t manage_srcroute(private_kernel_netlink_net_t *this,
                                                                int nlmsg_type, int flags, chunk_t dst_net,
-                                                               u_int8_t prefixlen, host_t *gateway,
+                                                               uint8_t prefixlen, host_t *gateway,
                                                                host_t *src_ip, char *if_name);
 
 /**
@@ -1217,7 +1217,7 @@ static void process_route(private_kernel_netlink_net_t *this, struct nlmsghdr *h
        struct rtmsg* msg = NLMSG_DATA(hdr);
        struct rtattr *rta = RTM_RTA(msg);
        size_t rtasize = RTM_PAYLOAD(hdr);
-       u_int32_t rta_oif = 0;
+       uint32_t rta_oif = 0;
        host_t *host = NULL;
 
        /* ignore routes added by us or in the local routing table (local addrs) */
@@ -1243,7 +1243,7 @@ static void process_route(private_kernel_netlink_net_t *this, struct nlmsghdr *h
                        case RTA_OIF:
                                if (RTA_PAYLOAD(rta) == sizeof(rta_oif))
                                {
-                                       rta_oif = *(u_int32_t*)RTA_DATA(rta);
+                                       rta_oif = *(uint32_t*)RTA_DATA(rta);
                                }
                                break;
                }
@@ -1545,10 +1545,10 @@ typedef struct {
        chunk_t src;
        chunk_t dst;
        host_t *src_host;
-       u_int8_t dst_len;
-       u_int32_t table;
-       u_int32_t oif;
-       u_int32_t priority;
+       uint8_t dst_len;
+       uint32_t table;
+       uint32_t oif;
+       uint32_t priority;
 } rt_entry_t;
 
 /**
@@ -1630,20 +1630,20 @@ static rt_entry_t *parse_route(struct nlmsghdr *hdr, rt_entry_t *route)
                        case RTA_OIF:
                                if (RTA_PAYLOAD(rta) == sizeof(route->oif))
                                {
-                                       route->oif = *(u_int32_t*)RTA_DATA(rta);
+                                       route->oif = *(uint32_t*)RTA_DATA(rta);
                                }
                                break;
                        case RTA_PRIORITY:
                                if (RTA_PAYLOAD(rta) == sizeof(route->priority))
                                {
-                                       route->priority = *(u_int32_t*)RTA_DATA(rta);
+                                       route->priority = *(uint32_t*)RTA_DATA(rta);
                                }
                                break;
 #ifdef HAVE_RTA_TABLE
                        case RTA_TABLE:
                                if (RTA_PAYLOAD(rta) == sizeof(route->table))
                                {
-                                       route->table = *(u_int32_t*)RTA_DATA(rta);
+                                       route->table = *(uint32_t*)RTA_DATA(rta);
                                }
                                break;
 #endif /* HAVE_RTA_TABLE*/
@@ -2144,7 +2144,7 @@ METHOD(kernel_net_t, del_ip, status_t,
  */
 static status_t manage_srcroute(private_kernel_netlink_net_t *this,
                                                                int nlmsg_type, int flags, chunk_t dst_net,
-                                                               u_int8_t prefixlen, host_t *gateway,
+                                                               uint8_t prefixlen, host_t *gateway,
                                                                host_t *src_ip, char *if_name)
 {
        netlink_buf_t request;
@@ -2160,7 +2160,7 @@ static status_t manage_srcroute(private_kernel_netlink_net_t *this,
        if (this->routing_table == 0 && prefixlen == 0)
        {
                chunk_t half_net;
-               u_int8_t half_prefixlen;
+               uint8_t half_prefixlen;
                status_t status;
 
                half_net = chunk_alloca(dst_net.len);
@@ -2206,22 +2206,22 @@ static status_t manage_srcroute(private_kernel_netlink_net_t *this,
        if (this->mtu || this->mss)
        {
                chunk = chunk_alloca(RTA_LENGTH((sizeof(struct rtattr) +
-                                                                                sizeof(u_int32_t)) * 2));
+                                                                                sizeof(uint32_t)) * 2));
                chunk.len = 0;
                rta = (struct rtattr*)chunk.ptr;
                if (this->mtu)
                {
                        rta->rta_type = RTAX_MTU;
-                       rta->rta_len = RTA_LENGTH(sizeof(u_int32_t));
-                       memcpy(RTA_DATA(rta), &this->mtu, sizeof(u_int32_t));
+                       rta->rta_len = RTA_LENGTH(sizeof(uint32_t));
+                       memcpy(RTA_DATA(rta), &this->mtu, sizeof(uint32_t));
                        chunk.len = rta->rta_len;
                }
                if (this->mss)
                {
                        rta = (struct rtattr*)(chunk.ptr + RTA_ALIGN(chunk.len));
                        rta->rta_type = RTAX_ADVMSS;
-                       rta->rta_len = RTA_LENGTH(sizeof(u_int32_t));
-                       memcpy(RTA_DATA(rta), &this->mss, sizeof(u_int32_t));
+                       rta->rta_len = RTA_LENGTH(sizeof(uint32_t));
+                       memcpy(RTA_DATA(rta), &this->mss, sizeof(uint32_t));
                        chunk.len = RTA_ALIGN(chunk.len) + rta->rta_len;
                }
                netlink_add_attribute(hdr, RTA_METRICS, chunk, sizeof(request));
@@ -2231,7 +2231,7 @@ static status_t manage_srcroute(private_kernel_netlink_net_t *this,
 }
 
 METHOD(kernel_net_t, add_route, status_t,
-       private_kernel_netlink_net_t *this, chunk_t dst_net, u_int8_t prefixlen,
+       private_kernel_netlink_net_t *this, chunk_t dst_net, uint8_t prefixlen,
        host_t *gateway, host_t *src_ip, char *if_name)
 {
        status_t status;
@@ -2262,7 +2262,7 @@ METHOD(kernel_net_t, add_route, status_t,
 }
 
 METHOD(kernel_net_t, del_route, status_t,
-       private_kernel_netlink_net_t *this, chunk_t dst_net, u_int8_t prefixlen,
+       private_kernel_netlink_net_t *this, chunk_t dst_net, uint8_t prefixlen,
        host_t *gateway, host_t *src_ip, char *if_name)
 {
        status_t status;
@@ -2384,7 +2384,7 @@ static status_t init_address_list(private_kernel_netlink_net_t *this)
  * create or delete a rule to use our routing table
  */
 static status_t manage_rule(private_kernel_netlink_net_t *this, int nlmsg_type,
-                                                       int family, u_int32_t table, u_int32_t prio)
+                                                       int family, uint32_t table, uint32_t prio)
 {
        netlink_buf_t request;
        struct nlmsghdr *hdr;
index d505f1c3357d7ba2f13de0f06d120fb75e3fdd5b..880f2dc465a606a32dce02814210defe43d67674 100644 (file)
 #define SADB_X_EXT_NATT 0x002
        struct sadb_sa_2 {
                struct sadb_sa  sa;
-               u_int16_t               sadb_sa_natt_port;
-               u_int16_t               sadb_reserved0;
-               u_int32_t               sadb_reserved1;
+               uint16_t                sadb_sa_natt_port;
+               uint16_t                sadb_reserved0;
+               uint32_t                sadb_reserved1;
        };
 #endif
 
@@ -286,7 +286,7 @@ struct route_entry_t {
        chunk_t dst_net;
 
        /** destination net prefixlen */
-       u_int8_t prefixlen;
+       uint8_t prefixlen;
 
        /** reference to exclude route, if any */
        exclude_route_t *exclude;
@@ -407,7 +407,7 @@ typedef struct policy_sa_in_t policy_sa_in_t;
  */
 struct policy_sa_t {
        /** Priority assigned to the policy when installed with this SA */
-       u_int32_t priority;
+       uint32_t priority;
 
        /** Type of the policy */
        policy_type_t type;
@@ -481,19 +481,19 @@ typedef struct policy_entry_t policy_entry_t;
  */
 struct policy_entry_t {
        /** Index assigned by the kernel */
-       u_int32_t index;
+       uint32_t index;
 
        /** Direction of this policy: in, out, forward */
-       u_int8_t direction;
+       uint8_t direction;
 
        /** Parameters of installed policy */
        struct {
                /** Subnet and port */
                host_t *net;
                /** Subnet mask */
-               u_int8_t mask;
+               uint8_t mask;
                /** Protocol */
-               u_int8_t proto;
+               uint8_t proto;
        } src, dst;
 
        /** Associated route installed for this policy */
@@ -514,8 +514,8 @@ static policy_entry_t *create_policy_entry(traffic_selector_t *src_ts,
        INIT(policy,
                .direction = dir,
        );
-       u_int16_t port;
-       u_int8_t proto;
+       uint16_t port;
+       uint8_t proto;
 
        src_ts->to_subnet(src_ts, &policy->src.net, &policy->src.mask);
        dst_ts->to_subnet(dst_ts, &policy->dst.net, &policy->dst.mask);
@@ -583,7 +583,7 @@ static inline bool policy_entry_equals(policy_entry_t *current,
  * compare the given kernel index with that of a policy
  */
 static inline bool policy_entry_match_byindex(policy_entry_t *current,
-                                                                                         u_int32_t *index)
+                                                                                         uint32_t *index)
 {
        return current->index == *index;
 }
@@ -591,10 +591,10 @@ static inline bool policy_entry_match_byindex(policy_entry_t *current,
 /**
  * Calculate the priority of a policy
  */
-static inline u_int32_t get_priority(policy_entry_t *policy,
+static inline uint32_t get_priority(policy_entry_t *policy,
                                                                         policy_priority_t prio)
 {
-       u_int32_t priority = PRIO_BASE;
+       uint32_t priority = PRIO_BASE;
        switch (prio)
        {
                case POLICY_PRIORITY_FALLBACK:
@@ -697,7 +697,7 @@ ENUM(sadb_ext_type_names, SADB_EXT_RESERVED, SADB_EXT_MAX,
 /**
  * convert a protocol identifier to the PF_KEY sa type
  */
-static u_int8_t proto2satype(u_int8_t proto)
+static uint8_t proto2satype(uint8_t proto)
 {
        switch (proto)
        {
@@ -715,7 +715,7 @@ static u_int8_t proto2satype(u_int8_t proto)
 /**
  * convert a PF_KEY sa type to a protocol identifier
  */
-static u_int8_t satype2proto(u_int8_t satype)
+static uint8_t satype2proto(uint8_t satype)
 {
        switch (satype)
        {
@@ -733,7 +733,7 @@ static u_int8_t satype2proto(u_int8_t satype)
 /**
  * convert the general ipsec mode to the one defined in ipsec.h
  */
-static u_int8_t mode2kernel(ipsec_mode_t mode)
+static uint8_t mode2kernel(ipsec_mode_t mode)
 {
        switch (mode)
        {
@@ -753,7 +753,7 @@ static u_int8_t mode2kernel(ipsec_mode_t mode)
 /**
  * convert the general policy direction to the one defined in ipsec.h
  */
-static u_int8_t dir2kernel(policy_dir_t dir)
+static uint8_t dir2kernel(policy_dir_t dir)
 {
        switch (dir)
        {
@@ -773,7 +773,7 @@ static u_int8_t dir2kernel(policy_dir_t dir)
 /**
  * convert the policy type to the one defined in ipsec.h
  */
-static inline u_int16_t type2kernel(policy_type_t type)
+static inline uint16_t type2kernel(policy_type_t type)
 {
        switch (type)
        {
@@ -791,7 +791,7 @@ static inline u_int16_t type2kernel(policy_type_t type)
 /**
  * convert the policy direction in ipsec.h to the general one.
  */
-static policy_dir_t kernel2dir(u_int8_t  dir)
+static policy_dir_t kernel2dir(uint8_t  dir)
 {
        switch (dir)
        {
@@ -898,7 +898,7 @@ static kernel_algorithm_t compression_algs[] = {
 static int lookup_algorithm(transform_type_t type, int ikev2)
 {
        kernel_algorithm_t *list;
-       u_int16_t alg = 0;
+       uint16_t alg = 0;
 
        switch (type)
        {
@@ -929,7 +929,7 @@ static int lookup_algorithm(transform_type_t type, int ikev2)
 /**
  * Helper to set a port in a sockaddr_t, the port has to be in host order
  */
-static void set_port(sockaddr_t *addr, u_int16_t port)
+static void set_port(sockaddr_t *addr, uint16_t port)
 {
        switch (addr->sa_family)
        {
@@ -971,8 +971,8 @@ static size_t hostcpy(void *dest, host_t *host, bool include_port)
 /**
  * add a host to the given sadb_msg
  */
-static void add_addr_ext(struct sadb_msg *msg, host_t *host, u_int16_t type,
-                                                u_int8_t proto, u_int8_t prefixlen, bool include_port)
+static void add_addr_ext(struct sadb_msg *msg, host_t *host, uint16_t type,
+                                                uint8_t proto, uint8_t prefixlen, bool include_port)
 {
        struct sadb_address *addr = (struct sadb_address*)PFKEY_EXT_ADD_NEXT(msg);
        size_t len;
@@ -988,7 +988,7 @@ static void add_addr_ext(struct sadb_msg *msg, host_t *host, u_int16_t type,
 /**
  * adds an empty address extension to the given sadb_msg
  */
-static void add_anyaddr_ext(struct sadb_msg *msg, int family, u_int8_t type)
+static void add_anyaddr_ext(struct sadb_msg *msg, int family, uint8_t type)
 {
        socklen_t len = (family == AF_INET) ? sizeof(struct sockaddr_in) :
                                                                                  sizeof(struct sockaddr_in6);
@@ -1039,7 +1039,7 @@ static traffic_selector_t* sadb_address2ts(struct sadb_address *address)
 {
        traffic_selector_t *ts;
        host_t *host;
-       u_int8_t proto;
+       uint8_t proto;
 
        proto = address->sadb_address_proto;
        proto = proto == IPSEC_PROTO_ANY ? 0 : proto;
@@ -1240,7 +1240,7 @@ static void process_acquire(private_kernel_pfkey_ipsec_t *this,
                                                        struct sadb_msg* msg)
 {
        pfkey_msg_t response;
-       u_int32_t index, reqid = 0;
+       uint32_t index, reqid = 0;
        traffic_selector_t *src_ts, *dst_ts;
        policy_entry_t *policy;
        policy_sa_t *sa;
@@ -1292,8 +1292,8 @@ static void process_expire(private_kernel_pfkey_ipsec_t *this,
                                                   struct sadb_msg* msg)
 {
        pfkey_msg_t response;
-       u_int8_t protocol;
-       u_int32_t spi;
+       uint8_t protocol;
+       uint32_t spi;
        host_t *dst;
        bool hard;
 
@@ -1330,7 +1330,7 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this,
        pfkey_msg_t response;
        traffic_selector_t *src_ts, *dst_ts;
        policy_dir_t dir;
-       u_int32_t reqid = 0;
+       uint32_t reqid = 0;
        host_t *local = NULL, *remote = NULL;
 
        DBG2(DBG_KNL, "received an SADB_X_MIGRATE");
@@ -1350,13 +1350,13 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this,
        if (response.x_kmaddress)
        {
                sockaddr_t *local_addr, *remote_addr;
-               u_int32_t local_len;
+               uint32_t local_len;
 
                local_addr  = (sockaddr_t*)&response.x_kmaddress[1];
                local = host_create_from_sockaddr(local_addr);
                local_len = (local_addr->sa_family == AF_INET6)?
                                        sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in);
-               remote_addr = (sockaddr_t*)((u_int8_t*)local_addr + local_len);
+               remote_addr = (sockaddr_t*)((uint8_t*)local_addr + local_len);
                remote = host_create_from_sockaddr(remote_addr);
                DBG2(DBG_KNL, "  kmaddress: %H...%H", local, remote);
        }
@@ -1384,7 +1384,7 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this,
                                                        struct sadb_msg* msg)
 {
        pfkey_msg_t response;
-       u_int32_t spi;
+       uint32_t spi;
        sockaddr_t *sa;
        host_t *dst, *new;
 
@@ -1517,14 +1517,14 @@ static bool receive_events(private_kernel_pfkey_ipsec_t *this, int fd,
  */
 
 static status_t get_spi_internal(private_kernel_pfkey_ipsec_t *this,
-       host_t *src, host_t *dst, u_int8_t proto, u_int32_t min, u_int32_t max,
-       u_int32_t *spi)
+       host_t *src, host_t *dst, uint8_t proto, uint32_t min, uint32_t max,
+       uint32_t *spi)
 {
        unsigned char request[PFKEY_BUFFER_SIZE];
        struct sadb_msg *msg, *out;
        struct sadb_spirange *range;
        pfkey_msg_t response;
-       u_int32_t received_spi = 0;
+       uint32_t received_spi = 0;
        size_t len;
 
        memset(&request, 0, sizeof(request));
@@ -1570,7 +1570,7 @@ static status_t get_spi_internal(private_kernel_pfkey_ipsec_t *this,
 
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_kernel_pfkey_ipsec_t *this, host_t *src, host_t *dst,
-       u_int8_t protocol, u_int32_t *spi)
+       uint8_t protocol, uint32_t *spi)
 {
        if (get_spi_internal(this, src, dst, protocol,
                                                 0xc0000000, 0xcFFFFFFF, spi) != SUCCESS)
@@ -1585,9 +1585,9 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
 
 METHOD(kernel_ipsec_t, get_cpi, status_t,
        private_kernel_pfkey_ipsec_t *this, host_t *src, host_t *dst,
-       u_int16_t *cpi)
+       uint16_t *cpi)
 {
-       u_int32_t received_spi = 0;
+       uint32_t received_spi = 0;
 
        DBG2(DBG_KNL, "getting CPI");
 
@@ -1598,18 +1598,18 @@ METHOD(kernel_ipsec_t, get_cpi, status_t,
                return FAILED;
        }
 
-       *cpi = htons((u_int16_t)ntohl(received_spi));
+       *cpi = htons((uint16_t)ntohl(received_spi));
 
        DBG2(DBG_KNL, "got CPI %.4x", ntohs(*cpi));
        return SUCCESS;
 }
 
 METHOD(kernel_ipsec_t, add_sa, status_t,
-       private_kernel_pfkey_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,
+       private_kernel_pfkey_ipsec_t *this, host_t *src, host_t *dst, uint32_t spi,
+       uint8_t protocol, uint32_t reqid, mark_t mark, uint32_t tfc,
+       lifetime_cfg_t *lifetime, uint16_t enc_alg, chunk_t enc_key,
+       uint16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
+       uint16_t ipcomp, uint16_t cpi, uint32_t replay_window,
        bool initiator, bool encap, bool esn, bool inbound, bool update,
        linked_list_t *src_ts, linked_list_t *dst_ts)
 {
@@ -1793,8 +1793,8 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
 }
 
 METHOD(kernel_ipsec_t, update_sa, status_t,
-       private_kernel_pfkey_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_pfkey_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)
 {
        unsigned char request[PFKEY_BUFFER_SIZE];
@@ -1936,8 +1936,8 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
 
 METHOD(kernel_ipsec_t, query_sa, status_t,
        private_kernel_pfkey_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)
 {
        unsigned char request[PFKEY_BUFFER_SIZE];
        struct sadb_msg *msg, *out;
@@ -2014,7 +2014,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
 
 METHOD(kernel_ipsec_t, del_sa, status_t,
        private_kernel_pfkey_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)
 {
        unsigned char request[PFKEY_BUFFER_SIZE];
        struct sadb_msg *msg, *out;
@@ -2074,7 +2074,7 @@ METHOD(kernel_ipsec_t, flush_sas, status_t,
        unsigned char request[PFKEY_BUFFER_SIZE];
        struct sadb_msg *msg, *out;
        struct {
-               u_int8_t proto;
+               uint8_t proto;
                char *name;
        } protos[] = {
                { SADB_SATYPE_AH, "AH" },
@@ -2698,7 +2698,7 @@ METHOD(kernel_ipsec_t, del_policy, status_t,
        policy_sa_t *mapping, *to_remove = NULL;
        enumerator_t *enumerator;
        bool first = TRUE, is_installed = TRUE;
-       u_int32_t priority;
+       uint32_t priority;
        size_t len;
        ipsec_sa_t assigned_sa = {
                .src = src,
@@ -2876,7 +2876,7 @@ METHOD(kernel_ipsec_t, flush_policies, status_t,
  * Register a socket for ACQUIRE/EXPIRE messages
  */
 static status_t register_pfkey_socket(private_kernel_pfkey_ipsec_t *this,
-                                                                         u_int8_t satype)
+                                                                         uint8_t satype)
 {
        unsigned char request[PFKEY_BUFFER_SIZE];
        struct sadb_msg *msg, *out;
@@ -2931,7 +2931,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
        }
 
        memset(&policy, 0, sizeof(policy));
-       policy.sadb_x_policy_len = sizeof(policy) / sizeof(u_int64_t);
+       policy.sadb_x_policy_len = sizeof(policy) / sizeof(uint64_t);
        policy.sadb_x_policy_exttype = SADB_X_EXT_POLICY;
        policy.sadb_x_policy_type = IPSEC_POLICY_BYPASS;
 
@@ -2953,7 +2953,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
 }
 
 METHOD(kernel_ipsec_t, enable_udp_decap, bool,
-       private_kernel_pfkey_ipsec_t *this, int fd, int family, u_int16_t port)
+       private_kernel_pfkey_ipsec_t *this, int fd, int family, uint16_t port)
 {
 #ifndef __APPLE__
        int type = UDP_ENCAP_ESPINUDP;
index 4eebdfdade7daa04f818830594a24b0e70843150..5ab39bbfec282ea050bea4c795bc0b0876066bf6 100644 (file)
@@ -209,7 +209,7 @@ struct route_entry_t {
        chunk_t dst_net;
 
        /** Destination net prefixlen */
-       u_int8_t prefixlen;
+       uint8_t prefixlen;
 };
 
 /**
@@ -420,7 +420,7 @@ struct private_kernel_pfroute_net_t
  * Forward declaration
  */
 static status_t manage_route(private_kernel_pfroute_net_t *this, int op,
-                                                        chunk_t dst_net, u_int8_t prefixlen,
+                                                        chunk_t dst_net, uint8_t prefixlen,
                                                         host_t *gateway, char *if_name);
 
 /**
@@ -1381,7 +1381,7 @@ static void add_rt_ifname(struct rt_msghdr *hdr, int type, char *name)
  * Add or remove a route
  */
 static status_t manage_route(private_kernel_pfroute_net_t *this, int op,
-                                                        chunk_t dst_net, u_int8_t prefixlen,
+                                                        chunk_t dst_net, uint8_t prefixlen,
                                                         host_t *gateway, char *if_name)
 {
        struct {
@@ -1473,7 +1473,7 @@ static status_t manage_route(private_kernel_pfroute_net_t *this, int op,
 }
 
 METHOD(kernel_net_t, add_route, status_t,
-       private_kernel_pfroute_net_t *this, chunk_t dst_net, u_int8_t prefixlen,
+       private_kernel_pfroute_net_t *this, chunk_t dst_net, uint8_t prefixlen,
        host_t *gateway, host_t *src_ip, char *if_name)
 {
        status_t status;
@@ -1502,7 +1502,7 @@ METHOD(kernel_net_t, add_route, status_t,
 }
 
 METHOD(kernel_net_t, del_route, status_t,
-       private_kernel_pfroute_net_t *this, chunk_t dst_net, u_int8_t prefixlen,
+       private_kernel_pfroute_net_t *this, chunk_t dst_net, uint8_t prefixlen,
        host_t *gateway, host_t *src_ip, char *if_name)
 {
        status_t status;
index e1c4298858d0b13fd5dd8ce7acb167242025f13e..086d06e85dc34cb8b33d22097ee2a4f97a7277ee 100644 (file)
@@ -45,7 +45,7 @@ struct private_kernel_wfp_ipsec_t {
        /**
         * Mix value to distribute SPI allocation randomly
         */
-       u_int32_t mixspi;
+       uint32_t mixspi;
 
        /**
         * IKE bypass filters, as UINT64 filter LUID
@@ -103,16 +103,16 @@ struct private_kernel_wfp_ipsec_t {
  */
 typedef struct {
        /** SPI for this SA */
-       u_int32_t spi;
+       uint32_t spi;
        /** protocol, IPPROTO_ESP/IPPROTO_AH */
-       u_int8_t protocol;
+       uint8_t protocol;
        /** hard lifetime of SA */
-       u_int32_t lifetime;
+       uint32_t lifetime;
        /** destination host address for this SPI */
        host_t *dst;
        struct {
                /** algorithm */
-               u_int16_t alg;
+               uint16_t alg;
                /** key */
                chunk_t key;
        } integ, encr;
@@ -144,13 +144,13 @@ typedef struct {
        /** policy destinaiton addresses */
        traffic_selector_t *dst;
        /** WFP allocated LUID for inbound filter ID */
-       u_int64_t policy_in;
+       uint64_t policy_in;
        /** WFP allocated LUID for outbound filter ID */
-       u_int64_t policy_out;
+       uint64_t policy_out;
        /** WFP allocated LUID for forward inbound filter ID, tunnel mode only */
-       u_int64_t policy_fwd_in;
+       uint64_t policy_fwd_in;
        /** WFP allocated LUID for forward outbound filter ID, tunnel mode only */
-       u_int64_t policy_fwd_out;
+       uint64_t policy_fwd_out;
        /** have installed a route for it? */
        bool route;
 } sp_entry_t;
@@ -170,7 +170,7 @@ static void sp_entry_destroy(sp_entry_t *sp)
  */
 typedef struct {
        /** reqid of entry */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** outer address on local host */
        host_t *local;
        /** outer address on remote host */
@@ -186,17 +186,17 @@ typedef struct {
        /** UDP encapsulation */
        bool encap;
        /** provider context, for tunnel mode only */
-       u_int64_t provider;
+       uint64_t provider;
        /** WFP allocated LUID for SA context */
-       u_int64_t sa_id;
+       uint64_t sa_id;
        /** WFP allocated LUID for tunnel mode IP-IPv4 inbound filter */
-       u_int64_t ip_ipv4_in;
+       uint64_t ip_ipv4_in;
        /** WFP allocated LUID for tunnel mode IP-IPv4 outbound filter */
-       u_int64_t ip_ipv4_out;
+       uint64_t ip_ipv4_out;
        /** WFP allocated LUID for tunnel mode IP-IPv6 inbound filter */
-       u_int64_t ip_ipv6_in;
+       uint64_t ip_ipv6_in;
        /** WFP allocated LUID for tunnel mode IP-IPv6 outbound filter */
-       u_int64_t ip_ipv6_out;
+       uint64_t ip_ipv6_out;
 } entry_t;
 
 /**
@@ -206,7 +206,7 @@ typedef struct {
        /** destination net of route */
        host_t *dst;
        /** prefix length of dst */
-       u_int8_t mask;
+       uint8_t mask;
        /** source address for route */
        host_t *src;
        /** gateway of route, NULL if directly attached */
@@ -348,9 +348,9 @@ static FWPM_FILTER_CONDITION0 *append_condition(FWPM_FILTER_CONDITION0 *conds[],
 /**
  * Convert an IPv4 prefix to a host order subnet mask
  */
-static u_int32_t prefix2mask(u_int8_t prefix)
+static uint32_t prefix2mask(uint8_t prefix)
 {
-       u_int8_t netmask[4] = {};
+       uint8_t netmask[4] = {};
        int i;
 
        for (i = 0; i < sizeof(netmask); i++)
@@ -370,7 +370,7 @@ static u_int32_t prefix2mask(u_int8_t prefix)
  * Convert a 16-bit range to a WFP condition
  */
 static void range2cond(FWPM_FILTER_CONDITION0 *cond,
-                                          u_int16_t from, u_int16_t to)
+                                          uint16_t from, uint16_t to)
 {
        if (from == to)
        {
@@ -399,11 +399,11 @@ static bool ts2condition(traffic_selector_t *ts, const GUID *target,
        FWPM_FILTER_CONDITION0 *cond;
        FWP_BYTE_ARRAY16 *addr;
        FWP_RANGE0 *range;
-       u_int16_t from_port, to_port;
+       uint16_t from_port, to_port;
        void *from, *to;
-       u_int8_t proto;
+       uint8_t proto;
        host_t *net;
-       u_int8_t prefix;
+       uint8_t prefix;
 
        from = ts->get_from_address(ts).ptr;
        to = ts->get_to_address(ts).ptr;
@@ -496,7 +496,7 @@ static bool ts2condition(traffic_selector_t *ts, const GUID *target,
        {
                if (target == &FWPM_CONDITION_IP_LOCAL_ADDRESS)
                {
-                       u_int8_t from_type, to_type, from_code, to_code;
+                       uint8_t from_type, to_type, from_code, to_code;
 
                        from_type = traffic_selector_icmp_type(from_port);
                        to_type = traffic_selector_icmp_type(to_port);
@@ -736,7 +736,7 @@ static bool install_sp(private_kernel_wfp_ipsec_t *this, sp_entry_t *sp,
  */
 static bool install_ipip_ale(private_kernel_wfp_ipsec_t *this,
                                                         host_t *local, host_t *remote, GUID *context,
-                                                        bool inbound, int proto, u_int64_t *filter_id)
+                                                        bool inbound, int proto, uint64_t *filter_id)
 {
        traffic_selector_t *lts, *rts;
        FWPM_FILTER_CONDITION0 *conds = NULL;
@@ -1013,7 +1013,7 @@ static bool install_sa(private_kernel_wfp_ipsec_t *this, entry_t *entry,
                .ipVersion = version,
        };
        struct {
-               u_int16_t alg;
+               uint16_t alg;
                chunk_t key;
        } integ = {}, encr = {};
        DWORD res;
@@ -1099,9 +1099,9 @@ static bool install_sa(private_kernel_wfp_ipsec_t *this, entry_t *entry,
  */
 static void host2address6(host_t *host, void *out)
 {
-       u_int32_t *src, *dst = out;
+       uint32_t *src, *dst = out;
 
-       src = (u_int32_t*)host->get_address(host).ptr;
+       src = (uint32_t*)host->get_address(host).ptr;
 
        dst[0] = untoh32(&src[3]);
        dst[1] = untoh32(&src[2]);
@@ -1273,7 +1273,7 @@ static bool generate_guid(private_kernel_wfp_ipsec_t *this, GUID *guid)
        {
                return FALSE;
        }
-       ok = rng->get_bytes(rng, sizeof(GUID), (u_int8_t*)guid);
+       ok = rng->get_bytes(rng, sizeof(GUID), (uint8_t*)guid);
        rng->destroy(rng);
        return ok;
 }
@@ -1379,7 +1379,7 @@ static bool install_tunnel_sps(private_kernel_wfp_ipsec_t *this, entry_t *entry)
  * Reduce refcount, or uninstall a route if all refs gone
  */
 static bool uninstall_route(private_kernel_wfp_ipsec_t *this,
-                                                       host_t *dst, u_int8_t mask, host_t *src, host_t *gtw)
+                                                       host_t *dst, uint8_t mask, host_t *src, host_t *gtw)
 {
        route_t *route, key = {
                .dst = dst,
@@ -1421,7 +1421,7 @@ static bool uninstall_route(private_kernel_wfp_ipsec_t *this,
  * Install a single route, or refcount if exists
  */
 static bool install_route(private_kernel_wfp_ipsec_t *this,
-                                                 host_t *dst, u_int8_t mask, host_t *src, host_t *gtw)
+                                                 host_t *dst, uint8_t mask, host_t *src, host_t *gtw)
 {
        route_t *route, key = {
                .dst = dst,
@@ -1476,7 +1476,7 @@ static bool manage_route(private_kernel_wfp_ipsec_t *this,
                                                 bool add)
 {
        host_t *src, *dst, *gtw;
-       u_int8_t mask;
+       uint8_t mask;
        bool done;
 
        if (!dst_ts->to_subnet(dst_ts, &dst, &mask))
@@ -1578,7 +1578,7 @@ static bool install(private_kernel_wfp_ipsec_t *this, entry_t *entry)
  */
 typedef struct {
        /** reqid this trap is installed for */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** is this a forward policy trap for tunnel mode? */
        bool fwd;
        /** do we have installed a route for this trap policy? */
@@ -1629,7 +1629,7 @@ static u_int hash_trap(trap_t *trap)
 static void acquire(private_kernel_wfp_ipsec_t *this, UINT64 filter_id,
                                        traffic_selector_t *src, traffic_selector_t *dst)
 {
-       u_int32_t reqid = 0;
+       uint32_t reqid = 0;
        trap_t *trap, key = {
                .filter_id = filter_id,
        };
@@ -1654,7 +1654,7 @@ static void acquire(private_kernel_wfp_ipsec_t *this, UINT64 filter_id,
  * Create a single host traffic selector from an FWP address definition
  */
 static traffic_selector_t *addr2ts(FWP_IP_VERSION version, void *data,
-                                       u_int8_t protocol, u_int16_t from_port, u_int16_t to_port)
+                                       uint8_t protocol, uint16_t from_port, uint16_t to_port)
 {
        ts_type_t type;
        UINT32 ints[4];
@@ -1689,9 +1689,9 @@ static void WINAPI event_callback(void *user, const FWPM_NET_EVENT1 *event)
 {
        private_kernel_wfp_ipsec_t *this = user;
        traffic_selector_t *local = NULL, *remote = NULL;
-       u_int8_t protocol = 0;
-       u_int16_t from_local = 0, to_local = 65535;
-       u_int16_t from_remote = 0, to_remote = 65535;
+       uint8_t protocol = 0;
+       uint16_t from_local = 0, to_local = 65535;
+       uint16_t from_remote = 0, to_remote = 65535;
 
        if ((event->header.flags & FWPM_NET_EVENT_FLAG_LOCAL_ADDR_SET) &&
                (event->header.flags & FWPM_NET_EVENT_FLAG_REMOTE_ADDR_SET))
@@ -1861,7 +1861,7 @@ static bool uninstall_trap(private_kernel_wfp_ipsec_t *this, trap_t *trap)
  * Create and install a new trap entry
  */
 static bool add_trap(private_kernel_wfp_ipsec_t *this,
-                                        u_int32_t reqid, bool fwd, host_t *local, host_t *remote,
+                                        uint32_t reqid, bool fwd, host_t *local, host_t *remote,
                                         traffic_selector_t *src, traffic_selector_t *dst)
 {
        trap_t *trap;
@@ -1893,7 +1893,7 @@ static bool add_trap(private_kernel_wfp_ipsec_t *this,
  * Uninstall and remove a new trap entry
  */
 static bool remove_trap(private_kernel_wfp_ipsec_t *this,
-                                               u_int32_t reqid, bool fwd,
+                                               uint32_t reqid, bool fwd,
                                                traffic_selector_t *src, traffic_selector_t *dst)
 {
        enumerator_t *enumerator;
@@ -1949,10 +1949,10 @@ static bool init_spi(private_kernel_wfp_ipsec_t *this)
        {
                return FALSE;
        }
-       ok = rng->get_bytes(rng, sizeof(this->nextspi), (u_int8_t*)&this->nextspi);
+       ok = rng->get_bytes(rng, sizeof(this->nextspi), (uint8_t*)&this->nextspi);
        if (ok)
        {
-               ok = rng->get_bytes(rng, sizeof(this->mixspi), (u_int8_t*)&this->mixspi);
+               ok = rng->get_bytes(rng, sizeof(this->mixspi), (uint8_t*)&this->mixspi);
        }
        rng->destroy(rng);
        return ok;
@@ -1966,7 +1966,7 @@ static u_int permute(u_int x, u_int p)
        u_int qr;
 
        x = x % p;
-       qr = ((u_int64_t)x * x) % p;
+       qr = ((uint64_t)x * x) % p;
        if (x <= p / 2)
        {
                return qr;
@@ -1976,7 +1976,7 @@ static u_int permute(u_int x, u_int p)
 
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_kernel_wfp_ipsec_t *this, host_t *src, host_t *dst,
-       u_int8_t protocol, u_int32_t *spi)
+       uint8_t protocol, uint32_t *spi)
 {
        /* To avoid sequencial SPIs, we use a one-to-one permuation function on
         * an incrementing counter, that is a full period PRNG for the range we
@@ -1993,7 +1993,7 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
 
 METHOD(kernel_ipsec_t, get_cpi, status_t,
        private_kernel_wfp_ipsec_t *this, host_t *src, host_t *dst,
-       u_int16_t *cpi)
+       uint16_t *cpi)
 {
        return NOT_SUPPORTED;
 }
@@ -2005,7 +2005,7 @@ typedef struct {
        /* backref to kernel backend */
        private_kernel_wfp_ipsec_t *this;
        /* SPI of expiring SA */
-       u_int32_t spi;
+       uint32_t spi;
        /* destination address of expiring SA */
        host_t *dst;
        /* is this a hard expire, or a rekey request? */
@@ -2027,7 +2027,7 @@ static void expire_data_destroy(expire_data_t *data)
 static job_requeue_t expire_job(expire_data_t *data)
 {
        private_kernel_wfp_ipsec_t *this = data->this;
-       u_int8_t protocol;
+       uint8_t protocol;
        entry_t *entry = NULL;
        sa_entry_t key = {
                .spi = data->spi,
@@ -2074,8 +2074,8 @@ static job_requeue_t expire_job(expire_data_t *data)
 /**
  * Schedule an expire event for an SA
  */
-static void schedule_expire(private_kernel_wfp_ipsec_t *this, u_int32_t spi,
-                                                       host_t *dst, u_int32_t lifetime, bool hard)
+static void schedule_expire(private_kernel_wfp_ipsec_t *this, uint32_t spi,
+                                                       host_t *dst, uint32_t lifetime, bool hard)
 {
        expire_data_t *data;
 
@@ -2094,10 +2094,10 @@ static void schedule_expire(private_kernel_wfp_ipsec_t *this, u_int32_t spi,
 
 METHOD(kernel_ipsec_t, add_sa, status_t,
        private_kernel_wfp_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)
 {
@@ -2186,8 +2186,8 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
 }
 
 METHOD(kernel_ipsec_t, update_sa, status_t,
-       private_kernel_wfp_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_wfp_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)
 {
        entry_t *entry;
@@ -2291,8 +2291,8 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
 
 METHOD(kernel_ipsec_t, query_sa, status_t,
        private_kernel_wfp_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)
 {
        /* It does not seem that WFP provides any means of getting per-SA traffic
         * statistics. IPsecGetStatistics0/1() provides global stats, and
@@ -2303,7 +2303,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
 
 METHOD(kernel_ipsec_t, del_sa, status_t,
        private_kernel_wfp_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)
 {
        entry_t *entry;
        sa_entry_t key = {
@@ -2479,7 +2479,7 @@ METHOD(kernel_ipsec_t, flush_policies, status_t,
  * Add a bypass policy for a specific UDP port
  */
 static bool add_bypass(private_kernel_wfp_ipsec_t *this,
-                                          int family, u_int16_t port, bool inbound, UINT64 *luid)
+                                          int family, uint16_t port, bool inbound, UINT64 *luid)
 {
        FWPM_FILTER_CONDITION0 *cond, *conds = NULL;
        int count = 0;
@@ -2547,7 +2547,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
        } saddr;
        int addrlen = sizeof(saddr);
        UINT64 filter_out, filter_in = 0;
-       u_int16_t port;
+       uint16_t port;
 
        if (getsockname(fd, &saddr.sa, &addrlen) == SOCKET_ERROR)
        {
@@ -2584,7 +2584,7 @@ METHOD(kernel_ipsec_t, bypass_socket, bool,
 }
 
 METHOD(kernel_ipsec_t, enable_udp_decap, bool,
-       private_kernel_wfp_ipsec_t *this, int fd, int family, u_int16_t port)
+       private_kernel_wfp_ipsec_t *this, int fd, int family, uint16_t port)
 {
        return FALSE;
 }
index 8f6abde0c17cec65264deed614e1b0bd6b8a0463..9366556fc5c70892ef3da3b91f62404b78d06811 100644 (file)
@@ -124,7 +124,7 @@ struct private_load_tester_config_t {
        /**
         * Current port for unique initiator ports
         */
-       u_int16_t unique_port;
+       uint16_t unique_port;
 
        /**
         * IKE_SA rekeying delay
@@ -154,7 +154,7 @@ struct private_load_tester_config_t {
        /**
         * Dynamic source port, if used
         */
-       u_int16_t port;
+       uint16_t port;
 
        /**
         * IKE version to use for load testing
@@ -454,8 +454,8 @@ static void generate_auth_cfg(private_load_tester_config_t *this, char *str,
 /**
  * Parse a protoport specifier
  */
-static bool parse_protoport(char *token, u_int16_t *from_port,
-                                                       u_int16_t *to_port, u_int8_t *protocol)
+static bool parse_protoport(char *token, uint16_t *from_port,
+                                                       uint16_t *to_port, uint8_t *protocol)
 {
        char *sep, *port = "", *endptr;
        struct protoent *proto;
@@ -494,7 +494,7 @@ static bool parse_protoport(char *token, u_int16_t *from_port,
                        {
                                return FALSE;
                        }
-                       *protocol = (u_int8_t)p;
+                       *protocol = (uint8_t)p;
                }
        }
        if (streq(port, "%any"))
@@ -557,8 +557,8 @@ static void add_ts(private_load_tester_config_t *this,
        {
                enumerator_t *enumerator;
                char *subnet, *pos;
-               u_int16_t from_port, to_port;
-               u_int8_t proto;
+               uint16_t from_port, to_port;
+               uint8_t proto;
 
                enumerator = enumerator_create_token(string, ",", " ");
                while (enumerator->enumerate(enumerator, &subnet))
index d62c7295d5faa6f0dc1a34b2f4da6c27032020d7..2f482962a05fea01cc75600a911f33f32e486e6b 100644 (file)
@@ -57,7 +57,7 @@ struct private_load_tester_creds_t {
        /**
         * serial number to issue certificates
         */
-       u_int32_t serial;
+       uint32_t serial;
 
        /**
         * Preshared key for IKE
@@ -307,7 +307,7 @@ METHOD(credential_set_t, create_cert_enumerator, enumerator_t*,
        identification_t *dn = NULL;
        linked_list_t *sans;
        char buf[128];
-       u_int32_t serial;
+       uint32_t serial;
        time_t now;
 
        if (this->ca == NULL)
index 6a86bb8996e2589aa7d856cc9be6461e15c6d439..deca1908844f09e0a7da39aa1468ca35fb2e8bb4 100644 (file)
@@ -36,7 +36,7 @@ struct private_load_tester_ipsec_t {
 
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_load_tester_ipsec_t *this, host_t *src, host_t *dst,
-       u_int8_t protocol, u_int32_t *spi)
+       uint8_t protocol, uint32_t *spi)
 {
        *spi = (uint32_t)ref_get(&this->spi);
        return SUCCESS;
@@ -44,17 +44,17 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
 
 METHOD(kernel_ipsec_t, get_cpi, status_t,
        private_load_tester_ipsec_t *this, host_t *src, host_t *dst,
-       u_int16_t *cpi)
+       uint16_t *cpi)
 {
        return FAILED;
 }
 
 METHOD(kernel_ipsec_t, add_sa, status_t,
        private_load_tester_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)
 {
@@ -62,8 +62,8 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
 }
 
 METHOD(kernel_ipsec_t, update_sa, status_t,
-       private_load_tester_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,
+       private_load_tester_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 SUCCESS;
@@ -71,15 +71,15 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
 
 METHOD(kernel_ipsec_t, query_sa, status_t,
        private_load_tester_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_load_tester_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 SUCCESS;
 }
index 56b19c7929a54227f6b45157d5d43bc2abbfe0c4..56891b2636e6b4d4879117a4cac2951cd6c05803 100644 (file)
@@ -374,7 +374,7 @@ static void request_control_terminate(xmlTextReaderPtr reader,
                xmlTextReaderNodeType(reader) == XML_READER_TYPE_TEXT)
        {
                const char *str;
-               u_int32_t id;
+               uint32_t id;
                status_t status;
 
                str = xmlTextReaderConstValue(reader);
index 6e432d9cff1b2d8d3e8f1d72e7d0003bb0bd451f..ba22b0c2bdb62d592ed852eadb71cc734e8cdedb 100644 (file)
@@ -84,12 +84,12 @@ struct private_socket_default_socket_t {
        /**
         * Configured port (or random, if initially 0)
         */
-       u_int16_t port;
+       uint16_t port;
 
        /**
         * Configured port for NAT-T (or random, if initially 0)
         */
-       u_int16_t natt;
+       uint16_t natt;
 
        /**
         * IPv4 socket (500 or port)
@@ -114,22 +114,22 @@ struct private_socket_default_socket_t {
        /**
         * DSCP value set on IPv4 socket
         */
-       u_int8_t dscp4;
+       uint8_t dscp4;
 
        /**
         * DSCP value set on IPv4 socket for NAT-T (4500 or natt)
         */
-       u_int8_t dscp4_natt;
+       uint8_t dscp4_natt;
 
        /**
         * DSCP value set on IPv6 socket (500 or port)
         */
-       u_int8_t dscp6;
+       uint8_t dscp6;
 
        /**
         * DSCP value set on IPv6 socket for NAT-T (4500 or natt)
         */
-       u_int8_t dscp6_natt;
+       uint8_t dscp6_natt;
 
        /**
         * Maximum packet size to receive
@@ -153,7 +153,7 @@ struct private_socket_default_socket_t {
  */
 #ifdef IP_PKTINFO
 
-static host_t *get_dst_v4(struct cmsghdr *cmsgptr, u_int16_t port)
+static host_t *get_dst_v4(struct cmsghdr *cmsgptr, uint16_t port)
 {
        struct sockaddr_in dst = {
                .sin_family = AF_INET,
@@ -174,7 +174,7 @@ static host_t *get_dst_v4(struct cmsghdr *cmsgptr, u_int16_t port)
 
 #elif defined(IP_RECVDSTADDR)
 
-static host_t *get_dst_v4(struct cmsghdr *cmsgptr, u_int16_t port)
+static host_t *get_dst_v4(struct cmsghdr *cmsgptr, uint16_t port)
 {
        struct sockaddr_in dst = {
                .sin_family = AF_INET,
@@ -193,7 +193,7 @@ static host_t *get_dst_v4(struct cmsghdr *cmsgptr, u_int16_t port)
 
 #else /* IP_PKTINFO || IP_RECVDSTADDR */
 
-static host_t *get_dst_v4(struct cmsghdr *cmsgptr, u_int16_t port)
+static host_t *get_dst_v4(struct cmsghdr *cmsgptr, uint16_t port)
 {
        return NULL;
 }
@@ -206,7 +206,7 @@ static host_t *get_dst_v4(struct cmsghdr *cmsgptr, u_int16_t port)
  */
 #ifdef HAVE_IN6_PKTINFO
 
-static host_t *get_dst_v6(struct cmsghdr *cmsgptr, u_int16_t port)
+static host_t *get_dst_v6(struct cmsghdr *cmsgptr, uint16_t port)
 {
        struct in6_pktinfo *pktinfo;
        struct sockaddr_in6 dst = {
@@ -225,7 +225,7 @@ static host_t *get_dst_v6(struct cmsghdr *cmsgptr, u_int16_t port)
 
 #else /* HAVE_IN6_PKTINFO */
 
-static host_t *get_dst_v6(struct cmsghdr *cmsgptr, u_int16_t port)
+static host_t *get_dst_v6(struct cmsghdr *cmsgptr, uint16_t port)
 {
        return NULL;
 }
@@ -241,7 +241,7 @@ METHOD(socket_t, receiver, status_t,
        host_t *source = NULL, *dest = NULL;
        int i, rr, index, bytes_read = 0, selected = -1;
        bool oldstate;
-       u_int16_t port = 0;
+       uint16_t port = 0;
        struct pollfd pfd[] = {
                { .fd = this->ipv4,                     .events = POLLIN },
                { .fd = this->ipv4_natt,        .events = POLLIN },
@@ -464,7 +464,7 @@ METHOD(socket_t, sender, status_t,
        host_t *src, *dst;
        struct msghdr msg;
        struct iovec iov;
-       u_int8_t *dscp;
+       uint8_t *dscp;
 
        src = packet->get_source(packet);
        dst = packet->get_destination(packet);
@@ -521,7 +521,7 @@ METHOD(socket_t, sender, status_t,
        {
                if (family == AF_INET)
                {
-                       u_int8_t ds4;
+                       uint8_t ds4;
 
                        ds4 = packet->get_dscp(packet) << 2;
                        if (setsockopt(skt, SOL_IP, IP_TOS, &ds4, sizeof(ds4)) == 0)
@@ -584,7 +584,7 @@ METHOD(socket_t, sender, status_t,
        return SUCCESS;
 }
 
-METHOD(socket_t, get_port, u_int16_t,
+METHOD(socket_t, get_port, uint16_t,
        private_socket_default_socket_t *this, bool nat_t)
 {
        return nat_t ? this->natt : this->port;
@@ -610,7 +610,7 @@ METHOD(socket_t, supported_families, socket_family_t,
  * open a socket to send and receive packets
  */
 static int open_socket(private_socket_default_socket_t *this,
-                                          int family, u_int16_t *port)
+                                          int family, uint16_t *port)
 {
        int on = TRUE;
        union {
index b89cae47bdcf8ac64ab592991d0176a5639d83e6..ba92e10f215dd53ed03cb38888e54e271dbb148b 100644 (file)
@@ -107,7 +107,7 @@ struct dynsock_t {
        /**
         * Bound source port
         */
-       u_int16_t port;
+       uint16_t port;
 };
 
 /**
@@ -324,7 +324,7 @@ METHOD(socket_t, receiver, status_t,
 /**
  * Get the port allocated dynamically using bind()
  */
-static bool get_dynamic_port(int fd, int family, u_int16_t *port)
+static bool get_dynamic_port(int fd, int family, uint16_t *port)
 {
        union {
                struct sockaddr_storage ss;
@@ -367,7 +367,7 @@ static bool get_dynamic_port(int fd, int family, u_int16_t *port)
  * open a socket to send and receive packets
  */
 static int open_socket(private_socket_dynamic_socket_t *this,
-                                          int family, u_int16_t *port)
+                                          int family, uint16_t *port)
 {
        union {
                struct sockaddr_storage ss;
@@ -481,7 +481,7 @@ static dynsock_t *get_any_socket(private_socket_dynamic_socket_t *this,
  * Find/Create a socket to send from host
  */
 static dynsock_t *find_socket(private_socket_dynamic_socket_t *this,
-                                                         int family, u_int16_t port)
+                                                         int family, uint16_t port)
 {
        dynsock_t *skt, lookup = {
                .family = family,
@@ -636,7 +636,7 @@ METHOD(socket_t, sender, status_t,
        return SUCCESS;
 }
 
-METHOD(socket_t, get_port, u_int16_t,
+METHOD(socket_t, get_port, uint16_t,
        private_socket_dynamic_socket_t *this, bool nat_t)
 {
        /* we return 0 here for users that have no explicit port configured, the
index 94af08e809340093127b1c4944fcab5e3b4add5a..c42783c7715e7f38388d820309d08da9622fffb8 100644 (file)
@@ -51,7 +51,7 @@ struct private_socket_win_socket_t {
        /**
         * Port for each socket
         */
-       u_int16_t ports[SOCKET_COUNT];
+       uint16_t ports[SOCKET_COUNT];
 
        /**
         * IPv4/IPv6 dual-use sockets
@@ -205,7 +205,7 @@ METHOD(socket_t, receiver, status_t,
 METHOD(socket_t, sender, status_t,
        private_socket_win_socket_t *this, packet_t *packet)
 {
-       u_int16_t port;
+       uint16_t port;
        int i = -1, j;
        host_t *src, *dst;
        WSAMSG msg;
@@ -316,7 +316,7 @@ METHOD(socket_t, sender, status_t,
        return SUCCESS;
 }
 
-METHOD(socket_t, get_port, u_int16_t,
+METHOD(socket_t, get_port, uint16_t,
        private_socket_win_socket_t *this, bool nat)
 {
        return this->ports[nat != 0];
index 0fa06eac5c074c029f3d717369b7c4a02a53254e..46a894028c8fa16e0d7ebfe0e668feeb3d2122cd 100644 (file)
@@ -63,7 +63,7 @@ METHOD(logger_t, log_, void,
                chunk_t local_spi, remote_spi;
                host_t *local_host, *remote_host;
                identification_t *local_id, *remote_id;
-               u_int64_t ispi, rspi;
+               uint64_t ispi, rspi;
                ike_sa_id_t *id;
 
                id = ike_sa->get_id(ike_sa);
index d0eb2aac30bc447293e8f3506ffd035885c2e511..0e6aee1b08a7cb5bfa9276a204fd2f2e040c0640 100644 (file)
@@ -252,7 +252,7 @@ static void swap_ends(stroke_msg_t *msg)
 static ike_cfg_t *build_ike_cfg(private_stroke_config_t *this, stroke_msg_t *msg)
 {
        ike_cfg_t *ike_cfg;
-       u_int16_t ikeport;
+       uint16_t ikeport;
        char me[256], other[256];
 
        swap_ends(msg);
@@ -619,7 +619,7 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
        identification_t *peer_id = NULL;
        peer_cfg_t *mediated_by = NULL;
        unique_policy_t unique;
-       u_int32_t rekey = 0, reauth = 0, over, jitter;
+       uint32_t rekey = 0, reauth = 0, over, jitter;
        peer_cfg_t *peer_cfg;
        auth_cfg_t *auth_cfg;
 
@@ -883,8 +883,8 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
 /**
  * Parse a protoport specifier
  */
-static bool parse_protoport(char *token, u_int16_t *from_port,
-                                                       u_int16_t *to_port, u_int8_t *protocol)
+static bool parse_protoport(char *token, uint16_t *from_port,
+                                                       uint16_t *to_port, uint8_t *protocol)
 {
        char *sep, *port = "", *endptr;
        struct protoent *proto;
@@ -923,7 +923,7 @@ static bool parse_protoport(char *token, u_int16_t *from_port,
                        {
                                return FALSE;
                        }
-                       *protocol = (u_int8_t)p;
+                       *protocol = (uint8_t)p;
                }
        }
        if (streq(port, "%any"))
@@ -1002,8 +1002,8 @@ static void add_ts(private_stroke_config_t *this,
                {
                        enumerator_t *enumerator;
                        char *subnet, *pos;
-                       u_int16_t from_port, to_port;
-                       u_int8_t proto;
+                       uint16_t from_port, to_port;
+                       uint8_t proto;
 
                        enumerator = enumerator_create_token(end->subnets, ",", " ");
                        while (enumerator->enumerate(enumerator, &subnet))
index 36da5ff21f732c58e9e624e45b3f24035c60ea03..fb60d39730e9e8c1c64ca4bc77ef4a16d04a5d9c 100644 (file)
@@ -198,7 +198,7 @@ METHOD(stroke_control_t, initiate, void,
 /**
  * Parse a terminate/rekey specifier
  */
-static bool parse_specifier(char *string, u_int32_t *id,
+static bool parse_specifier(char *string, uint32_t *id,
                                                        char **name, bool *child, bool *all)
 {
        int len;
@@ -266,7 +266,7 @@ static bool parse_specifier(char *string, u_int32_t *id,
  * Report the result of a terminate() call to console
  */
 static void report_terminate_status(private_stroke_control_t *this,
-                                               status_t status, FILE *out, u_int32_t id, bool child)
+                                               status_t status, FILE *out, uint32_t id, bool child)
 {
        char *prefix, *postfix;
 
@@ -300,7 +300,7 @@ static void report_terminate_status(private_stroke_control_t *this,
 /**
  * Call the charon controller to terminate a CHILD_SA
  */
-static void charon_terminate(private_stroke_control_t *this, u_int32_t id,
+static void charon_terminate(private_stroke_control_t *this, uint32_t id,
                                                         stroke_msg_t *msg, FILE *out, bool child)
 {
        if (msg->output_verbosity >= 0)
@@ -336,7 +336,7 @@ METHOD(stroke_control_t, terminate, void,
        private_stroke_control_t *this, stroke_msg_t *msg, FILE *out)
 {
        char *name;
-       u_int32_t id;
+       uint32_t id;
        bool child, all;
        ike_sa_t *ike_sa;
        enumerator_t *enumerator;
@@ -424,7 +424,7 @@ METHOD(stroke_control_t, rekey, void,
        private_stroke_control_t *this, stroke_msg_t *msg, FILE *out)
 {
        char *name;
-       u_int32_t id;
+       uint32_t id;
        bool child, all, finished = FALSE;
        ike_sa_t *ike_sa;
        enumerator_t *enumerator;
@@ -591,13 +591,13 @@ METHOD(stroke_control_t, purge_ike, void,
 /**
  * Find an existing CHILD_SA/reqid
  */
-static u_int32_t find_reqid(child_cfg_t *child_cfg)
+static uint32_t find_reqid(child_cfg_t *child_cfg)
 {
        enumerator_t *enumerator, *children;
        child_sa_t *child_sa;
        ike_sa_t *ike_sa;
        char *name;
-       u_int32_t reqid;
+       uint32_t reqid;
 
        reqid = charon->traps->find_reqid(charon->traps, child_cfg);
        if (reqid)
@@ -636,7 +636,7 @@ static void charon_route(peer_cfg_t *peer_cfg, child_cfg_t *child_cfg,
                                                 char *name, FILE *out)
 {
        ipsec_mode_t mode;
-       u_int32_t reqid;
+       uint32_t reqid;
 
        mode = child_cfg->get_mode(child_cfg);
        if (mode == MODE_PASS || mode == MODE_DROP)
@@ -731,7 +731,7 @@ METHOD(stroke_control_t, unroute, void,
 {
        child_sa_t *child_sa;
        enumerator_t *enumerator;
-       u_int32_t id = 0;
+       uint32_t id = 0;
 
        if (charon->shunts->uninstall(charon->shunts, msg->unroute.name))
        {
index 5fa1fb165187e149ef09df3bf0054f2170f198dc..e93fd4ef2406ccc1b67809582a67918117efe95a 100644 (file)
@@ -58,7 +58,7 @@ struct private_stroke_counter_t {
        /**
         * Global counter values
         */
-       u_int64_t counter[COUNTER_MAX];
+       uint64_t counter[COUNTER_MAX];
 
        /**
         * Counters for specific connection names, char* => entry_t
@@ -78,7 +78,7 @@ typedef struct {
        /** connection name */
        char *name;
        /** counter values for connection */
-       u_int64_t counter[COUNTER_MAX];
+       uint64_t counter[COUNTER_MAX];
 } entry_t;
 
 /**
@@ -290,7 +290,7 @@ METHOD(listener_t, message_hook, bool,
  * Print a single counter value to out
  */
 static void print_counter(FILE *out, stroke_counter_type_t type,
-                                                 u_int64_t counter)
+                                                 uint64_t counter)
 {
        fprintf(out, "%-18N %12llu\n", stroke_counter_type_names, type, counter);
 }
@@ -300,7 +300,7 @@ static void print_counter(FILE *out, stroke_counter_type_t type,
  */
 static void print_one(private_stroke_counter_t *this, FILE *out, char *name)
 {
-       u_int64_t counter[COUNTER_MAX];
+       uint64_t counter[COUNTER_MAX];
        entry_t *entry;
        int i;
 
@@ -365,7 +365,7 @@ static void print_all(private_stroke_counter_t *this, FILE *out)
  */
 static void print_global(private_stroke_counter_t *this, FILE *out)
 {
-       u_int64_t counter[COUNTER_MAX];
+       uint64_t counter[COUNTER_MAX];
        int i;
 
        this->lock->lock(this->lock);
index 0371c70327f77f6ccbba3ea9d5be4f23010b6eb1..6c5703a16fa3e227bf3a8f0e4c735d07375abab9 100644 (file)
@@ -206,7 +206,7 @@ static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
 static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
 {
        time_t use_in, use_out, rekey, now;
-       u_int64_t bytes_in, bytes_out, packets_in, packets_out;
+       uint64_t bytes_in, bytes_out, packets_in, packets_out;
        proposal_t *proposal;
        linked_list_t *my_ts, *other_ts;
        child_cfg_t *config;
@@ -244,7 +244,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
                        proposal = child_sa->get_proposal(child_sa);
                        if (proposal)
                        {
-                               u_int16_t alg, ks;
+                               uint16_t alg, ks;
                                bool first = TRUE;
 
                                if (proposal->get_algorithm(proposal, ENCRYPTION_ALGORITHM,
@@ -286,7 +286,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
                        {
                                fprintf(out, " (%" PRIu64 " pkt%s, %" PRIu64 "s ago)",
                                                packets_in, (packets_in == 1) ? "": "s",
-                                               (u_int64_t)(now - use_in));
+                                               (uint64_t)(now - use_in));
                        }
 
                        child_sa->get_usestats(child_sa, FALSE,
@@ -296,7 +296,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
                        {
                                fprintf(out, " (%" PRIu64 " pkt%s, %" PRIu64 "s ago)",
                                                packets_out, (packets_out == 1) ? "": "s",
-                                               (u_int64_t)(now - use_out));
+                                               (uint64_t)(now - use_out));
                        }
                        fprintf(out, ", rekeying ");
 
@@ -474,7 +474,7 @@ METHOD(stroke_list_t, status, void,
                ike_version_t ike_version;
                char *pool;
                host_t *host;
-               u_int32_t dpd;
+               uint32_t dpd;
                time_t since, now;
                u_int size, online, offline, i;
                struct utsname utsname;
index ee32dbca29910ea53adfce5ceb365ed6dbafad60..4f748366682b9b288fc17bf4727ae0394361bc42 100644 (file)
@@ -613,7 +613,7 @@ static void stroke_config(private_stroke_socket_t *this,
 static bool on_accept(private_stroke_socket_t *this, stream_t *stream)
 {
        stroke_msg_t *msg;
-       u_int16_t len;
+       uint16_t len;
        FILE *out;
 
        /* read length */
index 2bad4fab0bdecfbf5b1670f24a750e72cb38437c..ad4f2f8c243e192ed646daf2502904c3e4466bf5 100644 (file)
@@ -145,7 +145,7 @@ tnc_ifmap_listener_t *tnc_ifmap_listener_create(bool reload)
 {
        private_tnc_ifmap_listener_t *this;
        job_t *job;
-       u_int32_t reschedule;
+       uint32_t reschedule;
 
        INIT(this,
                .public = {
index f2c00a5287da2baf2ed0902e374e4b4473a2f3d3..ea48338cde4484fcd443adc939f90a0adb0803cc 100644 (file)
@@ -40,7 +40,7 @@ struct private_tnc_ifmap_renew_session_job_t {
        /**
         * Reschedule time interval in seconds
         */
-       u_int32_t reschedule;
+       uint32_t reschedule;
 };
 
 METHOD(job_t, destroy, void,
@@ -83,7 +83,7 @@ METHOD(job_t, get_priority, job_priority_t,
  * Described in header
  */
 tnc_ifmap_renew_session_job_t *tnc_ifmap_renew_session_job_create(
-                                                               tnc_ifmap_soap_t *ifmap, u_int32_t reschedule)
+                                                               tnc_ifmap_soap_t *ifmap, uint32_t reschedule)
 {
        private_tnc_ifmap_renew_session_job_t *this;
 
index f1587a1f6dacbd789ba07c8f4b954ce5a9e98666..18a3d5734df64c13a1ba82b2b6f36c9f6ab3d385 100644 (file)
@@ -46,6 +46,6 @@ struct tnc_ifmap_renew_session_job_t {
  * @param reschedule   reschedule time in seconds
  */
 tnc_ifmap_renew_session_job_t *tnc_ifmap_renew_session_job_create(
-                                                               tnc_ifmap_soap_t *ifmap, u_int32_t reschedule);
+                                                               tnc_ifmap_soap_t *ifmap, uint32_t reschedule);
 
 #endif /** TNC_IFMAP_RENEW_SESSION_JOB_H_ @}*/
index a652e70677a74ec71d2c9cd88aa822792bfbc4e5..8e69de095960e7c9a9490d6c1ab6483b66a215dd 100644 (file)
@@ -186,7 +186,7 @@ METHOD(tnc_ifmap_soap_t, purgePublisher, bool,
  * Create an access-request based on device_name and ike_sa_id
  */
 static xmlNodePtr create_access_request(private_tnc_ifmap_soap_t *this,
-                                                                               u_int32_t id)
+                                                                               uint32_t id)
 {
        xmlNodePtr node;
        char buf[BUF_LEN];
@@ -415,7 +415,7 @@ METHOD(tnc_ifmap_soap_t, publish_ike_sa, bool,
        identification_t *id, *eap_id, *group;
        host_t *host;
        auth_cfg_t *auth;
-       u_int32_t ike_sa_id;
+       uint32_t ike_sa_id;
        bool is_user = FALSE, first = TRUE, success;
 
        /* extract relevant data from IKE_SA*/
@@ -584,7 +584,7 @@ METHOD(tnc_ifmap_soap_t, publish_virtual_ips, bool,
 {
        tnc_ifmap_soap_msg_t *soap_msg;
        xmlNodePtr request, node;
-       u_int32_t ike_sa_id;
+       uint32_t ike_sa_id;
        enumerator_t *enumerator;
        host_t *vip;
        bool success;
index 91456f8da0c02c90e454ebf03e59daca4753bd1a..17f0cd46468d787caab3af5202dce9ca9873edcc 100644 (file)
@@ -74,7 +74,7 @@ struct private_tnc_pdp_t {
        /**
         * PT-TLS port of the server
         */
-       u_int16_t pt_tls_port;
+       uint16_t pt_tls_port;
 
        /**
         * PT-TLS IPv4 socket
@@ -158,7 +158,7 @@ static void free_client_entry(client_entry_t *this)
 /**
  * Open IPv4 or IPv6 UDP socket
  */
-static int open_udp_socket(int family, u_int16_t port)
+static int open_udp_socket(int family, uint16_t port)
 {
        int on = TRUE;
        struct sockaddr_storage addr;
@@ -233,7 +233,7 @@ static int open_udp_socket(int family, u_int16_t port)
 /**
  * Open IPv4 or IPv6 TCP socket
  */
-static int open_tcp_socket(int family, u_int16_t port)
+static int open_tcp_socket(int family, uint16_t port)
 {
        int on = TRUE;
        struct sockaddr_storage addr;
@@ -339,8 +339,8 @@ static void send_message(private_tnc_pdp_t *this, radius_message_t *message,
 /**
  * Encrypt a MS-MPPE-Send/Recv-Key
  */
-static chunk_t encrypt_mppe_key(private_tnc_pdp_t *this, u_int8_t type,
-                                                               chunk_t key, u_int16_t *salt,
+static chunk_t encrypt_mppe_key(private_tnc_pdp_t *this, uint8_t type,
+                                                               chunk_t key, uint16_t *salt,
                                                                radius_message_t *request)
 {
        chunk_t a, r, seed, data;
@@ -420,8 +420,8 @@ static void send_response(private_tnc_pdp_t *this, radius_message_t *request,
 {
        radius_message_t *response;
        chunk_t data, recv, send;
-       u_int32_t tunnel_type;
-       u_int16_t salt = 0;
+       uint32_t tunnel_type;
+       uint16_t salt = 0;
 
        response = radius_message_create(code);
        data = eap->get_data(eap);
@@ -477,7 +477,7 @@ static void process_eap(private_tnc_pdp_t *this, radius_message_t *request,
        eap_payload_t *in, *out = NULL;
        eap_method_t *method;
        eap_type_t eap_type;
-       u_int32_t eap_vendor;
+       uint32_t eap_vendor;
        chunk_t data, message = chunk_empty, msk = chunk_empty;
        chunk_t user_name = chunk_empty, nas_id = chunk_empty;
        identification_t *group = NULL;
index 1e297a39e7e988358412137f01d310a6fff418f1..07f5f9b615ba38201e65855c2895d8ade1798c8a 100644 (file)
@@ -53,7 +53,7 @@ static void append_ts(bio_writer_t *writer, traffic_selector_t *ts)
 {
        host_t *net, *mask;
        chunk_t padding;
-       u_int8_t bits;
+       uint8_t bits;
 
        if (!ts->to_subnet(ts, &net, &bits))
        {
@@ -115,7 +115,7 @@ METHOD(enumerator_t, attribute_destroy, void,
  */
 static bool use_ts(traffic_selector_t *ts)
 {
-       u_int8_t mask;
+       uint8_t mask;
        host_t *net;
 
        if (ts->get_type(ts) != TS_IPV4_ADDR_RANGE)
index a9b0565a858a90e51c13224992bfc2c91d6a544b..6a1581c85faf84cae8e65f9b9f34a34ea5c99dc2 100644 (file)
@@ -55,7 +55,7 @@ typedef struct cache_entry_t cache_entry_t;
  */
 struct cache_entry_t {
        /** requid of the CHILD_SA */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** cached interface name */
        char *iface;
 };
@@ -63,7 +63,7 @@ struct cache_entry_t {
 /**
  * Insert an interface name to the cache
  */
-static void cache_iface(private_updown_listener_t *this, u_int32_t reqid,
+static void cache_iface(private_updown_listener_t *this, uint32_t reqid,
                                                char *iface)
 {
        cache_entry_t *entry = malloc_thing(cache_entry_t);
@@ -77,7 +77,7 @@ static void cache_iface(private_updown_listener_t *this, u_int32_t reqid,
 /**
  * Remove a cached interface name and return it.
  */
-static char* uncache_iface(private_updown_listener_t *this, u_int32_t reqid)
+static char* uncache_iface(private_updown_listener_t *this, uint32_t reqid)
 {
        enumerator_t *enumerator;
        cache_entry_t *entry;
@@ -257,7 +257,7 @@ static void invoke_once(private_updown_listener_t *this, ike_sa_t *ike_sa,
 {
        host_t *me, *other, *host;
        char *iface;
-       u_int8_t mask;
+       uint8_t mask;
        mark_t mark;
        bool is_host, is_ipv6;
        int out;
index 7c98c8b692ba3cfdd70fea46f131f1981f090132..0b549a511dfab7d29b3b65e46bdebcac44970c2d 100644 (file)
@@ -123,7 +123,7 @@ static bool read_error(vici_conn_t *conn, int err)
 /**
  * Handle a command response message
  */
-static bool handle_response(vici_conn_t *conn, u_int32_t len)
+static bool handle_response(vici_conn_t *conn, uint32_t len)
 {
        chunk_t buf;
 
@@ -140,11 +140,11 @@ static bool handle_response(vici_conn_t *conn, u_int32_t len)
 /**
  * Dispatch received event message
  */
-static bool handle_event(vici_conn_t *conn, u_int32_t len)
+static bool handle_event(vici_conn_t *conn, uint32_t len)
 {
        vici_message_t *message;
        event_t *event;
-       u_int8_t namelen;
+       uint8_t namelen;
        char name[257], *buf;
 
        if (len < sizeof(namelen))
@@ -198,8 +198,8 @@ static bool handle_event(vici_conn_t *conn, u_int32_t len)
 CALLBACK(on_read, bool,
        vici_conn_t *conn, stream_t *stream)
 {
-       u_int32_t len;
-       u_int8_t op;
+       uint32_t len;
+       uint8_t op;
        ssize_t hlen;
 
        hlen = stream->read(stream, &len, sizeof(len), FALSE);
@@ -358,8 +358,8 @@ vici_res_t* vici_submit(vici_req_t *req, vici_conn_t *conn)
        vici_message_t *message;
        vici_res_t *res;
        chunk_t data;
-       u_int32_t len;
-       u_int8_t namelen, op;
+       uint32_t len;
+       uint8_t namelen, op;
 
        message = req->b->finalize(req->b);
        if (!message)
@@ -678,8 +678,8 @@ void vici_free_res(vici_res_t *res)
 int vici_register(vici_conn_t *conn, char *name, vici_event_cb_t cb, void *user)
 {
        event_t *event;
-       u_int32_t len;
-       u_int8_t namelen, op;
+       uint32_t len;
+       uint8_t namelen, op;
        int ret = 1;
 
        op = cb ? VICI_EVENT_REGISTER : VICI_EVENT_UNREGISTER;
index 8d545c6c1951a469ef315ced572d95af52681bc5..d0c0fa76fd579e9a5cfca87193baf405849df8a9 100644 (file)
@@ -32,7 +32,7 @@ static void echo_inbound(void *user, u_int id, chunk_t buf)
 
        ck_assert_int_eq(data->id, id);
        /* count number of bytes, including the header */
-       data->bytes += buf.len + sizeof(u_int32_t);
+       data->bytes += buf.len + sizeof(uint32_t);
        /* echo back data chunk */
        data->s->send(data->s, id, chunk_clone(buf));
 }
@@ -81,7 +81,7 @@ START_TEST(test_echo)
                0x00,0x00,0x00,0x0A,    0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x02A,
        );
        char buf[m.len];
-       u_int32_t len;
+       uint32_t len;
 
        lib->processor->set_threads(lib->processor, 4);
 
index 9064d3d8cbf8fd6d59dcc1bcc95d1e7cadcdf5f7..e0d9b4ae86df2ca85772c376636678977bfe036f 100644 (file)
@@ -233,7 +233,7 @@ static bool have_vips_from_pool(mem_pool_t *pool, linked_list_t *vips)
        enumerator_t *enumerator;
        host_t *host;
        chunk_t start, end, current;
-       u_int32_t size;
+       uint32_t size;
        bool found = FALSE;
 
        host = pool->get_base(pool);
@@ -477,10 +477,10 @@ CALLBACK(pool_li, bool,
                {
                        if (host->get_family(host) == AF_INET)
                        {       /* IPv4 attributes contain a subnet mask */
-                               u_int32_t netmask = 0;
+                               uint32_t netmask = 0;
 
                                if (mask)
-                               {       /* shifting u_int32_t by 32 or more is undefined */
+                               {       /* shifting uint32_t by 32 or more is undefined */
                                        mask = 32 - mask;
                                        netmask = htonl((0xFFFFFFFF >> mask) << mask);
                                }
index 6ebbedc47a477a6655e2442d8ea5bed53e29fdc1..f95d1571b95c48bba45452a6ebbccee329413708 100644 (file)
@@ -57,7 +57,7 @@
 /**
  * Magic value for an undefined lifetime
  */
-#define LFT_UNDEFINED (~(u_int64_t)0)
+#define LFT_UNDEFINED (~(uint64_t)0)
 
 /**
  * Default IKE rekey time
@@ -72,7 +72,7 @@
 /**
  * Undefined replay window
  */
-#define REPLAY_UNDEFINED (~(u_int32_t)0)
+#define REPLAY_UNDEFINED (~(uint32_t)0)
 
 typedef struct private_vici_config_t private_vici_config_t;
 
@@ -242,7 +242,7 @@ typedef struct {
 typedef struct {
        request_data_t *request;
        auth_cfg_t *cfg;
-       u_int32_t round;
+       uint32_t round;
 } auth_data_t;
 
 /**
@@ -259,20 +259,20 @@ static void free_auth_data(auth_data_t *data)
  */
 typedef struct {
        request_data_t *request;
-       u_int32_t version;
+       uint32_t version;
        bool aggressive;
        bool encap;
        bool mobike;
        bool send_certreq;
        bool pull;
        cert_policy_t send_cert;
-       u_int64_t dpd_delay;
-       u_int64_t dpd_timeout;
+       uint64_t dpd_delay;
+       uint64_t dpd_timeout;
        fragmentation_t fragmentation;
        unique_policy_t unique;
-       u_int32_t keyingtries;
-       u_int32_t local_port;
-       u_int32_t remote_port;
+       uint32_t keyingtries;
+       uint32_t local_port;
+       uint32_t remote_port;
        char *local_addrs;
        char *remote_addrs;
        linked_list_t *local;
@@ -281,10 +281,10 @@ typedef struct {
        linked_list_t *children;
        linked_list_t *vips;
        char *pools;
-       u_int64_t reauth_time;
-       u_int64_t rekey_time;
-       u_int64_t over_time;
-       u_int64_t rand_time;
+       uint64_t reauth_time;
+       uint64_t rekey_time;
+       uint64_t over_time;
+       uint64_t rand_time;
 } peer_data_t;
 
 /**
@@ -428,15 +428,15 @@ typedef struct {
        bool ipcomp;
        bool policies;
        ipsec_mode_t mode;
-       u_int32_t replay_window;
+       uint32_t replay_window;
        action_t dpd_action;
        action_t start_action;
        action_t close_action;
-       u_int32_t reqid;
-       u_int32_t tfc;
+       uint32_t reqid;
+       uint32_t tfc;
        mark_t mark_in;
        mark_t mark_out;
-       u_int64_t inactivity;
+       uint64_t inactivity;
        linked_list_t *proposals;
        linked_list_t *local_ts;
        linked_list_t *remote_ts;
@@ -568,8 +568,8 @@ CALLBACK(parse_ts, bool,
        struct protoent *protoent;
        struct servent *svc;
        long int p;
-       u_int16_t from = 0, to = 0xffff;
-       u_int8_t proto = 0;
+       uint16_t from = 0, to = 0xffff;
+       uint8_t proto = 0;
 
        if (!vici_stringify(v, buf, sizeof(buf)))
        {
@@ -613,7 +613,7 @@ CALLBACK(parse_ts, bool,
                                {
                                        return FALSE;
                                }
-                               proto = (u_int8_t)p;
+                               proto = (uint8_t)p;
                        }
                }
                if (streq(port, "opaque"))
@@ -809,10 +809,10 @@ CALLBACK(parse_action, bool,
 }
 
 /**
- * Parse a u_int32_t
+ * Parse a uint32_t
  */
 CALLBACK(parse_uint32, bool,
-       u_int32_t *out, chunk_t v)
+       uint32_t *out, chunk_t v)
 {
        char buf[16], *end;
        u_long l;
@@ -831,10 +831,10 @@ CALLBACK(parse_uint32, bool,
 }
 
 /**
- * Parse a u_int64_t
+ * Parse a uint64_t
  */
 CALLBACK(parse_uint64, bool,
-       u_int64_t *out, chunk_t v)
+       uint64_t *out, chunk_t v)
 {
        char buf[16], *end;
        unsigned long long l;
@@ -856,7 +856,7 @@ CALLBACK(parse_uint64, bool,
  * Parse a relative time
  */
 CALLBACK(parse_time, bool,
-       u_int64_t *out, chunk_t v)
+       uint64_t *out, chunk_t v)
 {
        char buf[16], *end;
        u_long l;
@@ -906,7 +906,7 @@ CALLBACK(parse_time, bool,
  * Parse byte volume
  */
 CALLBACK(parse_bytes, bool,
-       u_int64_t *out, chunk_t v)
+       uint64_t *out, chunk_t v)
 {
        char buf[16], *end;
        unsigned long long l;
@@ -968,7 +968,7 @@ CALLBACK(parse_mark, bool,
  * Parse TFC padding option
  */
 CALLBACK(parse_tfc, bool,
-       u_int32_t *out, chunk_t v)
+       uint32_t *out, chunk_t v)
 {
        if (chunk_equals(v, chunk_from_str("mtu")))
        {
@@ -1649,12 +1649,12 @@ CALLBACK(peer_sn, bool,
 /**
  * Find reqid of an existing CHILD_SA
  */
-static u_int32_t find_reqid(child_cfg_t *cfg)
+static uint32_t find_reqid(child_cfg_t *cfg)
 {
        enumerator_t *enumerator, *children;
        child_sa_t *child_sa;
        ike_sa_t *ike_sa;
-       u_int32_t reqid;
+       uint32_t reqid;
 
        reqid = charon->traps->find_reqid(charon->traps, cfg);
        if (reqid)
@@ -1723,7 +1723,7 @@ static void clear_start_action(private_vici_config_t *this, char *peer_name,
        enumerator_t *enumerator, *children;
        child_sa_t *child_sa;
        ike_sa_t *ike_sa;
-       u_int32_t id = 0, others;
+       uint32_t id = 0, others;
        array_t *ids = NULL, *ikeids = NULL;
        char *name;
 
index c526d2fda2e27752aeb21a72d50e85269d8ef12a..44003819af8fe2e5794850ca6a1da85ae8773a23 100644 (file)
@@ -507,12 +507,12 @@ CALLBACK(redirect, vici_message_t*,
 /**
  * Find reqid of an existing CHILD_SA
  */
-static u_int32_t find_reqid(child_cfg_t *cfg)
+static uint32_t find_reqid(child_cfg_t *cfg)
 {
        enumerator_t *enumerator, *children;
        child_sa_t *child_sa;
        ike_sa_t *ike_sa;
-       u_int32_t reqid;
+       uint32_t reqid;
 
        reqid = charon->traps->find_reqid(charon->traps, cfg);
        if (reqid)
@@ -583,7 +583,7 @@ CALLBACK(uninstall, vici_message_t*,
 {
        child_sa_t *child_sa;
        enumerator_t *enumerator;
-       u_int32_t reqid = 0;
+       uint32_t reqid = 0;
        char *child;
 
        child = request->get_str(request, NULL, "child");
index 31292d6b3ff0933ada62b1708ee991cb06af4f48..ffe0d61e5d48391e530e87b90c267a7db512f271 100644 (file)
@@ -119,10 +119,10 @@ static void send_op(private_vici_dispatcher_t *this, u_int id,
        bio_writer_t *writer;
        u_int len;
 
-       len = sizeof(u_int8_t);
+       len = sizeof(uint8_t);
        if (name)
        {
-               len += sizeof(u_int8_t) + strlen(name);
+               len += sizeof(uint8_t) + strlen(name);
        }
        if (message)
        {
@@ -308,7 +308,7 @@ CALLBACK(inbound, void,
 {
        bio_reader_t *reader;
        chunk_t chunk;
-       u_int8_t type;
+       uint8_t type;
        char name[257];
 
        reader = bio_reader_create(data);
index fb6e8a1abb8c1ece2be1afa91567121a19f33b5f..58b896773b69d211061bb1cae0655d2fddb7fa18 100644 (file)
@@ -137,7 +137,7 @@ typedef struct {
 METHOD(enumerator_t, parse_enumerate, bool,
        parse_enumerator_t *this, vici_type_t *out, char **name, chunk_t *value)
 {
-       u_int8_t type;
+       uint8_t type;
        chunk_t data;
 
        if (!this->reader->remaining(this->reader) ||
index 284c23ee0d0abe254618ba64a3db07ddd70612b6..3a005ea57bc871c69e15b5241ce4801f8aa9cbdc 100644 (file)
@@ -86,8 +86,8 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
                                           child_sa_t *child, time_t now)
 {
        time_t t;
-       u_int64_t bytes, packets;
-       u_int16_t alg, ks;
+       uint64_t bytes, packets;
+       uint16_t alg, ks;
        proposal_t *proposal;
        enumerator_t *enumerator;
        traffic_selector_t *ts;
@@ -152,7 +152,7 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
                b->add_kv(b, "packets-in", "%" PRIu64, packets);
                if (t)
                {
-                       b->add_kv(b, "use-in", "%"PRIu64, (u_int64_t)(now - t));
+                       b->add_kv(b, "use-in", "%"PRIu64, (uint64_t)(now - t));
                }
 
                child->get_usestats(child, FALSE, &t, &bytes, &packets);
@@ -160,7 +160,7 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
                b->add_kv(b, "packets-out", "%"PRIu64, packets);
                if (t)
                {
-                       b->add_kv(b, "use-out", "%"PRIu64, (u_int64_t)(now - t));
+                       b->add_kv(b, "use-out", "%"PRIu64, (uint64_t)(now - t));
                }
 
                t = child->get_lifetime(child, FALSE);
@@ -272,7 +272,7 @@ static void list_ike(private_vici_query_t *this, vici_builder_t *b,
        ike_sa_id_t *id;
        identification_t *eap;
        proposal_t *proposal;
-       u_int16_t alg, ks;
+       uint16_t alg, ks;
        host_t *host;
 
        b->add_kv(b, "uniqueid", "%u", ike_sa->get_unique_id(ike_sa));
index 67fd7e8e365c50d7240ad0403b9fa947a2f69df5..2a55fd061d4c39bc4d895d803768b744a4d16125 100644 (file)
@@ -95,11 +95,11 @@ typedef struct {
        /** bytes of length header sent/received */
        u_char hdrlen;
        /** bytes of length header */
-       char hdr[sizeof(u_int32_t)];
+       char hdr[sizeof(uint32_t)];
        /** send/receive buffer on heap */
        chunk_t buf;
        /** bytes sent/received in buffer */
-       u_int32_t done;
+       uint32_t done;
 } msg_buf_t;
 
 /**
@@ -411,7 +411,7 @@ CALLBACK(on_write, bool,
 static bool do_read(private_vici_socket_t *this, entry_t *entry,
                                        stream_t *stream, char *errmsg, size_t errlen)
 {
-       u_int32_t msglen;
+       uint32_t msglen;
        ssize_t len;
 
        /* assemble the length header first */
index f21d02697ca17a666b55d9397b4d9431ff2def90..9e103be1c6f01742f4f12b73c5314f2f97805231 100644 (file)
@@ -113,7 +113,7 @@ static bool verify_eap(private_xauth_eap_t *this, eap_method_t *backend)
        eap_payload_t *request, *response;
        eap_method_t *frontend;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
        status_t status;
 
        if (backend->initiate(backend, &request) != NEED_MORE)
index 207f534ba04a7bd4a98e6bd3776139564d95f75d..cd4a4ca892d9c61bbdef76523bf2b13fa2f11401 100644 (file)
@@ -32,7 +32,7 @@ struct private_acquire_job_t {
        /**
         * reqid of the child to rekey
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * acquired source traffic selector
@@ -70,7 +70,7 @@ METHOD(job_t, get_priority, job_priority_t,
 /*
  * Described in header
  */
-acquire_job_t *acquire_job_create(u_int32_t reqid,
+acquire_job_t *acquire_job_create(uint32_t reqid,
                                                                  traffic_selector_t *src_ts,
                                                                  traffic_selector_t *dst_ts)
 {
index 2b5bf4805b21a7471f19958475a0dd4f5280ab5d..4d31f0569ed19dad783fcb957034de4f75e354eb 100644 (file)
@@ -47,7 +47,7 @@ struct acquire_job_t {
  * @param dst_ts       destination traffic selector
  * @return                     acquire_job_t object
  */
-acquire_job_t *acquire_job_create(u_int32_t reqid,
+acquire_job_t *acquire_job_create(uint32_t reqid,
                                                                  traffic_selector_t *src_ts,
                                                                  traffic_selector_t *dst_ts);
 
index c396890127325d2625aa3cd84a6bd7ab1513eba8..ff8e78b6b092eab73c81d36fb1fc53644f565b01 100644 (file)
@@ -64,7 +64,7 @@ METHOD(job_t, execute, job_requeue_t,
        ike_sa_id_t *id;
        ike_sa_t *ike_sa;
        child_sa_t *child_sa;
-       u_int32_t unique;
+       uint32_t unique;
 
        ike_sa = charon->ike_sa_manager->checkout(charon->ike_sa_manager, this->id);
        if (ike_sa)
index 0d85883be7fcd891651fab274f31abfc0735efa6..70dbc1b4aa121ece713915c69ddad4823453cb31 100644 (file)
@@ -38,7 +38,7 @@ struct private_delete_child_sa_job_t {
        /**
         * inbound SPI of the CHILD_SA
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * SA destination address
@@ -89,7 +89,7 @@ METHOD(job_t, get_priority, job_priority_t,
  * Described in header
  */
 delete_child_sa_job_t *delete_child_sa_job_create(protocol_id_t protocol,
-                                                                       u_int32_t spi, host_t *dst, bool expired)
+                                                                       uint32_t spi, host_t *dst, bool expired)
 {
        private_delete_child_sa_job_t *this;
 
index 6fa53644cb3f005e15cfb26b1899102d38053cc9..349f5debbdac6f0b739ddfcc443003dfbcecdff0 100644 (file)
@@ -51,6 +51,6 @@ struct delete_child_sa_job_t {
  * @return                     delete_child_sa_job_t object
  */
 delete_child_sa_job_t *delete_child_sa_job_create(protocol_id_t protocol,
-                                                                       u_int32_t spi, host_t *dst, bool expired);
+                                                                       uint32_t spi, host_t *dst, bool expired);
 
 #endif /** DELETE_CHILD_SA_JOB_H_ @}*/
index f0f90eedf62d7edf547f8bd79d45ccaa9b26a532..bf16e51b52f4d0474af17a4f3499eb280820891a 100644 (file)
@@ -32,12 +32,12 @@ struct private_inactivity_job_t {
        /**
         * Unique CHILD_SA identifier to check
         */
-       u_int32_t id;
+       uint32_t id;
 
        /**
         * Inactivity timeout
         */
-       u_int32_t timeout;
+       uint32_t timeout;
 
        /**
         * Close IKE_SA if last remaining CHILD inactive?
@@ -55,7 +55,7 @@ METHOD(job_t, execute, job_requeue_t,
        private_inactivity_job_t *this)
 {
        ike_sa_t *ike_sa;
-       u_int32_t reschedule = 0;
+       uint32_t reschedule = 0;
 
        ike_sa = charon->child_sa_manager->checkout_by_id(charon->child_sa_manager,
                                                                                                          this->id, NULL);
@@ -63,7 +63,7 @@ METHOD(job_t, execute, job_requeue_t,
        {
                enumerator_t *enumerator;
                child_sa_t *child_sa;
-               u_int32_t delete = 0;
+               uint32_t delete = 0;
                protocol_id_t proto = 0;
                int children = 0;
                status_t status = SUCCESS;
@@ -136,7 +136,7 @@ METHOD(job_t, get_priority, job_priority_t,
 /**
  * See header
  */
-inactivity_job_t *inactivity_job_create(u_int32_t unique_id, u_int32_t timeout,
+inactivity_job_t *inactivity_job_create(uint32_t unique_id, uint32_t timeout,
                                                                                bool close_ike)
 {
        private_inactivity_job_t *this;
index ff19fe5600703e32c87ae033b14c765a994ffae5..240782fa8bb99bcbd2750bf39b41c4cadafc7f60 100644 (file)
@@ -47,7 +47,7 @@ struct inactivity_job_t {
  * @param close_ike    close IKE_SA if the last remaining CHILD_SA is inactive?
  * @return                     inactivity checking job
  */
-inactivity_job_t *inactivity_job_create(u_int32_t unique_id, u_int32_t timeout,
+inactivity_job_t *inactivity_job_create(uint32_t unique_id, uint32_t timeout,
                                                                                bool close_ike);
 
 #endif /** INACTIVITY_JOB_H_ @}*/
index 097dbdffd36d076b50d8e1a81562c97752ef30da..461ba11d1583a082dc3b9a8365ddce80d965a4a6 100644 (file)
@@ -34,7 +34,7 @@ struct private_migrate_job_t {
        /**
         * reqid of the CHILD_SA if it already exists
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * source traffic selector
@@ -144,7 +144,7 @@ METHOD(job_t, get_priority, job_priority_t,
 /*
  * Described in header
  */
-migrate_job_t *migrate_job_create(u_int32_t reqid,
+migrate_job_t *migrate_job_create(uint32_t reqid,
                                                                  traffic_selector_t *src_ts,
                                                                  traffic_selector_t *dst_ts,
                                                                  policy_dir_t dir,
index 0f2b9aaad3a015e8a044f5ba485284bcef55f80b..140635bed0d2eb4ca0576ef16697052c22cc526c 100644 (file)
@@ -54,7 +54,7 @@ struct migrate_job_t {
  * @param remote       remote host address to be used in the IKE_SA
  * @return                     migrate_job_t object
  */
-migrate_job_t *migrate_job_create(u_int32_t reqid,
+migrate_job_t *migrate_job_create(uint32_t reqid,
                                                traffic_selector_t *src_ts, traffic_selector_t *dst_ts,
                                                policy_dir_t dir, host_t *local, host_t *remote);
 
index 057876b331dda0241a196aade6846cac8d045582..d76f4f65b72c5a8d971e134007c92ca5ba54450e 100644 (file)
@@ -38,7 +38,7 @@ struct private_rekey_child_sa_job_t {
        /**
         * inbound SPI of the CHILD_SA
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * SA destination address
@@ -86,7 +86,7 @@ METHOD(job_t, get_priority, job_priority_t,
  * Described in header
  */
 rekey_child_sa_job_t *rekey_child_sa_job_create(protocol_id_t protocol,
-                                                                                               u_int32_t spi, host_t *dst)
+                                                                                               uint32_t spi, host_t *dst)
 {
        private_rekey_child_sa_job_t *this;
 
index 364bb5ae7be4fc5afcdcc9fdd34de32c9d05b5a9..1de06fd0754f62c5ae9133a90637fec36d81b19f 100644 (file)
@@ -49,5 +49,5 @@ struct rekey_child_sa_job_t {
  * @return                     rekey_child_sa_job_t object
  */
 rekey_child_sa_job_t *rekey_child_sa_job_create(protocol_id_t protocol,
-                                                                                               u_int32_t spi, host_t *dst);
+                                                                                               uint32_t spi, host_t *dst);
 #endif /** REKEY_CHILD_SA_JOB_H_ @}*/
index 403d826a349d1549b2d9cfe2c43cdf25b345f313..148db2f92881bbf3bb35306d47bb8968eb21067e 100644 (file)
@@ -49,11 +49,11 @@ METHOD(job_t, destroy, void,
 /**
  * Check if we should delay a reauth, and by how many seconds
  */
-static u_int32_t get_retry_delay(ike_sa_t *ike_sa)
+static uint32_t get_retry_delay(ike_sa_t *ike_sa)
 {
        enumerator_t *enumerator;
        child_sa_t *child_sa;
-       u_int32_t retry = 0;
+       uint32_t retry = 0;
 
        /* avoid reauth collisions for certain IKE_SA/CHILD_SA states */
        if (ike_sa->get_state(ike_sa) != IKE_ESTABLISHED)
@@ -87,7 +87,7 @@ METHOD(job_t, execute, job_requeue_t,
 {
        ike_sa_t *ike_sa;
        status_t status = SUCCESS;
-       u_int32_t retry = 0;
+       uint32_t retry = 0;
 
        ike_sa = charon->ike_sa_manager->checkout(charon->ike_sa_manager,
                                                                                          this->ike_sa_id);
index 48c32680459372613d83df0dc1222ac660174744..4daa41868f31be57d75d05b6f1c6187194627580 100644 (file)
@@ -32,7 +32,7 @@ struct private_retransmit_job_t {
        /**
         * Message ID of the request to resend.
         */
-       u_int32_t message_id;
+       uint32_t message_id;
 
        /**
         * ID of the IKE_SA which the message belongs to.
@@ -79,7 +79,7 @@ METHOD(job_t, get_priority, job_priority_t,
 /*
  * Described in header.
  */
-retransmit_job_t *retransmit_job_create(u_int32_t message_id,ike_sa_id_t *ike_sa_id)
+retransmit_job_t *retransmit_job_create(uint32_t message_id,ike_sa_id_t *ike_sa_id)
 {
        private_retransmit_job_t *this;
 
index c4545534bd0c4728db10a861a5e3aff0fedd1279..595513cef50aca696d9f87983b944460417ba6ae 100644 (file)
@@ -49,7 +49,7 @@ struct retransmit_job_t {
  * @param ike_sa_id                    identification of the ike_sa as ike_sa_id_t
  * @return                                     retransmit_job_t object
  */
-retransmit_job_t *retransmit_job_create(u_int32_t message_id,
+retransmit_job_t *retransmit_job_create(uint32_t message_id,
                                                                                ike_sa_id_t *ike_sa_id);
 
 #endif /** RETRANSMIT_JOB_H_ @}*/
index 862506d908144fbaa0bc6a54b54f28df5c576191..3360b7dc51a114210a5b4f66d88b99e308dff4ce 100644 (file)
@@ -41,7 +41,7 @@ struct private_update_sa_job_t {
        /**
         * SPI of the CHILD_SA
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * Old SA destination address
@@ -92,7 +92,7 @@ METHOD(job_t, get_priority, job_priority_t,
  * Described in header
  */
 update_sa_job_t *update_sa_job_create(protocol_id_t protocol,
-                                                                         u_int32_t spi, host_t *dst, host_t *new)
+                                                                         uint32_t spi, host_t *dst, host_t *new)
 {
        private_update_sa_job_t *this;
 
index 9c19f5b6e3607ae55a8833037b2d65bd495af5c4..ed978dc8bff469d314b814c688a9060e721adf4b 100644 (file)
@@ -49,6 +49,6 @@ struct update_sa_job_t {
  * @return                             update_sa_job_t object
  */
 update_sa_job_t *update_sa_job_create(protocol_id_t protocol,
-                                                                         u_int32_t spi, host_t *dst, host_t *new);
+                                                                         uint32_t spi, host_t *dst, host_t *new);
 
 #endif /** UPDATE_SA_JOB_H_ @}*/
index 56b7cb5a4142666f58da76b0126655a0fc916aaf..ed457cf6181ddcc8f1b3a584da5fb3cd5a273d1a 100644 (file)
@@ -63,22 +63,22 @@ struct private_child_sa_t {
        /**
         * our actually used SPI, 0 if unused
         */
-       u_int32_t my_spi;
+       uint32_t my_spi;
 
        /**
         * others used SPI, 0 if unused
         */
-       u_int32_t other_spi;
+       uint32_t other_spi;
 
        /**
         * our Compression Parameter Index (CPI) used, 0 if unused
         */
-       u_int16_t my_cpi;
+       uint16_t my_cpi;
 
        /**
         * others Compression Parameter Index (CPI) used, 0 if unused
         */
-       u_int16_t other_cpi;
+       uint16_t other_cpi;
 
        /**
         * Array for local traffic selectors
@@ -98,7 +98,7 @@ struct private_child_sa_t {
        /**
         * reqid used for this child_sa
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * Did we allocate/confirm and must release the reqid?
@@ -113,7 +113,7 @@ struct private_child_sa_t {
        /*
         * Unique CHILD_SA identifier
         */
-       u_int32_t unique_id;
+       uint32_t unique_id;
 
        /**
         * inbound mark used for this child_sa
@@ -198,28 +198,28 @@ struct private_child_sa_t {
        /**
         * last number of inbound bytes
         */
-       u_int64_t my_usebytes;
+       uint64_t my_usebytes;
 
        /**
         * last number of outbound bytes
         */
-       u_int64_t other_usebytes;
+       uint64_t other_usebytes;
 
        /**
         * last number of inbound packets
         */
-       u_int64_t my_usepackets;
+       uint64_t my_usepackets;
 
        /**
         * last number of outbound bytes
         */
-       u_int64_t other_usepackets;
+       uint64_t other_usepackets;
 };
 
 /**
  * convert an IKEv2 specific protocol identifier to the IP protocol identifier.
  */
-static inline u_int8_t proto_ike2ip(protocol_id_t protocol)
+static inline uint8_t proto_ike2ip(protocol_id_t protocol)
 {
        switch (protocol)
        {
@@ -238,13 +238,13 @@ METHOD(child_sa_t, get_name, char*,
        return this->config->get_name(this->config);
 }
 
-METHOD(child_sa_t, get_reqid, u_int32_t,
+METHOD(child_sa_t, get_reqid, uint32_t,
           private_child_sa_t *this)
 {
        return this->reqid;
 }
 
-METHOD(child_sa_t, get_unique_id, u_int32_t,
+METHOD(child_sa_t, get_unique_id, uint32_t,
        private_child_sa_t *this)
 {
        return this->unique_id;
@@ -269,13 +269,13 @@ METHOD(child_sa_t, get_state, child_sa_state_t,
        return this->state;
 }
 
-METHOD(child_sa_t, get_spi, u_int32_t,
+METHOD(child_sa_t, get_spi, uint32_t,
           private_child_sa_t *this, bool inbound)
 {
        return inbound ? this->my_spi : this->other_spi;
 }
 
-METHOD(child_sa_t, get_cpi, u_int16_t,
+METHOD(child_sa_t, get_cpi, uint16_t,
           private_child_sa_t *this, bool inbound)
 {
        return inbound ? this->my_cpi : this->other_cpi;
@@ -461,7 +461,7 @@ METHOD(child_sa_t, create_policy_enumerator, enumerator_t*,
 static status_t update_usebytes(private_child_sa_t *this, bool inbound)
 {
        status_t status = FAILED;
-       u_int64_t bytes, packets;
+       uint64_t bytes, packets;
        time_t time;
 
        if (inbound)
@@ -573,7 +573,7 @@ static bool update_usetime(private_child_sa_t *this, bool inbound)
 
 METHOD(child_sa_t, get_usestats, void,
        private_child_sa_t *this, bool inbound,
-       time_t *time, u_int64_t *bytes, u_int64_t *packets)
+       time_t *time, uint64_t *bytes, uint64_t *packets)
 {
        if ((!bytes && !packets) || update_usebytes(this, inbound) != FAILED)
        {
@@ -625,7 +625,7 @@ METHOD(child_sa_t, get_installtime, time_t,
        return this->install_time;
 }
 
-METHOD(child_sa_t, alloc_spi, u_int32_t,
+METHOD(child_sa_t, alloc_spi, uint32_t,
           private_child_sa_t *this, protocol_id_t protocol)
 {
        if (charon->kernel->get_spi(charon->kernel, this->other_addr, this->my_addr,
@@ -639,7 +639,7 @@ METHOD(child_sa_t, alloc_spi, u_int32_t,
        return 0;
 }
 
-METHOD(child_sa_t, alloc_cpi, u_int16_t,
+METHOD(child_sa_t, alloc_cpi, uint16_t,
           private_child_sa_t *this)
 {
        if (charon->kernel->get_cpi(charon->kernel, this->other_addr, this->my_addr,
@@ -651,16 +651,16 @@ METHOD(child_sa_t, alloc_cpi, u_int16_t,
 }
 
 METHOD(child_sa_t, install, status_t,
-       private_child_sa_t *this, chunk_t encr, chunk_t integ, u_int32_t spi,
-       u_int16_t cpi, bool initiator, bool inbound, bool tfcv3,
+       private_child_sa_t *this, chunk_t encr, chunk_t integ, uint32_t spi,
+       uint16_t cpi, bool initiator, bool inbound, bool tfcv3,
        linked_list_t *my_ts, linked_list_t *other_ts)
 {
-       u_int16_t enc_alg = ENCR_UNDEFINED, int_alg = AUTH_UNDEFINED, size;
-       u_int16_t esn = NO_EXT_SEQ_NUMBERS;
+       uint16_t enc_alg = ENCR_UNDEFINED, int_alg = AUTH_UNDEFINED, size;
+       uint16_t esn = NO_EXT_SEQ_NUMBERS;
        linked_list_t *src_ts = NULL, *dst_ts = NULL;
        time_t now;
        lifetime_cfg_t *lifetime;
-       u_int32_t tfc = 0;
+       uint32_t tfc = 0;
        host_t *src, *dst;
        status_t status;
        bool update = FALSE;
@@ -1174,7 +1174,7 @@ METHOD(child_sa_t, destroy, void,
 static host_t* get_proxy_addr(child_cfg_t *config, host_t *ike, bool local)
 {
        host_t *host = NULL;
-       u_int8_t mask;
+       uint8_t mask;
        enumerator_t *enumerator;
        linked_list_t *ts_list, *list;
        traffic_selector_t *ts;
@@ -1207,7 +1207,7 @@ static host_t* get_proxy_addr(child_cfg_t *config, host_t *ike, bool local)
  * Described in header.
  */
 child_sa_t * child_sa_create(host_t *me, host_t* other,
-                                                        child_cfg_t *config, u_int32_t rekey, bool encap,
+                                                        child_cfg_t *config, uint32_t rekey, bool encap,
                                                         u_int mark_in, u_int mark_out)
 {
        private_child_sa_t *this;
index debe8eb2ca2fe4c4df48b46f1a8ac9424bda19c4..bc7df996a83d55e1f8c14d59db40b80b5b0ea4a7 100644 (file)
@@ -128,7 +128,7 @@ struct child_sa_t {
         *
         * @return                      reqid of the CHILD SA
         */
-       u_int32_t (*get_reqid)(child_sa_t *this);
+       uint32_t (*get_reqid)(child_sa_t *this);
 
        /**
         * Get the unique numerical identifier for this CHILD_SA.
@@ -138,7 +138,7 @@ struct child_sa_t {
         *
         * @return                      unique CHILD_SA identifier
         */
-       u_int32_t (*get_unique_id)(child_sa_t *this);
+       uint32_t (*get_unique_id)(child_sa_t *this);
 
        /**
         * Get the config used to set up this child sa.
@@ -171,7 +171,7 @@ struct child_sa_t {
         * @param inbound       TRUE to get inbound SPI, FALSE for outbound.
         * @return                      SPI of the CHILD SA
         */
-       u_int32_t (*get_spi) (child_sa_t *this, bool inbound);
+       uint32_t (*get_spi) (child_sa_t *this, bool inbound);
 
        /**
         * Get the CPI of this CHILD_SA.
@@ -183,7 +183,7 @@ struct child_sa_t {
         * @param inbound       TRUE to get inbound CPI, FALSE for outbound.
         * @return                      CPI of the CHILD SA
         */
-       u_int16_t (*get_cpi) (child_sa_t *this, bool inbound);
+       uint16_t (*get_cpi) (child_sa_t *this, bool inbound);
 
        /**
         * Get the protocol which this CHILD_SA uses to protect traffic.
@@ -300,7 +300,7 @@ struct child_sa_t {
         * @param[out] packets  number of processed packets (NULL to ignore)
         */
        void (*get_usestats)(child_sa_t *this, bool inbound, time_t *time,
-                                                u_int64_t *bytes, u_int64_t *packets);
+                                                uint64_t *bytes, uint64_t *packets);
 
        /**
         * Get the mark used with this CHILD_SA.
@@ -335,14 +335,14 @@ struct child_sa_t {
         * @param spi           SPI output pointer
         * @return                      SPI, 0 on failure
         */
-       u_int32_t (*alloc_spi)(child_sa_t *this, protocol_id_t protocol);
+       uint32_t (*alloc_spi)(child_sa_t *this, protocol_id_t protocol);
 
        /**
         * Allocate a CPI to use for IPComp.
         *
         * @return                      CPI, 0 on failure
         */
-       u_int16_t (*alloc_cpi)(child_sa_t *this);
+       uint16_t (*alloc_cpi)(child_sa_t *this);
 
        /**
         * Install an IPsec SA for one direction.
@@ -359,7 +359,7 @@ struct child_sa_t {
         * @return                      SUCCESS or FAILED
         */
        status_t (*install)(child_sa_t *this, chunk_t encr, chunk_t integ,
-                                               u_int32_t spi, u_int16_t cpi,
+                                               uint32_t spi, uint16_t cpi,
                                                bool initiator, bool inbound, bool tfcv3,
                                                linked_list_t *my_ts, linked_list_t *other_ts);
        /**
@@ -404,7 +404,7 @@ struct child_sa_t {
  * @return                                     child_sa_t object
  */
 child_sa_t * child_sa_create(host_t *me, host_t *other, child_cfg_t *config,
-                                                        u_int32_t reqid, bool encap,
+                                                        uint32_t reqid, bool encap,
                                                         u_int mark_in, u_int mark_out);
 
 #endif /** CHILD_SA_H_ @}*/
index 071a119da80fd8e3bec8c729cccba59795eeddfe..13f22cf5f5ad9127b82c5db7603b9a80ec777ae9 100644 (file)
@@ -59,11 +59,11 @@ typedef struct {
        /** the associated IKE_SA */
        ike_sa_id_t *ike_id;
        /** unique CHILD_SA identifier */
-       u_int32_t unique_id;
+       uint32_t unique_id;
        /** inbound SPI */
-       u_int32_t spi_in;
+       uint32_t spi_in;
        /** outbound SPI */
-       u_int32_t spi_out;
+       uint32_t spi_out;
        /** inbound host address */
        host_t *host_in;
        /** outbound host address and port */
@@ -202,7 +202,7 @@ METHOD(child_sa_manager_t, remove_, void,
  * Check out an IKE_SA for a given CHILD_SA
  */
 static ike_sa_t *checkout_ikesa(private_child_sa_manager_t *this,
-                                       ike_sa_id_t *id, u_int32_t unique_id, child_sa_t **child_sa)
+                                       ike_sa_id_t *id, uint32_t unique_id, child_sa_t **child_sa)
 {
        enumerator_t *enumerator;
        child_sa_t *current;
@@ -238,7 +238,7 @@ static ike_sa_t *checkout_ikesa(private_child_sa_manager_t *this,
 }
 
 METHOD(child_sa_manager_t, checkout_by_id, ike_sa_t*,
-       private_child_sa_manager_t *this, u_int32_t unique_id,
+       private_child_sa_manager_t *this, uint32_t unique_id,
        child_sa_t **child_sa)
 {
        ike_sa_id_t *id;
@@ -262,11 +262,11 @@ METHOD(child_sa_manager_t, checkout_by_id, ike_sa_t*,
 }
 
 METHOD(child_sa_manager_t, checkout, ike_sa_t*,
-       private_child_sa_manager_t *this, protocol_id_t protocol, u_int32_t spi,
+       private_child_sa_manager_t *this, protocol_id_t protocol, uint32_t spi,
        host_t *dst, child_sa_t **child_sa)
 {
        ike_sa_id_t *id;
-       u_int32_t unique_id;
+       uint32_t unique_id;
        child_entry_t *entry, key = {
                .spi_in = spi,
                .spi_out = spi,
index 4d57528e878ca20613a168db46e1303bf302f81b..f1d6ad9e00970e6d4494cc584ee41f9139791244 100644 (file)
@@ -59,7 +59,7 @@ struct child_sa_manager_t {
         * @return                              IKE_SA, NULL if not found
         */
        ike_sa_t *(*checkout)(child_sa_manager_t *this,
-                                                 protocol_id_t protocol, u_int32_t spi, host_t *dst,
+                                                 protocol_id_t protocol, uint32_t spi, host_t *dst,
                                                  child_sa_t **child_sa);
 
        /**
@@ -72,7 +72,7 @@ struct child_sa_manager_t {
         * @param child_sa              returns CHILD_SA managed by IKE_SA
         * @return                              IKE_SA, NULL if not found
         */
-       ike_sa_t *(*checkout_by_id)(child_sa_manager_t *this, u_int32_t unique_id,
+       ike_sa_t *(*checkout_by_id)(child_sa_manager_t *this, uint32_t unique_id,
                                                                child_sa_t **child_sa);
 
        /**
index 1886307e9e99918681bf6a2299da597c290dc5ed..e4fcbc8f0aea5220b660c47af0a74931a6813d80 100644 (file)
@@ -35,7 +35,7 @@ struct eap_entry_t {
        /**
         * vendor ID, 0 for default EAP methods
         */
-       u_int32_t vendor;
+       uint32_t vendor;
 
        /**
         * Role of the method returned by the constructor, EAP_SERVER or EAP_PEER
@@ -70,7 +70,7 @@ struct private_eap_manager_t {
 };
 
 METHOD(eap_manager_t, add_method, void,
-       private_eap_manager_t *this, eap_type_t type, u_int32_t vendor,
+       private_eap_manager_t *this, eap_type_t type, uint32_t vendor,
        eap_role_t role, eap_constructor_t constructor)
 {
        eap_entry_t *entry = malloc_thing(eap_entry_t);
@@ -109,7 +109,7 @@ METHOD(eap_manager_t, remove_method, void,
  * filter the registered methods
  */
 static bool filter_methods(uintptr_t role, eap_entry_t **entry,
-                                                  eap_type_t *type, void *in, u_int32_t *vendor)
+                                                  eap_type_t *type, void *in, uint32_t *vendor)
 {
        if ((*entry)->role != (eap_role_t)role)
        {
@@ -144,7 +144,7 @@ METHOD(eap_manager_t, create_enumerator, enumerator_t*,
 }
 
 METHOD(eap_manager_t, create_instance, eap_method_t*,
-       private_eap_manager_t *this, eap_type_t type, u_int32_t vendor,
+       private_eap_manager_t *this, eap_type_t type, uint32_t vendor,
        eap_role_t role, identification_t *server, identification_t *peer)
 {
        enumerator_t *enumerator;
index e318ef57a990487e7e0063ad31b81219acd3757a..4ed1cae206debc9ebafda615dea7b542f980b054 100644 (file)
@@ -44,7 +44,7 @@ struct eap_manager_t {
         * @param role                  EAP role of the registered method
         * @param constructor   constructor function, returns an eap_method_t
         */
-       void (*add_method)(eap_manager_t *this, eap_type_t type, u_int32_t vendor,
+       void (*add_method)(eap_manager_t *this, eap_type_t type, uint32_t vendor,
                                           eap_role_t role, eap_constructor_t constructor);
 
        /**
@@ -61,7 +61,7 @@ struct eap_manager_t {
         * even though it is registered as method with this manager).
         *
         * @param role                  EAP role of methods to enumerate
-        * @return                              enumerator over (eap_type_t type, u_int32_t vendor)
+        * @return                              enumerator over (eap_type_t type, uint32_t vendor)
         */
        enumerator_t* (*create_enumerator)(eap_manager_t *this, eap_role_t role);
 
@@ -76,7 +76,7 @@ struct eap_manager_t {
         * @return                              EAP method instance, NULL if no constructor found
         */
        eap_method_t* (*create_instance)(eap_manager_t *this, eap_type_t type,
-                                                                        u_int32_t vendor, eap_role_t role,
+                                                                        uint32_t vendor, eap_role_t role,
                                                                         identification_t *server,
                                                                         identification_t *peer);
 
index 689c0f990244400112e41e3b8f8b6231ef05fd98..8e25f7df890580e3f0d594891b8e3d1f2debb0c2 100644 (file)
@@ -96,7 +96,7 @@ struct eap_method_t {
         * @param vendor        pointer receiving vendor identifier for type, 0 for none
         * @return                      type of the EAP method
         */
-       eap_type_t (*get_type) (eap_method_t *this, u_int32_t *vendor);
+       eap_type_t (*get_type) (eap_method_t *this, uint32_t *vendor);
 
        /**
         * Check if this EAP method authenticates the server.
@@ -126,7 +126,7 @@ struct eap_method_t {
         *
         * @return                              current EAP identifier
         */
-       u_int8_t (*get_identifier) (eap_method_t *this);
+       uint8_t (*get_identifier) (eap_method_t *this);
 
        /**
         * Set the EAP identifier to a deterministic value, overwriting
@@ -134,7 +134,7 @@ struct eap_method_t {
         *
         * @param identifier    current EAP identifier
         */
-       void (*set_identifier) (eap_method_t *this, u_int8_t identifier);
+       void (*set_identifier) (eap_method_t *this, uint8_t identifier);
 
        /**
         * Get authentication details performed by this EAP method.
index bcbff321128a8331b645ebe98eede1af8d2abda4..3a236519b5dee081b55bd6e565fed71a76b82aff 100644 (file)
@@ -101,7 +101,7 @@ struct private_ike_sa_t {
        /**
         * unique numerical ID for this IKE_SA.
         */
-       u_int32_t unique_id;
+       uint32_t unique_id;
 
        /**
         * Current state of the IKE_SA
@@ -233,12 +233,12 @@ struct private_ike_sa_t {
        /**
         * number pending UPDATE_SA_ADDRESS (MOBIKE)
         */
-       u_int32_t pending_updates;
+       uint32_t pending_updates;
 
        /**
         * NAT keep alive interval
         */
-       u_int32_t keepalive_interval;
+       uint32_t keepalive_interval;
 
        /**
         * The schedueld keep alive job, if any
@@ -249,7 +249,7 @@ struct private_ike_sa_t {
         * interval for retries during initiation (e.g. if DNS resolution failed),
         * 0 to disable (default)
         */
-       u_int32_t retry_initiate_interval;
+       uint32_t retry_initiate_interval;
 
        /**
         * TRUE if a retry_initiate_job has been queued
@@ -259,12 +259,12 @@ struct private_ike_sa_t {
        /**
         * Timestamps for this IKE_SA
         */
-       u_int32_t stats[STAT_MAX];
+       uint32_t stats[STAT_MAX];
 
        /**
         * how many times we have retried so far (keyingtries)
         */
-       u_int32_t keyingtry;
+       uint32_t keyingtry;
 
        /**
         * local host address to be used for IKE, set via MIGRATE kernel message
@@ -343,7 +343,7 @@ static time_t get_use_time(private_ike_sa_t* this, bool inbound)
        return use_time;
 }
 
-METHOD(ike_sa_t, get_unique_id, u_int32_t,
+METHOD(ike_sa_t, get_unique_id, uint32_t,
        private_ike_sa_t *this)
 {
        return this->unique_id;
@@ -359,7 +359,7 @@ METHOD(ike_sa_t, get_name, char*,
        return "(unnamed)";
 }
 
-METHOD(ike_sa_t, get_statistic, u_int32_t,
+METHOD(ike_sa_t, get_statistic, uint32_t,
        private_ike_sa_t *this, statistic_t kind)
 {
        if (kind < STAT_MAX)
@@ -370,7 +370,7 @@ METHOD(ike_sa_t, get_statistic, u_int32_t,
 }
 
 METHOD(ike_sa_t, set_statistic, void,
-       private_ike_sa_t *this, statistic_t kind, u_int32_t value)
+       private_ike_sa_t *this, statistic_t kind, uint32_t value)
 {
        if (kind < STAT_MAX)
        {
@@ -604,7 +604,7 @@ METHOD(ike_sa_t, set_proposal, void,
 }
 
 METHOD(ike_sa_t, set_message_id, void,
-       private_ike_sa_t *this, bool initiate, u_int32_t mid)
+       private_ike_sa_t *this, bool initiate, uint32_t mid)
 {
        if (initiate)
        {
@@ -814,7 +814,7 @@ METHOD(ike_sa_t, set_state, void,
                                this->state == IKE_PASSIVE)
                        {
                                job_t *job;
-                               u_int32_t t;
+                               uint32_t t;
 
                                /* calculate rekey, reauth and lifetime */
                                this->stats[STAT_ESTABLISHED] = time_monotonic(NULL);
@@ -1035,12 +1035,12 @@ METHOD(ike_sa_t, has_mapping_changed, bool,
 }
 
 METHOD(ike_sa_t, set_pending_updates, void,
-       private_ike_sa_t *this, u_int32_t updates)
+       private_ike_sa_t *this, uint32_t updates)
 {
        this->pending_updates = updates;
 }
 
-METHOD(ike_sa_t, get_pending_updates, u_int32_t,
+METHOD(ike_sa_t, get_pending_updates, uint32_t,
        private_ike_sa_t *this)
 {
        return this->pending_updates;
@@ -1432,7 +1432,7 @@ static void resolve_hosts(private_ike_sa_t *this)
 }
 
 METHOD(ike_sa_t, initiate, status_t,
-       private_ike_sa_t *this, child_cfg_t *child_cfg, u_int32_t reqid,
+       private_ike_sa_t *this, child_cfg_t *child_cfg, uint32_t reqid,
        traffic_selector_t *tsi, traffic_selector_t *tsr)
 {
        bool defer_initiate = FALSE;
@@ -1642,7 +1642,7 @@ METHOD(ike_sa_t, add_child_sa, void,
 }
 
 METHOD(ike_sa_t, get_child_sa, child_sa_t*,
-       private_ike_sa_t *this, protocol_id_t protocol, u_int32_t spi, bool inbound)
+       private_ike_sa_t *this, protocol_id_t protocol, uint32_t spi, bool inbound)
 {
        enumerator_t *enumerator;
        child_sa_t *current, *found = NULL;
@@ -1721,7 +1721,7 @@ METHOD(ike_sa_t, remove_child_sa, void,
 }
 
 METHOD(ike_sa_t, rekey_child_sa, status_t,
-       private_ike_sa_t *this, protocol_id_t protocol, u_int32_t spi)
+       private_ike_sa_t *this, protocol_id_t protocol, uint32_t spi)
 {
        if (this->state == IKE_PASSIVE)
        {
@@ -1732,7 +1732,7 @@ METHOD(ike_sa_t, rekey_child_sa, status_t,
 }
 
 METHOD(ike_sa_t, delete_child_sa, status_t,
-       private_ike_sa_t *this, protocol_id_t protocol, u_int32_t spi, bool expired)
+       private_ike_sa_t *this, protocol_id_t protocol, uint32_t spi, bool expired)
 {
        if (this->state == IKE_PASSIVE)
        {
@@ -1744,7 +1744,7 @@ METHOD(ike_sa_t, delete_child_sa, status_t,
 }
 
 METHOD(ike_sa_t, destroy_child_sa, status_t,
-       private_ike_sa_t *this, protocol_id_t protocol, u_int32_t spi)
+       private_ike_sa_t *this, protocol_id_t protocol, uint32_t spi)
 {
        enumerator_t *enumerator;
        child_sa_t *child_sa;
@@ -2301,7 +2301,7 @@ METHOD(ike_sa_t, redirect, status_t,
 }
 
 METHOD(ike_sa_t, retransmit, status_t,
-       private_ike_sa_t *this, u_int32_t message_id)
+       private_ike_sa_t *this, uint32_t message_id)
 {
        if (this->state == IKE_PASSIVE)
        {
@@ -2316,7 +2316,7 @@ METHOD(ike_sa_t, retransmit, status_t,
                        case IKE_CONNECTING:
                        {
                                /* retry IKE_SA_INIT/Main Mode if we have multiple keyingtries */
-                               u_int32_t tries = this->peer_cfg->get_keyingtries(this->peer_cfg);
+                               uint32_t tries = this->peer_cfg->get_keyingtries(this->peer_cfg);
                                charon->bus->alert(charon->bus, ALERT_PEER_INIT_UNREACHABLE,
                                                                   this->keyingtry);
                                this->keyingtry++;
@@ -2358,9 +2358,9 @@ METHOD(ike_sa_t, retransmit, status_t,
 }
 
 METHOD(ike_sa_t, set_auth_lifetime, status_t,
-       private_ike_sa_t *this, u_int32_t lifetime)
+       private_ike_sa_t *this, uint32_t lifetime)
 {
-       u_int32_t diff, hard, soft, now;
+       uint32_t diff, hard, soft, now;
        bool send_update;
 
        diff = this->peer_cfg->get_over_time(this->peer_cfg);
index 836360e3c2cd017b2c3475e1962a038468e63dbb..2122867de7853509a0f23d9357fe01b031d87530 100644 (file)
@@ -353,7 +353,7 @@ struct ike_sa_t {
         *
         * @return                              unique ID
         */
-       u_int32_t (*get_unique_id) (ike_sa_t *this);
+       uint32_t (*get_unique_id) (ike_sa_t *this);
 
        /**
         * Get the state of the IKE_SA.
@@ -382,7 +382,7 @@ struct ike_sa_t {
         * @param kind                  kind of requested value
         * @return                              value as integer
         */
-       u_int32_t (*get_statistic)(ike_sa_t *this, statistic_t kind);
+       uint32_t (*get_statistic)(ike_sa_t *this, statistic_t kind);
 
        /**
         * Set statistic value of the IKE_SA.
@@ -390,7 +390,7 @@ struct ike_sa_t {
         * @param kind                  kind of value to update
         * @param value                 value as integer
         */
-       void (*set_statistic)(ike_sa_t *this, statistic_t kind, u_int32_t value);
+       void (*set_statistic)(ike_sa_t *this, statistic_t kind, uint32_t value);
 
        /**
         * Get the own host address.
@@ -557,7 +557,7 @@ struct ike_sa_t {
         * @param initiate              TRUE to set message ID for initiating
         * @param mid                   message id to set
         */
-       void (*set_message_id)(ike_sa_t *this, bool initiate, u_int32_t mid);
+       void (*set_message_id)(ike_sa_t *this, bool initiate, uint32_t mid);
 
        /**
         * Add an additional address for the peer.
@@ -630,14 +630,14 @@ struct ike_sa_t {
         *
         * @return                              number of pending updates
         */
-       u_int32_t (*get_pending_updates)(ike_sa_t *this);
+       uint32_t (*get_pending_updates)(ike_sa_t *this);
 
        /**
         * Set the number of queued MOBIKE address updates.
         *
         * @param updates               number of pending updates
         */
-       void (*set_pending_updates)(ike_sa_t *this, u_int32_t updates);
+       void (*set_pending_updates)(ike_sa_t *this, uint32_t updates);
 
 #ifdef ME
        /**
@@ -752,7 +752,7 @@ struct ike_sa_t {
         *                                              - DESTROY_ME if initialization failed
         */
        status_t (*initiate) (ike_sa_t *this, child_cfg_t *child_cfg,
-                                                 u_int32_t reqid, traffic_selector_t *tsi,
+                                                 uint32_t reqid, traffic_selector_t *tsi,
                                                  traffic_selector_t *tsr);
 
        /**
@@ -850,7 +850,7 @@ struct ike_sa_t {
         *                                              - SUCCESS
         *                                              - NOT_FOUND if request doesn't have to be retransmited
         */
-       status_t (*retransmit) (ike_sa_t *this, u_int32_t message_id);
+       status_t (*retransmit) (ike_sa_t *this, uint32_t message_id);
 
        /**
         * Sends a DPD request to the peer.
@@ -924,7 +924,7 @@ struct ike_sa_t {
         * @return                              child_sa, or NULL if none found
         */
        child_sa_t* (*get_child_sa) (ike_sa_t *this, protocol_id_t protocol,
-                                                                u_int32_t spi, bool inbound);
+                                                                uint32_t spi, bool inbound);
 
        /**
         * Get the number of CHILD_SAs.
@@ -958,7 +958,7 @@ struct ike_sa_t {
         *                                              - NOT_FOUND, if IKE_SA has no such CHILD_SA
         *                                              - SUCCESS, if rekeying initiated
         */
-       status_t (*rekey_child_sa) (ike_sa_t *this, protocol_id_t protocol, u_int32_t spi);
+       status_t (*rekey_child_sa) (ike_sa_t *this, protocol_id_t protocol, uint32_t spi);
 
        /**
         * Close the CHILD SA with the specified protocol/SPI.
@@ -975,7 +975,7 @@ struct ike_sa_t {
         *                                              - SUCCESS, if delete message sent
         */
        status_t (*delete_child_sa)(ike_sa_t *this, protocol_id_t protocol,
-                                                               u_int32_t spi, bool expired);
+                                                               uint32_t spi, bool expired);
 
        /**
         * Destroy a CHILD SA with the specified protocol/SPI.
@@ -988,7 +988,7 @@ struct ike_sa_t {
         *                                              - NOT_FOUND, if IKE_SA has no such CHILD_SA
         *                                              - SUCCESS
         */
-       status_t (*destroy_child_sa) (ike_sa_t *this, protocol_id_t protocol, u_int32_t spi);
+       status_t (*destroy_child_sa) (ike_sa_t *this, protocol_id_t protocol, uint32_t spi);
 
        /**
         * Rekey the IKE_SA.
@@ -1028,7 +1028,7 @@ struct ike_sa_t {
         * @param lifetime              lifetime in seconds
         * @return                              DESTROY_ME to destroy the IKE_SA
         */
-       status_t (*set_auth_lifetime)(ike_sa_t *this, u_int32_t lifetime);
+       status_t (*set_auth_lifetime)(ike_sa_t *this, uint32_t lifetime);
 
        /**
         * Add a virtual IP to use for this IKE_SA and its children.
index e52086483afea079e1afcc7239268c3813f68809..b4e66ed732c576dec601ecb0b4cd7cdba3b1f8fe 100644 (file)
@@ -34,17 +34,17 @@ struct private_ike_sa_id_t {
        /**
         * Major IKE version of IKE_SA.
         */
-       u_int8_t ike_version;
+       uint8_t ike_version;
 
         /**
          * SPI of initiator.
          */
-       u_int64_t initiator_spi;
+       uint64_t initiator_spi;
 
         /**
          * SPI of responder.
          */
-       u_int64_t responder_spi;
+       uint64_t responder_spi;
 
        /**
         * Role for specific IKE_SA.
@@ -52,31 +52,31 @@ struct private_ike_sa_id_t {
        bool is_initiator_flag;
 };
 
-METHOD(ike_sa_id_t, get_ike_version, u_int8_t,
+METHOD(ike_sa_id_t, get_ike_version, uint8_t,
        private_ike_sa_id_t *this)
 {
        return this->ike_version;
 }
 
 METHOD(ike_sa_id_t, set_responder_spi, void,
-       private_ike_sa_id_t *this, u_int64_t responder_spi)
+       private_ike_sa_id_t *this, uint64_t responder_spi)
 {
        this->responder_spi = responder_spi;
 }
 
 METHOD(ike_sa_id_t, set_initiator_spi, void,
-       private_ike_sa_id_t *this, u_int64_t initiator_spi)
+       private_ike_sa_id_t *this, uint64_t initiator_spi)
 {
        this->initiator_spi = initiator_spi;
 }
 
-METHOD(ike_sa_id_t, get_initiator_spi, u_int64_t,
+METHOD(ike_sa_id_t, get_initiator_spi, uint64_t,
        private_ike_sa_id_t *this)
 {
        return this->initiator_spi;
 }
 
-METHOD(ike_sa_id_t, get_responder_spi, u_int64_t,
+METHOD(ike_sa_id_t, get_responder_spi, uint64_t,
        private_ike_sa_id_t *this)
 {
        return this->responder_spi;
@@ -134,8 +134,8 @@ METHOD(ike_sa_id_t, destroy, void,
 /*
  * Described in header.
  */
-ike_sa_id_t * ike_sa_id_create(u_int8_t ike_version, u_int64_t initiator_spi,
-                                                          u_int64_t responder_spi, bool is_initiator_flag)
+ike_sa_id_t * ike_sa_id_create(uint8_t ike_version, uint64_t initiator_spi,
+                                                          uint64_t responder_spi, bool is_initiator_flag)
 {
        private_ike_sa_id_t *this;
 
index 5eb754e9586f3e5afe87ddc71654b2a451406455..b3a9ef61f23b65b2df2c88328d819153b2487a19 100644 (file)
@@ -41,7 +41,7 @@ struct ike_sa_id_t {
         *
         * @return                                      IKE version
         */
-       u_int8_t (*get_ike_version) (ike_sa_id_t *this);
+       uint8_t (*get_ike_version) (ike_sa_id_t *this);
 
        /**
         * Set the SPI of the responder.
@@ -50,28 +50,28 @@ struct ike_sa_id_t {
         *
         * @param responder_spi         SPI of responder to set
         */
-       void (*set_responder_spi) (ike_sa_id_t *this, u_int64_t responder_spi);
+       void (*set_responder_spi) (ike_sa_id_t *this, uint64_t responder_spi);
 
        /**
         * Set the SPI of the initiator.
         *
         * @param initiator_spi         SPI to set
         */
-       void (*set_initiator_spi) (ike_sa_id_t *this, u_int64_t initiator_spi);
+       void (*set_initiator_spi) (ike_sa_id_t *this, uint64_t initiator_spi);
 
        /**
         * Get the initiator SPI.
         *
         * @return                                      SPI of the initiator
         */
-       u_int64_t (*get_initiator_spi) (ike_sa_id_t *this);
+       uint64_t (*get_initiator_spi) (ike_sa_id_t *this);
 
        /**
         * Get the responder SPI.
         *
         * @return                                      SPI of the responder
         */
-       u_int64_t (*get_responder_spi) (ike_sa_id_t *this);
+       uint64_t (*get_responder_spi) (ike_sa_id_t *this);
 
        /**
         * Check if two ike_sa_id_t objects are equal.
@@ -131,7 +131,7 @@ struct ike_sa_id_t {
  * @param is_initiaor                  TRUE if we are the original initiator
  * @return                                             ike_sa_id_t object
  */
-ike_sa_id_t * ike_sa_id_create(u_int8_t ike_version, u_int64_t initiator_spi,
-                                                          u_int64_t responder_spi, bool is_initiaor);
+ike_sa_id_t * ike_sa_id_create(uint8_t ike_version, uint64_t initiator_spi,
+                                                          uint64_t responder_spi, bool is_initiaor);
 
 #endif /** IKE_SA_ID_H_ @}*/
index ef85dfdef772b26852a32ccaca73157bec925238..9b9ad93a295302d07531284844b89c70123c2d62 100644 (file)
@@ -113,7 +113,7 @@ struct entry_t {
        /**
         * message ID or hash of currently processing message, -1 if none
         */
-       u_int32_t processing;
+       uint32_t processing;
 };
 
 /**
@@ -265,7 +265,7 @@ struct init_hash_t {
        chunk_t hash;
 
        /** our SPI allocated for the IKE_SA based on this message */
-       u_int64_t our_spi;
+       uint64_t our_spi;
 };
 
 typedef struct segment_t segment_t;
@@ -977,9 +977,9 @@ static void remove_connected_peers(private_ike_sa_manager_t *this, entry_t *entr
 /**
  * Get a random SPI for new IKE_SAs
  */
-static u_int64_t get_spi(private_ike_sa_manager_t *this)
+static uint64_t get_spi(private_ike_sa_manager_t *this)
 {
-       u_int64_t spi;
+       uint64_t spi;
 
        this->spi_lock->read_lock(this->spi_lock);
        if (this->spi_cb.cb)
@@ -987,7 +987,7 @@ static u_int64_t get_spi(private_ike_sa_manager_t *this)
                spi = this->spi_cb.cb(this->spi_cb.data);
        }
        else if (!this->rng ||
-                        !this->rng->get_bytes(this->rng, sizeof(spi), (u_int8_t*)&spi))
+                        !this->rng->get_bytes(this->rng, sizeof(spi), (uint8_t*)&spi))
        {
                spi = 0;
        }
@@ -1007,8 +1007,8 @@ static bool get_init_hash(hasher_t *hasher, message_t *message, chunk_t *hash)
 
        if (message->get_first_payload_type(message) == PLV1_FRAGMENT)
        {       /* only hash the source IP, port and SPI for fragmented init messages */
-               u_int16_t port;
-               u_int64_t spi;
+               uint16_t port;
+               uint64_t spi;
 
                src = message->get_source(message);
                if (!hasher->allocate_hash(hasher, src->get_address(src), NULL))
@@ -1050,13 +1050,13 @@ static bool get_init_hash(hasher_t *hasher, message_t *message, chunk_t *hash)
  *                     FAILED if the SPI allocation failed
  */
 static status_t check_and_put_init_hash(private_ike_sa_manager_t *this,
-                                                                               chunk_t init_hash, u_int64_t *our_spi)
+                                                                               chunk_t init_hash, uint64_t *our_spi)
 {
        table_item_t *item;
        u_int row, segment;
        mutex_t *mutex;
        init_hash_t *init;
-       u_int64_t spi;
+       uint64_t spi;
 
        row = chunk_hash(init_hash) & this->table_mask;
        segment = row & this->segment_mask;
@@ -1174,8 +1174,8 @@ METHOD(ike_sa_manager_t, checkout_new, ike_sa_t*,
 {
        ike_sa_id_t *ike_sa_id;
        ike_sa_t *ike_sa;
-       u_int8_t ike_version;
-       u_int64_t spi;
+       uint8_t ike_version;
+       uint64_t spi;
 
        ike_version = version == IKEV1 ? IKEV1_MAJOR_VERSION : IKEV2_MAJOR_VERSION;
 
@@ -1208,7 +1208,7 @@ METHOD(ike_sa_manager_t, checkout_new, ike_sa_t*,
 /**
  * Get the message ID or message hash to detect early retransmissions
  */
-static u_int32_t get_message_id_or_hash(message_t *message)
+static uint32_t get_message_id_or_hash(message_t *message)
 {
        if (message->get_major_version(message) == IKEV1_MAJOR_VERSION)
        {
@@ -1273,7 +1273,7 @@ METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*,
        if (is_init)
        {
                hasher_t *hasher;
-               u_int64_t our_spi;
+               uint64_t our_spi;
                chunk_t hash;
 
                hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA1);
@@ -1455,7 +1455,7 @@ out:
 }
 
 METHOD(ike_sa_manager_t, checkout_by_id, ike_sa_t*,
-       private_ike_sa_manager_t *this, u_int32_t id)
+       private_ike_sa_manager_t *this, uint32_t id)
 {
        enumerator_t *enumerator;
        entry_t *entry;
index f1b7c2579ee490b85b1337f6cd6beb27cb939b1f..4298c54e22f35580326992830b2e4dcb44b21c90 100644 (file)
@@ -38,7 +38,7 @@ typedef struct ike_sa_manager_t ike_sa_manager_t;
  * @param data         data supplied during registration of the callback
  * @return                     allocated SPI, 0 on failure
  */
-typedef u_int64_t (*spi_cb_t)(void *data);
+typedef uint64_t (*spi_cb_t)(void *data);
 
 /**
  * Manages and synchronizes access to all IKE_SAs.
@@ -147,7 +147,7 @@ struct ike_sa_manager_t {
         *                                                      - checked out IKE_SA, if found
         *                                                      - NULL, if not found
         */
-       ike_sa_t* (*checkout_by_id) (ike_sa_manager_t* this, u_int32_t id);
+       ike_sa_t* (*checkout_by_id) (ike_sa_manager_t* this, uint32_t id);
 
        /**
         * Check out an IKE_SA by the policy/connection name.
index e428966ad6874b3f2e3b1af055057b8eaf643fdf..be6b03bef9f584e42f4f6caae22ace18fc5216b9 100644 (file)
@@ -32,7 +32,7 @@ typedef struct private_keymat_v1_t private_keymat_v1_t;
  */
 typedef struct {
        /** message ID */
-       u_int32_t mid;
+       uint32_t mid;
        /** current IV */
        chunk_t iv;
        /** last block of encrypted message */
@@ -128,7 +128,7 @@ static void iv_data_destroy(iv_data_t *this)
  */
 typedef struct {
        /** message ID */
-       u_int32_t mid;
+       uint32_t mid;
        /** Ni_b (Nonce from first message) */
        chunk_t n_i;
        /** Nr_b (Nonce from second message) */
@@ -272,7 +272,7 @@ static bool expand_skeyid_e(chunk_t skeyid_e, size_t key_size, prf_t *prf,
 static aead_t *create_aead(proposal_t *proposal, prf_t *prf, chunk_t skeyid_e)
 {
        private_aead_t *this;
-       u_int16_t alg, key_size;
+       uint16_t alg, key_size;
        crypter_t *crypter;
        chunk_t ka;
 
@@ -324,7 +324,7 @@ static aead_t *create_aead(proposal_t *proposal, prf_t *prf, chunk_t skeyid_e)
 /**
  * Converts integrity algorithm to PRF algorithm
  */
-static u_int16_t auth_to_prf(u_int16_t alg)
+static uint16_t auth_to_prf(uint16_t alg)
 {
        switch (alg)
        {
@@ -348,7 +348,7 @@ static u_int16_t auth_to_prf(u_int16_t alg)
 /**
  * Converts integrity algorithm to hash algorithm
  */
-static u_int16_t auth_to_hash(u_int16_t alg)
+static uint16_t auth_to_hash(uint16_t alg)
 {
        switch (alg)
        {
@@ -370,7 +370,7 @@ static u_int16_t auth_to_hash(u_int16_t alg)
 /**
  * Adjust the key length for PRF algorithms that expect a fixed key length.
  */
-static void adjust_keylen(u_int16_t alg, chunk_t *key)
+static void adjust_keylen(uint16_t alg, chunk_t *key)
 {
        switch (alg)
        {
@@ -393,10 +393,10 @@ METHOD(keymat_v1_t, derive_ike_keys, bool,
 {
        chunk_t g_xy, g_xi, g_xr, dh_me, spi_i, spi_r, nonces, data, skeyid_e;
        chunk_t skeyid;
-       u_int16_t alg;
+       uint16_t alg;
 
-       spi_i = chunk_alloca(sizeof(u_int64_t));
-       spi_r = chunk_alloca(sizeof(u_int64_t));
+       spi_i = chunk_alloca(sizeof(uint64_t));
+       spi_r = chunk_alloca(sizeof(uint64_t));
 
        if (!proposal->get_algorithm(proposal, PSEUDO_RANDOM_FUNCTION, &alg, NULL))
        {       /* no PRF negotiated, use HMAC version of integrity algorithm instead */
@@ -431,8 +431,8 @@ METHOD(keymat_v1_t, derive_ike_keys, bool,
        }
        DBG4(DBG_IKE, "shared Diffie Hellman secret %B", &g_xy);
 
-       *((u_int64_t*)spi_i.ptr) = id->get_initiator_spi(id);
-       *((u_int64_t*)spi_r.ptr) = id->get_responder_spi(id);
+       *((uint64_t*)spi_i.ptr) = id->get_initiator_spi(id);
+       *((uint64_t*)spi_r.ptr) = id->get_responder_spi(id);
        nonces = chunk_cata("cc", nonce_i, nonce_r);
 
        switch (auth)
@@ -585,11 +585,11 @@ METHOD(keymat_v1_t, derive_ike_keys, bool,
 
 METHOD(keymat_v1_t, derive_child_keys, bool,
        private_keymat_v1_t *this, proposal_t *proposal, diffie_hellman_t *dh,
-       u_int32_t spi_i, u_int32_t spi_r, chunk_t nonce_i, chunk_t nonce_r,
+       uint32_t spi_i, uint32_t spi_r, chunk_t nonce_i, chunk_t nonce_r,
        chunk_t *encr_i, chunk_t *integ_i, chunk_t *encr_r, chunk_t *integ_r)
 {
-       u_int16_t enc_alg, int_alg, enc_size = 0, int_size = 0;
-       u_int8_t protocol;
+       uint16_t enc_alg, int_alg, enc_size = 0, int_size = 0;
+       uint8_t protocol;
        prf_plus_t *prf_plus;
        chunk_t seed, secret = chunk_empty;
        bool success = FALSE;
@@ -725,7 +725,7 @@ failure:
 METHOD(keymat_v1_t, create_hasher, bool,
        private_keymat_v1_t *this, proposal_t *proposal)
 {
-       u_int16_t alg;
+       uint16_t alg;
        if (!proposal->get_algorithm(proposal, INTEGRITY_ALGORITHM, &alg, NULL) ||
                (alg = auth_to_hash(alg)) == HASH_UNKNOWN)
        {
@@ -754,7 +754,7 @@ METHOD(keymat_v1_t, get_hash, bool,
        ike_sa_id_t *ike_sa_id, chunk_t sa_i, chunk_t id, chunk_t *hash)
 {
        chunk_t data;
-       u_int64_t spi, spi_other;
+       uint64_t spi, spi_other;
 
        /* HASH_I = prf(SKEYID, g^xi | g^xr | CKY-I | CKY-R | SAi_b | IDii_b )
         * HASH_R = prf(SKEYID, g^xr | g^xi | CKY-R | CKY-I | SAi_b | IDir_b )
@@ -810,7 +810,7 @@ static chunk_t get_message_data(message_t *message, generator_t *generator)
 {
        payload_t *payload, *next;
        enumerator_t *enumerator;
-       u_int32_t *lenpos;
+       uint32_t *lenpos;
 
        if (message->is_encoded(message))
        {       /* inbound, although the message is generated, we cannot access the
@@ -850,7 +850,7 @@ static chunk_t get_message_data(message_t *message, generator_t *generator)
  * Try to find data about a Quick Mode with the given message ID,
  * if none is found, state is generated.
  */
-static qm_data_t *lookup_quick_mode(private_keymat_v1_t *this, u_int32_t mid)
+static qm_data_t *lookup_quick_mode(private_keymat_v1_t *this, uint32_t mid)
 {
        enumerator_t *enumerator;
        qm_data_t *qm, *found = NULL;
@@ -885,7 +885,7 @@ static qm_data_t *lookup_quick_mode(private_keymat_v1_t *this, u_int32_t mid)
 METHOD(keymat_v1_t, get_hash_phase2, bool,
        private_keymat_v1_t *this, message_t *message, chunk_t *hash)
 {
-       u_int32_t mid, mid_n;
+       uint32_t mid, mid_n;
        chunk_t data = chunk_empty;
        bool add_message = TRUE;
        char *name = "Hash";
@@ -993,7 +993,7 @@ static bool generate_iv(private_keymat_v1_t *this, iv_data_t *iv)
        else
        {
                /* initial phase 2 IV = hash(last_phase1_block | mid) */
-               u_int32_t net;;
+               uint32_t net;;
                chunk_t data;
 
                net = htonl(iv->mid);
@@ -1014,7 +1014,7 @@ static bool generate_iv(private_keymat_v1_t *this, iv_data_t *iv)
 /**
  * Try to find an IV for the given message ID, if not found, generate it.
  */
-static iv_data_t *lookup_iv(private_keymat_v1_t *this, u_int32_t mid)
+static iv_data_t *lookup_iv(private_keymat_v1_t *this, uint32_t mid)
 {
        enumerator_t *enumerator;
        iv_data_t *iv, *found = NULL;
@@ -1057,7 +1057,7 @@ static iv_data_t *lookup_iv(private_keymat_v1_t *this, u_int32_t mid)
 }
 
 METHOD(keymat_v1_t, get_iv, bool,
-       private_keymat_v1_t *this, u_int32_t mid, chunk_t *out)
+       private_keymat_v1_t *this, uint32_t mid, chunk_t *out)
 {
        iv_data_t *iv;
 
@@ -1071,7 +1071,7 @@ METHOD(keymat_v1_t, get_iv, bool,
 }
 
 METHOD(keymat_v1_t, update_iv, bool,
-       private_keymat_v1_t *this, u_int32_t mid, chunk_t last_block)
+       private_keymat_v1_t *this, uint32_t mid, chunk_t last_block)
 {
        iv_data_t *iv = lookup_iv(this, mid);
        if (iv)
@@ -1084,7 +1084,7 @@ METHOD(keymat_v1_t, update_iv, bool,
 }
 
 METHOD(keymat_v1_t, confirm_iv, bool,
-       private_keymat_v1_t *this, u_int32_t mid)
+       private_keymat_v1_t *this, uint32_t mid)
 {
        iv_data_t *iv = lookup_iv(this, mid);
        if (iv)
index cc9f3b339f0663a263b67cb34e9f46dfe426ff96..46eeea8b695edd471342971c277e2ba6b24ee9f8 100644 (file)
@@ -72,7 +72,7 @@ struct keymat_v1_t {
         * @param integ_r               allocated responders integrity key
         */
        bool (*derive_child_keys)(keymat_v1_t *this, proposal_t *proposal,
-                                               diffie_hellman_t *dh, u_int32_t spi_i, u_int32_t spi_r,
+                                               diffie_hellman_t *dh, uint32_t spi_i, uint32_t spi_r,
                                                chunk_t nonce_i, chunk_t nonce_r,
                                                chunk_t *encr_i, chunk_t *integ_i,
                                                chunk_t *encr_r, chunk_t *integ_r);
@@ -127,7 +127,7 @@ struct keymat_v1_t {
         * @param iv                    chunk receiving IV, internal data
         * @return                              TRUE if IV allocated successfully
         */
-       bool (*get_iv)(keymat_v1_t *this, u_int32_t mid, chunk_t *iv);
+       bool (*get_iv)(keymat_v1_t *this, uint32_t mid, chunk_t *iv);
 
        /**
         * Updates the IV for the next message with the given message ID.
@@ -141,7 +141,7 @@ struct keymat_v1_t {
         * @param last_block    last block of encrypted message (gets cloned)
         * @return                              TRUE if IV updated successfully
         */
-       bool (*update_iv)(keymat_v1_t *this, u_int32_t mid, chunk_t last_block);
+       bool (*update_iv)(keymat_v1_t *this, uint32_t mid, chunk_t last_block);
 
        /**
         * Confirms the updated IV for the given message ID.
@@ -152,7 +152,7 @@ struct keymat_v1_t {
         * @param mid                   message ID
         * @return                              TRUE if IV confirmed successfully
         */
-       bool (*confirm_iv)(keymat_v1_t *this, u_int32_t mid);
+       bool (*confirm_iv)(keymat_v1_t *this, uint32_t mid);
 };
 
 /**
index 3c601a4fa7d5860a225d8d9e64698b1fc88e6eee..f0c456e58b458fb780df3f9284dde5dd84345958 100644 (file)
@@ -67,7 +67,7 @@ struct exchange_t {
        /**
         * Message ID used for this transaction
         */
-       u_int32_t mid;
+       uint32_t mid;
 
        /**
         * generated packet for retransmission
@@ -104,12 +104,12 @@ struct private_task_manager_t {
                /**
                 * Message ID of the last response
                 */
-               u_int32_t mid;
+               uint32_t mid;
 
                /**
                 * Hash of a previously received message
                 */
-               u_int32_t hash;
+               uint32_t hash;
 
                /**
                 * packet(s) for retransmission
@@ -119,7 +119,7 @@ struct private_task_manager_t {
                /**
                 * Sequence number of the last sent message
                 */
-               u_int32_t seqnr;
+               uint32_t seqnr;
 
                /**
                 * how many times we have retransmitted so far
@@ -135,12 +135,12 @@ struct private_task_manager_t {
                /**
                 * Message ID of the exchange
                 */
-               u_int32_t mid;
+               uint32_t mid;
 
                /**
                 * Hashes of old responses we can ignore
                 */
-               u_int32_t old_hashes[MAX_OLD_HASHES];
+               uint32_t old_hashes[MAX_OLD_HASHES];
 
                /**
                 * Position in old hash array
@@ -150,7 +150,7 @@ struct private_task_manager_t {
                /**
                 * Sequence number of the last sent message
                 */
-               u_int32_t seqnr;
+               uint32_t seqnr;
 
                /**
                 * how many times we have retransmitted so far
@@ -212,12 +212,12 @@ struct private_task_manager_t {
        /**
         * Sequence number for sending DPD requests
         */
-       u_int32_t dpd_send;
+       uint32_t dpd_send;
 
        /**
         * Sequence number for received DPD requests
         */
-       u_int32_t dpd_recv;
+       uint32_t dpd_recv;
 };
 
 /**
@@ -341,11 +341,11 @@ static bool generate_message(private_task_manager_t *this, message_t *message,
 /**
  * Retransmit a packet (or its fragments)
  */
-static status_t retransmit_packet(private_task_manager_t *this, u_int32_t seqnr,
+static status_t retransmit_packet(private_task_manager_t *this, uint32_t seqnr,
                                                        u_int mid, u_int retransmitted, array_t *packets)
 {
        packet_t *packet;
-       u_int32_t t;
+       uint32_t t;
 
        array_get(packets, 0, &packet);
        if (retransmitted > this->retransmit_tries)
@@ -354,7 +354,7 @@ static status_t retransmit_packet(private_task_manager_t *this, u_int32_t seqnr,
                charon->bus->alert(charon->bus, ALERT_RETRANSMIT_SEND_TIMEOUT, packet);
                return DESTROY_ME;
        }
-       t = (u_int32_t)(this->retransmit_timeout * 1000.0 *
+       t = (uint32_t)(this->retransmit_timeout * 1000.0 *
                                        pow(this->retransmit_base, retransmitted));
        if (retransmitted)
        {
@@ -370,7 +370,7 @@ static status_t retransmit_packet(private_task_manager_t *this, u_int32_t seqnr,
 }
 
 METHOD(task_manager_t, retransmit, status_t,
-       private_task_manager_t *this, u_int32_t seqnr)
+       private_task_manager_t *this, uint32_t seqnr)
 {
        status_t status = SUCCESS;
 
@@ -807,7 +807,7 @@ static void send_notify(private_task_manager_t *this, message_t *request,
        message_t *response;
        array_t *packets = NULL;
        host_t *me, *other;
-       u_int32_t mid;
+       uint32_t mid;
 
        if (request->get_exchange_type(request) == INFORMATIONAL_V1)
        {       /* don't respond to INFORMATIONAL requests to avoid a notify war */
@@ -857,7 +857,7 @@ static bool process_dpd(private_task_manager_t *this, message_t *message)
 {
        notify_payload_t *notify;
        notify_type_t type;
-       u_int32_t seq;
+       uint32_t seq;
        chunk_t data;
 
        type = DPD_R_U_THERE;
@@ -910,7 +910,7 @@ static bool process_dpd(private_task_manager_t *this, message_t *message)
  * Check if we already have a quick mode task queued for the exchange with the
  * given message ID
  */
-static bool have_quick_mode_task(private_task_manager_t *this, u_int32_t mid)
+static bool have_quick_mode_task(private_task_manager_t *this, uint32_t mid)
 {
        enumerator_t *enumerator;
        quick_mode_t *qm;
@@ -1305,7 +1305,7 @@ static status_t queue_message(private_task_manager_t *this, message_t *msg)
 METHOD(task_manager_t, process_message, status_t,
        private_task_manager_t *this, message_t *msg)
 {
-       u_int32_t hash, mid, i;
+       uint32_t hash, mid, i;
        host_t *me, *other;
        status_t status;
 
@@ -1660,7 +1660,7 @@ METHOD(task_manager_t, queue_mobike, void,
 }
 
 METHOD(task_manager_t, queue_child, void,
-       private_task_manager_t *this, child_cfg_t *cfg, u_int32_t reqid,
+       private_task_manager_t *this, child_cfg_t *cfg, uint32_t reqid,
        traffic_selector_t *tsi, traffic_selector_t *tsr)
 {
        quick_mode_t *task;
@@ -1739,7 +1739,7 @@ static traffic_selector_t* get_first_ts(child_sa_t *child_sa, bool local)
 }
 
 METHOD(task_manager_t, queue_child_rekey, void,
-       private_task_manager_t *this, protocol_id_t protocol, u_int32_t spi)
+       private_task_manager_t *this, protocol_id_t protocol, uint32_t spi)
 {
        child_sa_t *child_sa;
        child_cfg_t *cfg;
@@ -1774,7 +1774,7 @@ METHOD(task_manager_t, queue_child_rekey, void,
 }
 
 METHOD(task_manager_t, queue_child_delete, void,
-       private_task_manager_t *this, protocol_id_t protocol, u_int32_t spi,
+       private_task_manager_t *this, protocol_id_t protocol, uint32_t spi,
        bool expired)
 {
        queue_task(this, (task_t*)quick_delete_create(this->ike_sa, protocol,
@@ -1785,7 +1785,7 @@ METHOD(task_manager_t, queue_dpd, void,
        private_task_manager_t *this)
 {
        peer_cfg_t *peer_cfg;
-       u_int32_t t, retransmit;
+       uint32_t t, retransmit;
 
        queue_task(this, (task_t*)isakmp_dpd_create(this->ike_sa, DPD_R_U_THERE,
                                                                                                this->dpd_send++));
@@ -1798,7 +1798,7 @@ METHOD(task_manager_t, queue_dpd, void,
                /* use the same timeout as a retransmitting IKE message would have */
                for (retransmit = 0; retransmit <= this->retransmit_tries; retransmit++)
                {
-                       t += (u_int32_t)(this->retransmit_timeout * 1000.0 *
+                       t += (uint32_t)(this->retransmit_timeout * 1000.0 *
                                                        pow(this->retransmit_base, retransmit));
                }
        }
@@ -1871,7 +1871,7 @@ METHOD(task_manager_t, incr_mid, void,
 }
 
 METHOD(task_manager_t, reset, void,
-       private_task_manager_t *this, u_int32_t initiate, u_int32_t respond)
+       private_task_manager_t *this, uint32_t initiate, uint32_t respond)
 {
        enumerator_t *enumerator;
        task_t *task;
index 710bf1cd2da98431f71212ce2dd3317901f19fa8..af3a13924012c5d0c66b1360039b542dc01da4df 100644 (file)
@@ -77,7 +77,7 @@ struct private_aggressive_mode_t {
        /**
         * Negotiated SA lifetime
         */
-       u_int32_t lifetime;
+       uint32_t lifetime;
 
        /**
         * Negotiated authentication method
@@ -164,7 +164,7 @@ static status_t send_notify(private_aggressive_mode_t *this, notify_type_t type)
 {
        notify_payload_t *notify;
        ike_sa_id_t *ike_sa_id;
-       u_int64_t spi_i, spi_r;
+       uint64_t spi_i, spi_r;
        chunk_t spi;
 
        notify = notify_payload_create_from_protocol_and_type(PLV1_NOTIFY,
@@ -219,7 +219,7 @@ METHOD(task_t, build_i, status_t,
                        linked_list_t *proposals;
                        identification_t *id;
                        packet_t *packet;
-                       u_int16_t group;
+                       uint16_t group;
 
                        DBG0(DBG_IKE, "initiating Aggressive Mode IKE_SA %s[%d] to %H",
                                 this->ike_sa->get_name(this->ike_sa),
@@ -377,7 +377,7 @@ METHOD(task_t, process_r, status_t,
                        id_payload_t *id_payload;
                        identification_t *id;
                        linked_list_t *list;
-                       u_int16_t group;
+                       uint16_t group;
 
                        this->ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
                        DBG0(DBG_IKE, "%H is initiating a Aggressive Mode IKE_SA",
@@ -629,7 +629,7 @@ METHOD(task_t, process_i, status_t,
                id_payload_t *id_payload;
                identification_t *id, *cid;
                linked_list_t *list;
-               u_int32_t lifetime;
+               uint32_t lifetime;
 
                sa_payload = (sa_payload_t*)message->get_payload(message,
                                                                                                PLV1_SECURITY_ASSOCIATION);
index a56805afb21734d42d7328919b573a85f7d33f1f..df0293d4fc3e548c5296eae50f9eb96d9685dc9d 100644 (file)
@@ -81,7 +81,7 @@ METHOD(task_t, process_r, status_t,
        payload_t *payload;
        delete_payload_t *delete_payload;
        ike_sa_id_t *id;
-       u_int64_t spi_i, spi_r;
+       uint64_t spi_i, spi_r;
        bool found = FALSE;
 
        /* some peers send DELETE payloads for other IKE_SAs, e.g. those for expired
index 5522e92219b470e90559243e245018161c9168e3..840d352b18a31c6749e338e294c861adf6581d89 100644 (file)
@@ -33,7 +33,7 @@ struct private_isakmp_dpd_t {
        /**
         * Sequence number.
         */
-       u_int32_t seqnr;
+       uint32_t seqnr;
 
        /**
         * DPD notify type
@@ -51,8 +51,8 @@ METHOD(task_t, build, status_t,
 {
        notify_payload_t *notify;
        ike_sa_id_t *ike_sa_id;
-       u_int64_t spi_i, spi_r;
-       u_int32_t seqnr;
+       uint64_t spi_i, spi_r;
+       uint32_t seqnr;
        chunk_t spi;
 
        notify = notify_payload_create_from_protocol_and_type(PLV1_NOTIFY,
@@ -100,7 +100,7 @@ METHOD(task_t, destroy, void,
  * Described in header.
  */
 isakmp_dpd_t *isakmp_dpd_create(ike_sa_t *ike_sa, notify_type_t type,
-                                                               u_int32_t seqnr)
+                                                               uint32_t seqnr)
 {
        private_isakmp_dpd_t *this;
 
index 06a0175eb12277dfd35fefe4ba790389595bf16b..9a69b423cda3ecb81ade062dd8f3f35583996a40 100644 (file)
@@ -47,6 +47,6 @@ struct isakmp_dpd_t {
  * @return                             ISAKMP_DPD task to handle by the task_manager
  */
 isakmp_dpd_t *isakmp_dpd_create(ike_sa_t *ike_sa, notify_type_t type,
-                                                               u_int32_t seqnr);
+                                                               uint32_t seqnr);
 
 #endif /** ISAKMP_DPD_H_ @}*/
index cb1a313718155277e35a3d776589620699a8056e..d17948cd0d7120d4df5f8b41b9abf6652c531548 100644 (file)
@@ -129,8 +129,8 @@ static chunk_t generate_natd_hash(private_isakmp_natd_t *this,
 {
        hasher_t *hasher;
        chunk_t natd_chunk, natd_hash;
-       u_int64_t spi_i, spi_r;
-       u_int16_t port;
+       uint64_t spi_i, spi_r;
+       uint16_t port;
 
        hasher = this->keymat->get_hasher(this->keymat);
        if (!hasher)
index 0162fd84e5f814bdebd0a19a4c0b406ded53ee76..f28b83e8af8c1a86260334b52484ea3ff205348e 100644 (file)
@@ -170,7 +170,7 @@ static struct {
  * for fragmentation of base ISAKMP messages (Cisco adds that and thus sends
  * 0xc0000000)
  */
-static const u_int32_t fragmentation_ike = 0x80000000;
+static const uint32_t fragmentation_ike = 0x80000000;
 
 static bool is_known_vid(chunk_t data, int i)
 {
index 3ea4a2a85e4f8966a0e927384f763411f31c43e3..f0c145f7d1a66c0a5981d542e43c3cd8277d379d 100644 (file)
@@ -77,7 +77,7 @@ struct private_main_mode_t {
        /**
         * Negotiated SA lifetime
         */
-       u_int32_t lifetime;
+       uint32_t lifetime;
 
        /**
         * Negotiated authentication method
@@ -173,7 +173,7 @@ static status_t send_notify(private_main_mode_t *this, notify_type_t type)
 {
        notify_payload_t *notify;
        ike_sa_id_t *ike_sa_id;
-       u_int64_t spi_i, spi_r;
+       uint64_t spi_i, spi_r;
        chunk_t spi;
 
        notify = notify_payload_create_from_protocol_and_type(PLV1_NOTIFY,
@@ -215,7 +215,7 @@ static void add_initial_contact(private_main_mode_t *this, message_t *message,
        host_t *host;
        notify_payload_t *notify;
        ike_sa_id_t *ike_sa_id;
-       u_int64_t spi_i, spi_r;
+       uint64_t spi_i, spi_r;
        chunk_t spi;
 
        idr = this->ph1->get_id(this->ph1, this->peer_cfg, FALSE);
@@ -303,7 +303,7 @@ METHOD(task_t, build_i, status_t,
                }
                case MM_SA:
                {
-                       u_int16_t group;
+                       uint16_t group;
 
                        if (!this->ph1->create_hasher(this->ph1))
                        {
@@ -411,7 +411,7 @@ METHOD(task_t, process_r, status_t,
                }
                case MM_SA:
                {
-                       u_int16_t group;
+                       uint16_t group;
 
                        if (!this->ph1->create_hasher(this->ph1))
                        {
@@ -627,7 +627,7 @@ METHOD(task_t, process_i, status_t,
                        linked_list_t *list;
                        sa_payload_t *sa_payload;
                        auth_method_t method;
-                       u_int32_t lifetime;
+                       uint32_t lifetime;
                        bool private;
 
                        sa_payload = (sa_payload_t*)message->get_payload(message,
index b9f92400957f9a91b6017c26c11f091b8d711a2a..7098d24a23a7c1252fd3eb55586eb1985dc4875b 100644 (file)
@@ -58,7 +58,7 @@ struct private_mode_config_t {
        /**
         * Identifier to include in response
         */
-       u_int16_t identifier;
+       uint16_t identifier;
 };
 
 /**
index ade59a2ddb6f82b388d0856454eba2be91e9fb13..66ef50811b97a63d182dab03ecd6487f0989ce58 100644 (file)
@@ -69,7 +69,7 @@ struct private_quick_delete_t {
        /**
         * Inbound SPI of CHILD_SA to delete
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * Send delete even if SA does not exist
@@ -86,9 +86,9 @@ struct private_quick_delete_t {
  * Delete the specified CHILD_SA, if found
  */
 static bool delete_child(private_quick_delete_t *this, protocol_id_t protocol,
-                                                u_int32_t spi, bool remote_close)
+                                                uint32_t spi, bool remote_close)
 {
-       u_int64_t bytes_in, bytes_out;
+       uint64_t bytes_in, bytes_out;
        child_sa_t *child_sa;
        linked_list_t *my_ts, *other_ts;
        child_cfg_t *child_cfg;
@@ -200,7 +200,7 @@ METHOD(task_t, process_r, status_t,
        payload_t *payload;
        delete_payload_t *delete_payload;
        protocol_id_t protocol;
-       u_int32_t spi;
+       uint32_t spi;
 
        payloads = message->create_payload_enumerator(message);
        while (payloads->enumerate(payloads, &payload))
@@ -260,7 +260,7 @@ METHOD(task_t, destroy, void,
  * Described in header.
  */
 quick_delete_t *quick_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
-                                                                       u_int32_t spi, bool force, bool expired)
+                                                                       uint32_t spi, bool force, bool expired)
 {
        private_quick_delete_t *this;
 
index 4df30c8fef32ec5d4060c1ddf3050d4ec40ce6e0..6227b364b1a1b25893fa306b7a1a687eb3b7adc1 100644 (file)
@@ -50,6 +50,6 @@ struct quick_delete_t {
  * @return                             quick_delete task to handle by the task_manager
  */
 quick_delete_t *quick_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
-                                                                       u_int32_t spi, bool force, bool expired);
+                                                                       uint32_t spi, bool force, bool expired);
 
 #endif /** QUICK_DELETE_H_ @}*/
index b4fe046637af67864dc9744c35378d695294f37c..b2e66814c9272c420038545f3f92fecfc5285741 100644 (file)
@@ -98,22 +98,22 @@ struct private_quick_mode_t {
        /**
         * Initiators ESP SPI
         */
-       u_int32_t spi_i;
+       uint32_t spi_i;
 
        /**
         * Responder ESP SPI
         */
-       u_int32_t spi_r;
+       uint32_t spi_r;
 
        /**
         * Initiators IPComp CPI
         */
-       u_int16_t cpi_i;
+       uint16_t cpi_i;
 
        /**
         * Responders IPComp CPI
         */
-       u_int16_t cpi_r;
+       uint16_t cpi_r;
 
        /**
         * selected CHILD_SA proposal
@@ -143,17 +143,17 @@ struct private_quick_mode_t {
        /**
         * Negotiated lifetime of new SA
         */
-       u_int32_t lifetime;
+       uint32_t lifetime;
 
        /**
         * Negotaited lifebytes of new SA
         */
-       u_int64_t lifebytes;
+       uint64_t lifebytes;
 
        /**
         * Reqid to use, 0 for auto-allocate
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * Explicit inbound mark value to use, if any
@@ -168,7 +168,7 @@ struct private_quick_mode_t {
        /**
         * SPI of SA we rekey
         */
-       u_int32_t rekey;
+       uint32_t rekey;
 
        /**
         * Delete old child after successful rekey
@@ -193,7 +193,7 @@ struct private_quick_mode_t {
        /**
         * Message ID of handled quick mode exchange
         */
-       u_int32_t mid;
+       uint32_t mid;
 
        /** states of quick mode */
        enum {
@@ -207,7 +207,7 @@ struct private_quick_mode_t {
  */
 static void schedule_inactivity_timeout(private_quick_mode_t *this)
 {
-       u_int32_t timeout;
+       uint32_t timeout;
        bool close_ike;
 
        timeout = this->config->get_inactivity(this->config);
@@ -739,8 +739,8 @@ static void get_lifetimes(private_quick_mode_t *this)
  */
 static void apply_lifetimes(private_quick_mode_t *this, sa_payload_t *sa_payload)
 {
-       u_int32_t lifetime;
-       u_int64_t lifebytes;
+       uint32_t lifetime;
+       uint64_t lifebytes;
 
        lifetime = sa_payload->get_lifetime(sa_payload);
        lifebytes = sa_payload->get_lifebytes(sa_payload);
@@ -863,7 +863,7 @@ METHOD(task_t, build_i, status_t,
                        if (group != MODP_NONE)
                        {
                                proposal_t *proposal;
-                               u_int16_t preferred_group;
+                               uint16_t preferred_group;
 
                                proposal = this->ike_sa->get_proposal(this->ike_sa);
                                proposal->get_algorithm(proposal, DIFFIE_HELLMAN_GROUP,
@@ -1050,7 +1050,7 @@ METHOD(task_t, process_r, status_t,
                        sa_payload_t *sa_payload;
                        linked_list_t *tsi, *tsr, *hostsi, *hostsr, *list = NULL;
                        peer_cfg_t *peer_cfg;
-                       u_int16_t group;
+                       uint16_t group;
                        bool private;
 
                        sa_payload = (sa_payload_t*)message->get_payload(message,
@@ -1365,14 +1365,14 @@ METHOD(task_t, get_type, task_type_t,
        return TASK_QUICK_MODE;
 }
 
-METHOD(quick_mode_t, get_mid, u_int32_t,
+METHOD(quick_mode_t, get_mid, uint32_t,
        private_quick_mode_t *this)
 {
        return this->mid;
 }
 
 METHOD(quick_mode_t, use_reqid, void,
-       private_quick_mode_t *this, u_int32_t reqid)
+       private_quick_mode_t *this, uint32_t reqid)
 {
        this->reqid = reqid;
 }
@@ -1385,7 +1385,7 @@ METHOD(quick_mode_t, use_marks, void,
 }
 
 METHOD(quick_mode_t, rekey, void,
-       private_quick_mode_t *this, u_int32_t spi)
+       private_quick_mode_t *this, uint32_t spi)
 {
        this->rekey = spi;
 }
index 062d634655c1ef39d34f4e2170e5846bf7c5d068..fe684568ae84533941e17e454dbdce8210f10eca 100644 (file)
@@ -46,14 +46,14 @@ struct quick_mode_t {
         *
         * @return                              message ID, or 0 (not defined yet or as initiator)
         */
-       u_int32_t (*get_mid)(quick_mode_t *this);
+       uint32_t (*get_mid)(quick_mode_t *this);
 
        /**
         * Use a specific reqid to install this CHILD_SA.
         *
         * @param reqid                 reqid to use
         */
-       void (*use_reqid)(quick_mode_t *this, u_int32_t reqid);
+       void (*use_reqid)(quick_mode_t *this, uint32_t reqid);
 
        /**
         * Use specific mark values, overriding configuration.
@@ -68,7 +68,7 @@ struct quick_mode_t {
         *
         * @param spi                   spi of SA to rekey
         */
-       void (*rekey)(quick_mode_t *this, u_int32_t spi);
+       void (*rekey)(quick_mode_t *this, uint32_t spi);
 };
 
 /**
index ecdfc780dcd1a722ab875bd102ce619163a64a64..968b4386c0e7b4c8fcad337bdfbc6dc6728401f8 100644 (file)
@@ -68,7 +68,7 @@ struct private_xauth_t {
        /**
         * received identifier
         */
-       u_int16_t identifier;
+       uint16_t identifier;
 
        /**
         * status of Xauth exchange
index 91f6187f9bf1a831171441551db401c6692a5f5e..3ab59fada424ae052166ba933caea59d355719bb 100644 (file)
@@ -104,7 +104,7 @@ struct private_eap_authenticator_t {
  * load an EAP method
  */
 static eap_method_t *load_method(private_eap_authenticator_t *this,
-                                                       eap_type_t type, u_int32_t vendor, eap_role_t role)
+                                                       eap_type_t type, uint32_t vendor, eap_role_t role)
 {
        identification_t *server, *peer, *aaa;
        auth_cfg_t *auth;
@@ -143,7 +143,7 @@ static eap_payload_t* server_initiate_eap(private_eap_authenticator_t *this,
        auth_cfg_t *auth;
        eap_type_t type;
        identification_t *id;
-       u_int32_t vendor;
+       uint32_t vendor;
        eap_payload_t *out;
        char *action;
 
@@ -237,7 +237,7 @@ static eap_payload_t* server_process_eap(private_eap_authenticator_t *this,
                                                                                 eap_payload_t *in)
 {
        eap_type_t type, received_type, conf_type;
-       u_int32_t vendor, received_vendor, conf_vendor;
+       uint32_t vendor, received_vendor, conf_vendor;
        eap_payload_t *out;
        auth_cfg_t *auth;
 
@@ -341,7 +341,7 @@ static eap_payload_t* client_process_eap(private_eap_authenticator_t *this,
                                                                                 eap_payload_t *in)
 {
        eap_type_t type, conf_type;
-       u_int32_t vendor, conf_vendor;
+       uint32_t vendor, conf_vendor;
        auth_cfg_t *auth;
        eap_payload_t *out;
        identification_t *id;
@@ -449,7 +449,7 @@ static bool verify_auth(private_eap_authenticator_t *this, message_t *message,
        auth_cfg_t *auth;
        keymat_v2_t *keymat;
        eap_type_t type;
-       u_int32_t vendor;
+       uint32_t vendor;
 
        auth_payload = (auth_payload_t*)message->get_payload(message,
                                                                                                                 PLV2_AUTH);
@@ -595,7 +595,7 @@ METHOD(authenticator_t, process_client, status_t,
                }
                if (this->require_mutual && !this->method->is_mutual(this->method))
                {       /* we require mutual authentication due to EAP-only */
-                       u_int32_t vendor;
+                       uint32_t vendor;
 
                        DBG1(DBG_IKE, "EAP-only authentication requires a mutual and "
                                 "MSK deriving EAP method, but %N is not",
@@ -623,7 +623,7 @@ METHOD(authenticator_t, process_client, status_t,
                        case EAP_SUCCESS:
                        {
                                eap_type_t type;
-                               u_int32_t vendor;
+                               uint32_t vendor;
                                auth_cfg_t *cfg;
 
                                if (this->method->get_msk(this->method, &this->msk) == SUCCESS)
@@ -685,7 +685,7 @@ METHOD(authenticator_t, is_mutual, bool,
 {
        if (this->method)
        {
-               u_int32_t vendor;
+               uint32_t vendor;
 
                if (this->method->get_type(this->method, &vendor) != EAP_IDENTITY ||
                        vendor != 0)
index 04ccd4f4f0142f8ae6a192e2431eb20aca574973..6fd34e0a6b64e89afe0548d7bc210e954288cc4e 100644 (file)
@@ -63,7 +63,7 @@ struct private_pubkey_authenticator_t {
 static bool parse_signature_auth_data(chunk_t *auth_data, key_type_t *key_type,
                                                                          signature_scheme_t *scheme)
 {
-       u_int8_t len;
+       uint8_t len;
        int oid;
 
        if (!auth_data->len)
@@ -91,7 +91,7 @@ static bool build_signature_auth_data(chunk_t *auth_data,
                                                                          signature_scheme_t scheme)
 {
        chunk_t data;
-       u_int8_t len;
+       uint8_t len;
        int oid;
 
        oid = signature_scheme_to_oid(scheme);
index 161c4fdaf4a392e7a1e36f9837c13ddd79b2f696..280796d8c3fed070bd43117bf1c7410f80bcf024 100644 (file)
@@ -92,10 +92,10 @@ typedef struct endpoint_pair_t endpoint_pair_t;
  */
 struct endpoint_pair_t {
        /** pair id */
-       u_int32_t id;
+       uint32_t id;
 
        /** priority */
-       u_int64_t priority;
+       uint64_t priority;
 
        /** local endpoint */
        host_t *local;
@@ -107,7 +107,7 @@ struct endpoint_pair_t {
        check_state_t state;
 
        /** number of retransmissions */
-       u_int32_t retransmitted;
+       uint32_t retransmitted;
 
        /** the generated packet */
        packet_t *packet;
@@ -132,8 +132,8 @@ static endpoint_pair_t *endpoint_pair_create(endpoint_notify_t *initiator,
 {
        endpoint_pair_t *this;
 
-       u_int32_t pi = initiator->get_priority(initiator);
-       u_int32_t pr = responder->get_priority(responder);
+       uint32_t pi = initiator->get_priority(initiator);
+       uint32_t pr = responder->get_priority(responder);
 
        INIT(this,
                .priority = pow(2, 32) * min(pi, pr) + 2 * max(pi, pr)
@@ -313,7 +313,7 @@ typedef struct check_t check_t;
  */
 struct check_t {
        /** message id */
-       u_int32_t mid;
+       uint32_t mid;
 
        /** source of the connectivity check */
        host_t *src;
@@ -375,7 +375,7 @@ struct callback_data_t {
        chunk_t connect_id;
 
        /** message (pair) id */
-       u_int32_t mid;
+       uint32_t mid;
 };
 
 /**
@@ -406,7 +406,7 @@ static callback_data_t *callback_data_create(private_connect_manager_t *connect_
  * Creates a new retransmission data object
  */
 static callback_data_t *retransmit_data_create(private_connect_manager_t *connect_manager,
-                                                                                          chunk_t connect_id, u_int32_t mid)
+                                                                                          chunk_t connect_id, uint32_t mid)
 {
        callback_data_t *this = callback_data_create(connect_manager, connect_id);
        this->mid = mid;
@@ -576,7 +576,7 @@ static status_t get_pair_by_hosts(linked_list_t *pairs, host_t *local,
                                                         (void**)pair, local, remote);
 }
 
-static bool match_pair_by_id(endpoint_pair_t *current, u_int32_t *id)
+static bool match_pair_by_id(endpoint_pair_t *current, uint32_t *id)
 {
        return current->id == *id;
 }
@@ -584,7 +584,7 @@ static bool match_pair_by_id(endpoint_pair_t *current, u_int32_t *id)
 /**
  * Searches for a pair with a specific id
  */
-static status_t get_pair_by_id(check_list_t *checklist, u_int32_t id,
+static status_t get_pair_by_id(check_list_t *checklist, uint32_t id,
                                                           endpoint_pair_t **pair)
 {
        return checklist->pairs->find_first(checklist->pairs,
@@ -669,7 +669,7 @@ static void prune_pairs(linked_list_t *pairs)
 {
        enumerator_t *enumerator, *search;
        endpoint_pair_t *current, *other;
-       u_int32_t id = 0;
+       uint32_t id = 0;
 
        enumerator = pairs->create_enumerator(pairs);
        search = pairs->create_enumerator(pairs);
@@ -826,7 +826,7 @@ static status_t process_payloads(message_t *message, check_t *check)
 static chunk_t build_signature(private_connect_manager_t *this,
                check_list_t *checklist, check_t *check, bool outbound)
 {
-       u_int32_t mid;
+       uint32_t mid;
        chunk_t mid_chunk, key_chunk, sig_chunk;
        chunk_t sig_hash;
 
@@ -851,7 +851,7 @@ static chunk_t build_signature(private_connect_manager_t *this,
 }
 
 static void queue_retransmission(private_connect_manager_t *this, check_list_t *checklist, endpoint_pair_t *pair);
-static void schedule_checks(private_connect_manager_t *this, check_list_t *checklist, u_int32_t time);
+static void schedule_checks(private_connect_manager_t *this, check_list_t *checklist, uint32_t time);
 static void finish_checks(private_connect_manager_t *this, check_list_t *checklist);
 
 /**
@@ -1019,11 +1019,11 @@ static void queue_retransmission(private_connect_manager_t *this, check_list_t *
        job = (job_t*)callback_job_create((callback_job_cb_t)retransmit, data,
                                                (callback_job_cleanup_t)callback_data_destroy, NULL);
 
-       u_int32_t retransmission = pair->retransmitted + 1;
-       u_int32_t rto = ME_INTERVAL;
+       uint32_t retransmission = pair->retransmitted + 1;
+       uint32_t rto = ME_INTERVAL;
        if (retransmission > ME_BOOST)
        {
-               rto = (u_int32_t)(ME_INTERVAL * pow(ME_RETRANS_BASE, retransmission - ME_BOOST));
+               rto = (uint32_t)(ME_INTERVAL * pow(ME_RETRANS_BASE, retransmission - ME_BOOST));
        }
        DBG2(DBG_IKE, "scheduling retransmission %d of pair '%d' in %dms",
                 retransmission, pair->id, rto);
@@ -1165,7 +1165,7 @@ static job_requeue_t sender(callback_data_t *data)
  * Schedules checks for a checklist (time in ms)
  */
 static void schedule_checks(private_connect_manager_t *this,
-                                                       check_list_t *checklist, u_int32_t time)
+                                                       check_list_t *checklist, uint32_t time)
 {
        callback_data_t *data = callback_data_create(this, checklist->connect_id);
        checklist->sender = (job_t*)callback_job_create((callback_job_cb_t)sender,
index 55cb5dd9c4ed72d8b25a225188332963871dafbb..e37399841c2b399c58d37953f8c886008ac1d846 100644 (file)
@@ -99,8 +99,8 @@ METHOD(keymat_t, create_nonce_gen, nonce_gen_t*,
 /**
  * Derive IKE keys for a combined AEAD algorithm
  */
-static bool derive_ike_aead(private_keymat_v2_t *this, u_int16_t alg,
-                                                       u_int16_t key_size, prf_plus_t *prf_plus)
+static bool derive_ike_aead(private_keymat_v2_t *this, uint16_t alg,
+                                                       uint16_t key_size, prf_plus_t *prf_plus)
 {
        aead_t *aead_i, *aead_r;
        chunk_t key = chunk_empty;
@@ -189,8 +189,8 @@ failure:
 /**
  * Derive IKE keys for traditional encryption and MAC algorithms
  */
-static bool derive_ike_traditional(private_keymat_v2_t *this, u_int16_t enc_alg,
-                                       u_int16_t enc_size, u_int16_t int_alg, prf_plus_t *prf_plus)
+static bool derive_ike_traditional(private_keymat_v2_t *this, uint16_t enc_alg,
+                                       uint16_t enc_size, uint16_t int_alg, prf_plus_t *prf_plus)
 {
        crypter_t *crypter_i = NULL, *crypter_r = NULL;
        signer_t *signer_i, *signer_r;
@@ -302,11 +302,11 @@ METHOD(keymat_v2_t, derive_ike_keys, bool,
        chunk_t skeyseed, key, secret, full_nonce, fixed_nonce, prf_plus_seed;
        chunk_t spi_i, spi_r;
        prf_plus_t *prf_plus = NULL;
-       u_int16_t alg, key_size, int_alg;
+       uint16_t alg, key_size, int_alg;
        prf_t *rekey_prf = NULL;
 
-       spi_i = chunk_alloca(sizeof(u_int64_t));
-       spi_r = chunk_alloca(sizeof(u_int64_t));
+       spi_i = chunk_alloca(sizeof(uint64_t));
+       spi_r = chunk_alloca(sizeof(uint64_t));
 
        if (!dh->get_shared_secret(dh, &secret))
        {
@@ -354,8 +354,8 @@ METHOD(keymat_v2_t, derive_ike_keys, bool,
                        break;
        }
        fixed_nonce = chunk_cat("cc", nonce_i, nonce_r);
-       *((u_int64_t*)spi_i.ptr) = id->get_initiator_spi(id);
-       *((u_int64_t*)spi_r.ptr) = id->get_responder_spi(id);
+       *((uint64_t*)spi_i.ptr) = id->get_initiator_spi(id);
+       *((uint64_t*)spi_r.ptr) = id->get_responder_spi(id);
        prf_plus_seed = chunk_cat("ccc", full_nonce, spi_i, spi_r);
 
        /* KEYMAT = prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr)
@@ -489,7 +489,7 @@ METHOD(keymat_v2_t, derive_child_keys, bool,
        chunk_t nonce_i, chunk_t nonce_r, chunk_t *encr_i, chunk_t *integ_i,
        chunk_t *encr_r, chunk_t *integ_r)
 {
-       u_int16_t enc_alg, int_alg, enc_size = 0, int_size = 0;
+       uint16_t enc_alg, int_alg, enc_size = 0, int_size = 0;
        chunk_t seed, secret = chunk_empty;
        prf_plus_t *prf_plus;
 
index c2f972ab16327f7f7a9c0b3ac208bfcf0b2987fb..a7989c50757c39fa309323d086a167aabfacb2f7 100644 (file)
@@ -58,7 +58,7 @@ struct exchange_t {
        /**
         * Message ID used for this transaction
         */
-       u_int32_t mid;
+       uint32_t mid;
 
        /**
         * generated packet for retransmission
@@ -90,7 +90,7 @@ struct private_task_manager_t {
                /**
                 * Message ID of the exchange
                 */
-               u_int32_t mid;
+               uint32_t mid;
 
                /**
                 * packet(s) for retransmission
@@ -111,7 +111,7 @@ struct private_task_manager_t {
                /**
                 * Message ID of the exchange
                 */
-               u_int32_t mid;
+               uint32_t mid;
 
                /**
                 * how many times we have retransmitted so far
@@ -303,12 +303,12 @@ static bool generate_message(private_task_manager_t *this, message_t *message,
 }
 
 METHOD(task_manager_t, retransmit, status_t,
-       private_task_manager_t *this, u_int32_t message_id)
+       private_task_manager_t *this, uint32_t message_id)
 {
        if (message_id == this->initiating.mid &&
                array_count(this->initiating.packets))
        {
-               u_int32_t timeout;
+               uint32_t timeout;
                job_t *job;
                enumerator_t *enumerator;
                packet_t *packet;
@@ -336,7 +336,7 @@ METHOD(task_manager_t, retransmit, status_t,
                {
                        if (this->initiating.retransmitted <= this->retransmit_tries)
                        {
-                               timeout = (u_int32_t)(this->retransmit_timeout * 1000.0 *
+                               timeout = (uint32_t)(this->retransmit_timeout * 1000.0 *
                                        pow(this->retransmit_base, this->initiating.retransmitted));
                        }
                        else
@@ -799,7 +799,7 @@ static status_t build_response(private_task_manager_t *this, message_t *request)
        host_t *me, *other;
        bool delete = FALSE, hook = FALSE;
        ike_sa_id_t *id = NULL;
-       u_int64_t responder_spi = 0;
+       uint64_t responder_spi = 0;
        bool result;
 
        me = request->get_destination(request);
@@ -1252,7 +1252,7 @@ static void send_notify_response(private_task_manager_t *this,
 static status_t parse_message(private_task_manager_t *this, message_t *msg)
 {
        status_t status;
-       u_int8_t type = 0;
+       uint8_t type = 0;
 
        status = msg->parse_body(msg, this->ike_sa->get_keymat(this->ike_sa));
 
@@ -1345,7 +1345,7 @@ METHOD(task_manager_t, process_message, status_t,
 {
        host_t *me, *other;
        status_t status;
-       u_int32_t mid;
+       uint32_t mid;
        bool schedule_delete_job = FALSE;
 
        charon->bus->message(charon->bus, msg, TRUE, FALSE);
@@ -1726,7 +1726,7 @@ METHOD(task_manager_t, queue_mobike, void,
 }
 
 METHOD(task_manager_t, queue_child, void,
-       private_task_manager_t *this, child_cfg_t *cfg, u_int32_t reqid,
+       private_task_manager_t *this, child_cfg_t *cfg, uint32_t reqid,
        traffic_selector_t *tsi, traffic_selector_t *tsr)
 {
        child_create_t *task;
@@ -1740,13 +1740,13 @@ METHOD(task_manager_t, queue_child, void,
 }
 
 METHOD(task_manager_t, queue_child_rekey, void,
-       private_task_manager_t *this, protocol_id_t protocol, u_int32_t spi)
+       private_task_manager_t *this, protocol_id_t protocol, uint32_t spi)
 {
        queue_task(this, (task_t*)child_rekey_create(this->ike_sa, protocol, spi));
 }
 
 METHOD(task_manager_t, queue_child_delete, void,
-       private_task_manager_t *this, protocol_id_t protocol, u_int32_t spi,
+       private_task_manager_t *this, protocol_id_t protocol, uint32_t spi,
        bool expired)
 {
        queue_task(this, (task_t*)child_delete_create(this->ike_sa,
@@ -1827,7 +1827,7 @@ METHOD(task_manager_t, busy, bool,
 }
 
 METHOD(task_manager_t, reset, void,
-       private_task_manager_t *this, u_int32_t initiate, u_int32_t respond)
+       private_task_manager_t *this, uint32_t initiate, uint32_t respond)
 {
        enumerator_t *enumerator;
        task_t *task;
index 3d4ded944718a9409eca340d9a2c9d417f4b9270..3269938859b0490c8abde1103c8edd48cb3d3138 100644 (file)
@@ -151,27 +151,27 @@ struct private_child_create_t {
        /**
         * Own allocated SPI
         */
-       u_int32_t my_spi;
+       uint32_t my_spi;
 
        /**
         * SPI received in proposal
         */
-       u_int32_t other_spi;
+       uint32_t other_spi;
 
        /**
         * Own allocated Compression Parameter Index (CPI)
         */
-       u_int16_t my_cpi;
+       uint16_t my_cpi;
 
        /**
         * Other Compression Parameter Index (CPI), received via IPCOMP_SUPPORTED
         */
-       u_int16_t other_cpi;
+       uint16_t other_cpi;
 
        /**
         * reqid to use if we are rekeying
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * Explicit inbound mark value
@@ -306,7 +306,7 @@ static bool allocate_spi(private_child_create_t *this)
  */
 static void schedule_inactivity_timeout(private_child_create_t *this)
 {
-       u_int32_t timeout, id;
+       uint32_t timeout, id;
        bool close_ike;
 
        timeout = this->config->get_inactivity(this->config);
@@ -386,7 +386,7 @@ static linked_list_t* get_transport_nat_ts(private_child_create_t *this,
        linked_list_t *out;
        traffic_selector_t *ts;
        host_t *ike, *first = NULL;
-       u_int8_t mask;
+       uint8_t mask;
 
        if (local)
        {
@@ -501,7 +501,7 @@ static status_t select_and_install(private_child_create_t *this,
 
        if (!this->proposal->has_dh_group(this->proposal, this->dh_group))
        {
-               u_int16_t group;
+               uint16_t group;
 
                if (this->proposal->get_algorithm(this->proposal, DIFFIE_HELLMAN_GROUP,
                                                                                  &group, NULL))
@@ -798,7 +798,7 @@ static bool build_payloads(private_child_create_t *this, message_t *message)
  * Adds an IPCOMP_SUPPORTED notify to the message, allocating a CPI
  */
 static void add_ipcomp_notify(private_child_create_t *this,
-                                                                 message_t *message, u_int8_t ipcomp)
+                                                                 message_t *message, uint8_t ipcomp)
 {
        this->my_cpi = this->child_sa->alloc_cpi(this->child_sa);
        if (this->my_cpi)
@@ -838,11 +838,11 @@ static void handle_notify(private_child_create_t *this, notify_payload_t *notify
                case IPCOMP_SUPPORTED:
                {
                        ipcomp_transform_t ipcomp;
-                       u_int16_t cpi;
+                       uint16_t cpi;
                        chunk_t data;
 
                        data = notify->get_notification_data(notify);
-                       cpi = *(u_int16_t*)data.ptr;
+                       cpi = *(uint16_t*)data.ptr;
                        ipcomp = (ipcomp_transform_t)(*(data.ptr + 2));
                        switch (ipcomp)
                        {
@@ -1310,7 +1310,7 @@ METHOD(task_t, build_r, status_t,
                        return SUCCESS;
                case INVALID_ARG:
                {
-                       u_int16_t group = htons(this->dh_group);
+                       uint16_t group = htons(this->dh_group);
                        message->add_notify(message, FALSE, INVALID_KE_PAYLOAD,
                                                                chunk_from_thing(group));
                        handle_child_sa_failure(this, message);
@@ -1444,7 +1444,7 @@ METHOD(task_t, process_i, status_t,
                                case INVALID_KE_PAYLOAD:
                                {
                                        chunk_t data;
-                                       u_int16_t group = MODP_NONE;
+                                       uint16_t group = MODP_NONE;
 
                                        data = notify->get_notification_data(notify);
                                        if (data.len == sizeof(group))
@@ -1529,7 +1529,7 @@ METHOD(task_t, process_i, status_t,
 }
 
 METHOD(child_create_t, use_reqid, void,
-       private_child_create_t *this, u_int32_t reqid)
+       private_child_create_t *this, uint32_t reqid)
 {
        this->reqid = reqid;
 }
index 46d9403eec3cb9a583421cbce6a077bb2baa7d43..f48d7b0a902288c9fbba91dca9e4081de9e0710e 100644 (file)
@@ -49,7 +49,7 @@ struct child_create_t {
         *
         * @param reqid         reqid to use
         */
-       void (*use_reqid) (child_create_t *this, u_int32_t reqid);
+       void (*use_reqid) (child_create_t *this, uint32_t reqid);
 
        /**
         * Use specific mark values to override configuration.
index 877ae053162fdf10e667b965525a20bc373d5515..053a5c51dfa1757985a3733064521779295b2c29 100644 (file)
@@ -50,7 +50,7 @@ struct private_child_delete_t {
        /**
         * Inbound SPI of CHILD_SA to delete
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * whether to enforce delete action policy
@@ -86,7 +86,7 @@ static void build_payloads(private_child_delete_t *this, message_t *message)
        while (enumerator->enumerate(enumerator, (void**)&child_sa))
        {
                protocol_id_t protocol = child_sa->get_protocol(child_sa);
-               u_int32_t spi = child_sa->get_spi(child_sa, TRUE);
+               uint32_t spi = child_sa->get_spi(child_sa, TRUE);
 
                switch (protocol)
                {
@@ -126,7 +126,7 @@ static void process_payloads(private_child_delete_t *this, message_t *message)
        enumerator_t *payloads, *spis;
        payload_t *payload;
        delete_payload_t *delete_payload;
-       u_int32_t spi;
+       uint32_t spi;
        protocol_id_t protocol;
        child_sa_t *child_sa;
 
@@ -199,7 +199,7 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
        child_sa_t *child_sa;
        child_cfg_t *child_cfg;
        protocol_id_t protocol;
-       u_int32_t spi, reqid;
+       uint32_t spi, reqid;
        action_t action;
        status_t status = SUCCESS;
 
@@ -254,7 +254,7 @@ static void log_children(private_child_delete_t *this)
        linked_list_t *my_ts, *other_ts;
        enumerator_t *enumerator;
        child_sa_t *child_sa;
-       u_int64_t bytes_in, bytes_out;
+       uint64_t bytes_in, bytes_out;
 
        enumerator = this->child_sas->create_enumerator(this->child_sas);
        while (enumerator->enumerate(enumerator, (void**)&child_sa))
@@ -391,7 +391,7 @@ METHOD(task_t, destroy, void,
  * Described in header.
  */
 child_delete_t *child_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
-                                                                       u_int32_t spi, bool expired)
+                                                                       uint32_t spi, bool expired)
 {
        private_child_delete_t *this;
 
index 1ada0699e2c845fdaebbe58dc0a08dfb2d219ee1..1e9b2d2f7df91fde694110683803d438c8b2e40f 100644 (file)
@@ -56,6 +56,6 @@ struct child_delete_t {
  * @return                             child_delete task to handle by the task_manager
  */
 child_delete_t *child_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
-                                                                       u_int32_t spi, bool expired);
+                                                                       uint32_t spi, bool expired);
 
 #endif /** CHILD_DELETE_H_ @}*/
index 6f0c2b2c7c8c5609b49ab9fe10e46a0be237501f..17b812e91a227d34b6f82f437df8b449a686aaf1 100644 (file)
@@ -54,7 +54,7 @@ struct private_child_rekey_t {
        /**
         * Inbound SPI of CHILD_SA to rekey
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * the CHILD_CREATE task which is reused to simplify rekeying
@@ -91,7 +91,7 @@ struct private_child_rekey_t {
  */
 static void schedule_delayed_rekey(private_child_rekey_t *this)
 {
-       u_int32_t retry;
+       uint32_t retry;
        job_t *job;
 
        retry = RETRY_INTERVAL - (random() % RETRY_JITTER);
@@ -130,7 +130,7 @@ static void find_child(private_child_rekey_t *this, message_t *message)
 {
        notify_payload_t *notify;
        protocol_id_t protocol;
-       u_int32_t spi;
+       uint32_t spi;
 
        notify = message->get_notify(message, REKEY_SA);
        if (notify)
@@ -150,7 +150,7 @@ METHOD(task_t, build_i, status_t,
        private_child_rekey_t *this, message_t *message)
 {
        notify_payload_t *notify;
-       u_int32_t reqid;
+       uint32_t reqid;
        child_cfg_t *config;
 
        this->child_sa = this->ike_sa->get_child_sa(this->ike_sa, this->protocol,
@@ -217,7 +217,7 @@ METHOD(task_t, build_r, status_t,
        private_child_rekey_t *this, message_t *message)
 {
        child_cfg_t *config;
-       u_int32_t reqid;
+       uint32_t reqid;
 
        if (this->child_sa == NULL ||
                this->child_sa->get_state(this->child_sa) == CHILD_DELETING)
@@ -324,7 +324,7 @@ METHOD(task_t, process_i, status_t,
        private_child_rekey_t *this, message_t *message)
 {
        protocol_id_t protocol;
-       u_int32_t spi;
+       uint32_t spi;
        child_sa_t *to_delete;
 
        if (message->get_notify(message, NO_ADDITIONAL_SAS))
@@ -485,7 +485,7 @@ METHOD(task_t, destroy, void,
  * Described in header.
  */
 child_rekey_t *child_rekey_create(ike_sa_t *ike_sa, protocol_id_t protocol,
-                                                                 u_int32_t spi)
+                                                                 uint32_t spi)
 {
        private_child_rekey_t *this;
 
index 23384653defc7a1d1b0393ac8bcdaa379f8f24b9..cc041b953b5148ba94fee959c52d675c410b103a 100644 (file)
@@ -59,6 +59,6 @@ struct child_rekey_t {
  * @return                             child_rekey task to handle by the task_manager
  */
 child_rekey_t *child_rekey_create(ike_sa_t *ike_sa, protocol_id_t protocol,
-                                                                 u_int32_t spi);
+                                                                 uint32_t spi);
 
 #endif /** CHILD_REKEY_H_ @}*/
index 79a436fbfc260506c3cf45089cd962c3fb4cc67e..e554ca3065f6110ce04f7da3313ba4723e80841d 100644 (file)
@@ -186,7 +186,7 @@ static status_t collect_other_init_data(private_ike_auth_t *this,
  */
 static void get_reserved_id_bytes(private_ike_auth_t *this, id_payload_t *id)
 {
-       u_int8_t *byte;
+       uint8_t *byte;
        int i;
 
        for (i = 0; i < countof(this->reserved); i++)
index a7d162e682eafd999d554a9a9de4736b6262e185..47b0a3ed1968d745a4a6d597aa2859157d72cb81 100644 (file)
@@ -45,14 +45,14 @@ struct private_ike_auth_lifetime_t {
 static void add_auth_lifetime(private_ike_auth_lifetime_t *this, message_t *message)
 {
        chunk_t chunk;
-       u_int32_t lifetime;
+       uint32_t lifetime;
 
        lifetime = this->ike_sa->get_statistic(this->ike_sa, STAT_REAUTH);
        if (lifetime)
        {
                lifetime -= time_monotonic(NULL);
                chunk = chunk_from_thing(lifetime);
-               *(u_int32_t*)chunk.ptr = htonl(lifetime);
+               *(uint32_t*)chunk.ptr = htonl(lifetime);
                message->add_notify(message, FALSE, AUTH_LIFETIME, chunk);
        }
 }
@@ -64,13 +64,13 @@ static void process_payloads(private_ike_auth_lifetime_t *this, message_t *messa
 {
        notify_payload_t *notify;
        chunk_t data;
-       u_int32_t lifetime;
+       uint32_t lifetime;
 
        notify = message->get_notify(message, AUTH_LIFETIME);
        if (notify)
        {
                data = notify->get_notification_data(notify);
-               lifetime = ntohl(*(u_int32_t*)data.ptr);
+               lifetime = ntohl(*(uint32_t*)data.ptr);
                this->ike_sa->set_auth_lifetime(this->ike_sa, lifetime);
        }
 }
index 78579be95f10e22ca138109d67202bd448018df5..b96969ebe3376958ce7dc2892a88d5fcff0ca467 100644 (file)
@@ -221,7 +221,7 @@ static void handle_supported_hash_algorithms(private_ike_init_t *this,
                                                                                         notify_payload_t *notify)
 {
        bio_reader_t *reader;
-       u_int16_t algo;
+       uint16_t algo;
        bool added = FALSE;
 
        reader = bio_reader_create(notify->get_notification_data(notify));
@@ -633,7 +633,7 @@ METHOD(task_t, build_r, status_t,
        if (this->dh == NULL ||
                !this->proposal->has_dh_group(this->proposal, this->dh_group))
        {
-               u_int16_t group;
+               uint16_t group;
 
                if (this->proposal->get_algorithm(this->proposal, DIFFIE_HELLMAN_GROUP,
                                                                                  &group, NULL))
@@ -765,7 +765,7 @@ METHOD(task_t, process_i, status_t,
 
                                        bad_group = this->dh_group;
                                        data = notify->get_notification_data(notify);
-                                       this->dh_group = ntohs(*((u_int16_t*)data.ptr));
+                                       this->dh_group = ntohs(*((uint16_t*)data.ptr));
                                        DBG1(DBG_IKE, "peer didn't accept DH group %N, "
                                                 "it requested %N", diffie_hellman_group_names,
                                                 bad_group, diffie_hellman_group_names, this->dh_group);
index 10d412ffdb415a74e59416541475f00848b5bc52..f077ccfb5a6e0539d6416c855300b36e1ca30ccd 100644 (file)
@@ -128,7 +128,7 @@ static void gather_and_add_endpoints(private_ike_me_t *this, message_t *message)
 {
        enumerator_t *enumerator;
        host_t *addr, *host;
-       u_int16_t port;
+       uint16_t port;
 
        /* get the port that is used to communicate with the ms */
        host = this->ike_sa->get_my_host(this->ike_sa);
index 3f7bb175f8c3f5caeae5273ab23ec445bc12a74b..dc0f24fb8816927aa1afea0d4a092a9db825d8f7 100644 (file)
@@ -299,7 +299,7 @@ static void update_children(private_ike_mobike_t *this)
 /**
  * Apply the port of the old host, if its ip equals the new, use port otherwise.
  */
-static void apply_port(host_t *host, host_t *old, u_int16_t port, bool local)
+static void apply_port(host_t *host, host_t *old, uint16_t port, bool local)
 {
        if (host->ip_equals(host, old))
        {
index 4bf5264ddc4ac43ba39fa985e0f135f1f517d23f..f3f32d7af6dcfa788f02a3f9bef13ae3f5e2adcc 100644 (file)
@@ -99,8 +99,8 @@ static chunk_t generate_natd_hash(private_ike_natd_t *this,
 {
        chunk_t natd_chunk, spi_i_chunk, spi_r_chunk, addr_chunk, port_chunk;
        chunk_t natd_hash;
-       u_int64_t spi_i, spi_r;
-       u_int16_t port;
+       uint64_t spi_i, spi_r;
+       uint16_t port;
 
        /* prepare all required chunks */
        spi_i = ike_sa_id->get_initiator_spi(ike_sa_id);
@@ -142,7 +142,7 @@ static notify_payload_t *build_natd_payload(private_ike_natd_t *this,
        config = this->ike_sa->get_ike_cfg(this->ike_sa);
        if (force_encap(config) && type == NAT_DETECTION_SOURCE_IP)
        {
-               u_int32_t addr;
+               uint32_t addr;
 
                /* chunk_hash() is randomly keyed so this produces a random IPv4 address
                 * that changes with every restart but otherwise stays the same */
index eaba04e3a31bc2d570ff74ca9b098646290c6d95..a85df114c380a31419731631a7303214b3247bd7 100644 (file)
@@ -271,7 +271,7 @@ METHOD(task_t, process_i, status_t,
                                this->collision->get_type(this->collision) == TASK_IKE_REAUTH)))
                        {
                                job_t *job;
-                               u_int32_t retry = RETRY_INTERVAL - (random() % RETRY_JITTER);
+                               uint32_t retry = RETRY_INTERVAL - (random() % RETRY_JITTER);
                                job = (job_t*)rekey_ike_sa_job_create(
                                                                                this->ike_sa->get_id(this->ike_sa), FALSE);
                                DBG1(DBG_IKE, "IKE_SA rekeying failed, "
index ff92ac29f8558e97b8259ffb87ce0932c7a16aee..45b7e79df727c237dac2b86d1697475890326ac4 100644 (file)
@@ -248,7 +248,7 @@ identification_t *redirect_data_parse(chunk_t data, chunk_t *nonce)
        bio_reader_t *reader;
        id_type_t id_type;
        chunk_t gateway;
-       u_int8_t type;
+       uint8_t type;
 
        reader = bio_reader_create(data);
        if (!reader->read_uint8(reader, &type) ||
index e7a6bf463a7ffa7133f1ed44cf4f98bb28beef92..b109c82b8e1d20e1ad0eae82ce9216fa3803c64e 100644 (file)
@@ -160,7 +160,7 @@ struct task_manager_t {
         * @param tsi                   initiator traffic selector, if packet-triggered
         * @param tsr                   responder traffic selector, if packet-triggered
         */
-       void (*queue_child)(task_manager_t *this, child_cfg_t *cfg, u_int32_t reqid,
+       void (*queue_child)(task_manager_t *this, child_cfg_t *cfg, uint32_t reqid,
                                                traffic_selector_t *tsi, traffic_selector_t *tsr);
 
        /**
@@ -170,7 +170,7 @@ struct task_manager_t {
         * @param spi                   CHILD_SA SPI to rekey
         */
        void (*queue_child_rekey)(task_manager_t *this, protocol_id_t protocol,
-                                                         u_int32_t spi);
+                                                         uint32_t spi);
 
        /**
         * Queue CHILD_SA delete tasks.
@@ -180,7 +180,7 @@ struct task_manager_t {
         * @param expired               TRUE if SA already expired
         */
        void (*queue_child_delete)(task_manager_t *this, protocol_id_t protocol,
-                                                          u_int32_t spi, bool expired);
+                                                          uint32_t spi, bool expired);
 
        /**
         * Queue liveness checking tasks.
@@ -199,7 +199,7 @@ struct task_manager_t {
         *                                              - INVALID_STATE if retransmission not required
         *                                              - SUCCESS if retransmission sent
         */
-       status_t (*retransmit) (task_manager_t *this, u_int32_t message_id);
+       status_t (*retransmit) (task_manager_t *this, uint32_t message_id);
 
        /**
         * Migrate all queued tasks from other to this.
@@ -242,7 +242,7 @@ struct task_manager_t {
         * @param initiate              message ID / DPD seq to initiate exchanges (send)
         * @param respond               message ID / DPD seq to respond to exchanges (expect)
         */
-       void (*reset) (task_manager_t *this, u_int32_t initiate, u_int32_t respond);
+       void (*reset) (task_manager_t *this, uint32_t initiate, uint32_t respond);
 
        /**
         * Check if we are currently waiting for a reply.
index 85e2207751a5072e5fe41fb3a0dce107b5e33b77..7eb99caae1329d6c1e70c84bce0d4f72b18d4dba 100644 (file)
@@ -115,7 +115,7 @@ typedef struct {
        /** pending IKE_SA connecting upon acquire */
        ike_sa_t *ike_sa;
        /** reqid of pending trap policy */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** destination address (wildcard case) */
        host_t *dst;
 } acquire_t;
@@ -143,7 +143,7 @@ static void destroy_acquire(acquire_t *this)
 /**
  * match an acquire entry by reqid
  */
-static bool acquire_by_reqid(acquire_t *this, u_int32_t *reqid)
+static bool acquire_by_reqid(acquire_t *this, uint32_t *reqid)
 {
        return this->reqid == *reqid;
 }
@@ -156,9 +156,9 @@ static bool acquire_by_dst(acquire_t *this, host_t *dst)
        return this->dst && this->dst->ip_equals(this->dst, dst);
 }
 
-METHOD(trap_manager_t, install, u_int32_t,
+METHOD(trap_manager_t, install, uint32_t,
        private_trap_manager_t *this, peer_cfg_t *peer, child_cfg_t *child,
-       u_int32_t reqid)
+       uint32_t reqid)
 {
        entry_t *entry, *found = NULL;
        ike_cfg_t *ike_cfg;
@@ -307,7 +307,7 @@ METHOD(trap_manager_t, install, u_int32_t,
 }
 
 METHOD(trap_manager_t, uninstall, bool,
-       private_trap_manager_t *this, u_int32_t reqid)
+       private_trap_manager_t *this, uint32_t reqid)
 {
        enumerator_t *enumerator;
        entry_t *entry, *found = NULL;
@@ -366,12 +366,12 @@ METHOD(trap_manager_t, create_enumerator, enumerator_t*,
                                                                        (void*)this->lock->unlock);
 }
 
-METHOD(trap_manager_t, find_reqid, u_int32_t,
+METHOD(trap_manager_t, find_reqid, uint32_t,
        private_trap_manager_t *this, child_cfg_t *child)
 {
        enumerator_t *enumerator;
        entry_t *entry;
-       u_int32_t reqid = 0;
+       uint32_t reqid = 0;
 
        this->lock->read_lock(this->lock);
        enumerator = this->traps->create_enumerator(this->traps);
@@ -392,7 +392,7 @@ METHOD(trap_manager_t, find_reqid, u_int32_t,
 }
 
 METHOD(trap_manager_t, acquire, void,
-       private_trap_manager_t *this, u_int32_t reqid,
+       private_trap_manager_t *this, uint32_t reqid,
        traffic_selector_t *src, traffic_selector_t *dst)
 {
        enumerator_t *enumerator;
@@ -430,7 +430,7 @@ METHOD(trap_manager_t, acquire, void,
        if (wildcard)
        {       /* for wildcard acquires we check that we don't have a pending acquire
                 * with the same peer */
-               u_int8_t mask;
+               uint8_t mask;
 
                dst->to_subnet(dst, &host, &mask);
                if (this->acquires->find_first(this->acquires, (void*)acquire_by_dst,
@@ -483,8 +483,8 @@ METHOD(trap_manager_t, acquire, void,
                if (ike_sa)
                {
                        ike_cfg_t *ike_cfg;
-                       u_int16_t port;
-                       u_int8_t mask;
+                       uint16_t port;
+                       uint8_t mask;
 
                        ike_sa->set_peer_cfg(ike_sa, peer);
                        ike_cfg = ike_sa->get_ike_cfg(ike_sa);
index 0491107fd8bc44e419d02fe23f43ab83d30eba20..083ea3dbfb211d24d6d3128918ad62e5fccd937e 100644 (file)
@@ -40,8 +40,8 @@ struct trap_manager_t {
         * @param reqid         optional reqid to use
         * @return                      reqid of installed CHILD_SA, 0 if failed
         */
-       u_int32_t (*install)(trap_manager_t *this, peer_cfg_t *peer,
-                                                child_cfg_t *child, u_int32_t reqid);
+       uint32_t (*install)(trap_manager_t *this, peer_cfg_t *peer,
+                                                child_cfg_t *child, uint32_t reqid);
 
        /**
         * Uninstall a trap policy.
@@ -49,7 +49,7 @@ struct trap_manager_t {
         * @param id            reqid of CHILD_SA to uninstall, returned by install()
         * @return                      TRUE if uninstalled successfully
         */
-       bool (*uninstall)(trap_manager_t *this, u_int32_t reqid);
+       bool (*uninstall)(trap_manager_t *this, uint32_t reqid);
 
        /**
         * Create an enumerator over all installed traps.
@@ -64,7 +64,7 @@ struct trap_manager_t {
         * @param child         CHILD_SA config to get the reqid for
         * @return                      reqid of trap, 0 if not found
         */
-       u_int32_t (*find_reqid)(trap_manager_t *this, child_cfg_t *child);
+       uint32_t (*find_reqid)(trap_manager_t *this, child_cfg_t *child);
 
        /**
         * Acquire an SA triggered by an installed trap.
@@ -73,7 +73,7 @@ struct trap_manager_t {
         * @param src           source of the triggering packet
         * @param dst           destination of the triggering packet
         */
-       void (*acquire)(trap_manager_t *this, u_int32_t reqid,
+       void (*acquire)(trap_manager_t *this, uint32_t reqid,
                                        traffic_selector_t *src, traffic_selector_t *dst);
 
        /**
index e871cf6c2b2d56279aeb00d20490b46c28dd876d..f4a74abb4a4bb26db58f1026253e5a6995555453 100644 (file)
@@ -40,7 +40,7 @@ METHOD(aead_t, get_iv_gen, iv_gen_t*,
 }
 
 METHOD(iv_gen_t, get_iv, bool,
-       iv_gen_t *this, u_int64_t seq, size_t size, u_int8_t *buffer)
+       iv_gen_t *this, uint64_t seq, size_t size, uint8_t *buffer)
 {
        if (size != 8)
        {
@@ -51,7 +51,7 @@ METHOD(iv_gen_t, get_iv, bool,
 }
 
 METHOD(iv_gen_t, allocate_iv, bool,
-       iv_gen_t *this, u_int64_t seq, size_t size, chunk_t *chunk)
+       iv_gen_t *this, uint64_t seq, size_t size, chunk_t *chunk)
 {
        if (size != 8)
        {
@@ -66,10 +66,10 @@ METHOD(iv_gen_t, allocate_iv, bool,
  */
 START_TEST(test_chacha20poly1305)
 {
-       u_int64_t spii, spir;
+       uint64_t spii, spir;
        ike_sa_id_t *id;
        message_t *m;
-       u_int32_t window = htonl(10);
+       uint32_t window = htonl(10);
        chunk_t chunk, exp;
        keymat_t keymat = {
                .get_version = _get_version,
index 3f570d9f854d4a671a85a20ae814cbde271f6d68..5668b94fd1c549d1d709d7bc41bdf23f11451587 100644 (file)
@@ -118,11 +118,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_generic_attr_bool_t *this, u_int32_t *offset)
+       private_generic_attr_bool_t *this, uint32_t *offset)
 {
        enum_name_t *pa_attr_names;
        bio_reader_t *reader;
-       u_int32_t status;
+       uint32_t status;
   
        *offset = 0;
 
index 98a539987fb53e8c25089ab4d49963c91e2b89e6..2227e20414faaf079d18533f055e356841d9a3ac 100644 (file)
@@ -93,7 +93,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_generic_attr_chunk_t *this, u_int32_t *offset)
+       private_generic_attr_chunk_t *this, uint32_t *offset)
 {
        enum_name_t *pa_attr_names;
        *offset = 0;
index e63c0126a28c724f5d722d6afdd7694e019e1a5d..4983ef91fb09daf7e6a415626c1102b9a9e88bd8 100644 (file)
@@ -88,7 +88,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_generic_attr_string_t *this, u_int32_t *offset)
+       private_generic_attr_string_t *this, uint32_t *offset)
 {
        enum_name_t *pa_attr_names;
        u_char *pos;
index 38b777fce45e2fe9db0c97404256f4c7352baf6f..cfac6ed17e310a0432e45aaf936b7fae6ef77d74 100644 (file)
@@ -47,7 +47,7 @@ ENUM(ietf_attr_names, IETF_ATTR_TESTING, IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED,
 /**
  * See header
  */
-pa_tnc_attr_t* ietf_attr_create_from_data(u_int32_t type, size_t length,
+pa_tnc_attr_t* ietf_attr_create_from_data(uint32_t type, size_t length,
                                                                                  chunk_t value)
 {
        switch (type)
index 169ed78e8fae2a314e7445d3daeed7b75e2e53b1..7154674afd2f2e4b6ffcf6a95e843d5275e4a13a 100644 (file)
@@ -59,7 +59,7 @@ extern enum_name_t *ietf_attr_names;
  * @param length                       attribute length
  * @param value                                attribute value or segment
  */
-pa_tnc_attr_t* ietf_attr_create_from_data(u_int32_t type, size_t length,
+pa_tnc_attr_t* ietf_attr_create_from_data(uint32_t type, size_t length,
                                                                                  chunk_t value);
 
 #endif /** IETF_ATTR_H_ @}*/
index 1cffdcaae0c40798da5e16b8359716436a004332..894212508b6edd9a7c93eb13e5db9ee616da366d 100644 (file)
@@ -67,7 +67,7 @@ struct private_ietf_attr_assess_result_t {
        /**
         * Assessment Result
         */
-       u_int32_t result;
+       uint32_t result;
 
        /**
         * Reference count
@@ -117,7 +117,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_assess_result_t *this, u_int32_t *offset)
+       private_ietf_attr_assess_result_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
@@ -162,7 +162,7 @@ METHOD(pa_tnc_attr_t, destroy, void,
        }
 }
 
-METHOD(ietf_attr_assess_result_t, get_result, u_int32_t,
+METHOD(ietf_attr_assess_result_t, get_result, uint32_t,
        private_ietf_attr_assess_result_t *this)
 {
        return this->result;
@@ -171,7 +171,7 @@ METHOD(ietf_attr_assess_result_t, get_result, u_int32_t,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *ietf_attr_assess_result_create(u_int32_t result)
+pa_tnc_attr_t *ietf_attr_assess_result_create(uint32_t result)
 {
        private_ietf_attr_assess_result_t *this;
 
index b1a5166dc69fbb8cad65e7bd8476b7226395451f..fe7c1aaf3aa02ebe65c098a7159573ce995d3382 100644 (file)
@@ -43,7 +43,7 @@ struct ietf_attr_assess_result_t {
         *
         * @return                              Assessment Result
         */
-       u_int32_t (*get_result)(ietf_attr_assess_result_t *this);
+       uint32_t (*get_result)(ietf_attr_assess_result_t *this);
 
 };
 
@@ -51,7 +51,7 @@ struct ietf_attr_assess_result_t {
  * Creates an ietf_attr_assess_result_t object
  *
  */
-pa_tnc_attr_t* ietf_attr_assess_result_create(u_int32_t result);
+pa_tnc_attr_t* ietf_attr_assess_result_create(uint32_t result);
 
 /**
  * Creates an ietf_attr_assess_result_t object from received data
index 08658e2f740bb1e9a16adbb997c6feb7d5222bdc..2a0b7f06274866de8a948acb60ebeb9d0a967f15 100644 (file)
@@ -136,7 +136,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(ietf_attr_attr_request_t, add, void,
-       private_ietf_attr_attr_request_t *this, pen_t vendor_id, u_int32_t type)
+       private_ietf_attr_attr_request_t *this, pen_t vendor_id, uint32_t type)
 {
        enum_name_t *pa_attr_names;
        pen_type_t *entry;
@@ -160,12 +160,12 @@ METHOD(ietf_attr_attr_request_t, add, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_attr_request_t *this, u_int32_t *offset)
+       private_ietf_attr_attr_request_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        pen_t vendor_id;
-       u_int32_t type;
-       u_int8_t reserved;
+       uint32_t type;
+       uint8_t reserved;
        int count;
 
        *offset = 0;
@@ -228,7 +228,7 @@ METHOD(ietf_attr_attr_request_t, create_enumerator, enumerator_t*,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *ietf_attr_attr_request_create(pen_t vendor_id, u_int32_t type)
+pa_tnc_attr_t *ietf_attr_attr_request_create(pen_t vendor_id, uint32_t type)
 {
        private_ietf_attr_attr_request_t *this;
 
index 47b038605fab1e66974ed849ee418375e1b0de8b..4c4ede04ad3a23b91b7229e5007f49d585d6709f 100644 (file)
@@ -44,7 +44,7 @@ struct ietf_attr_attr_request_t {
         * @param vendor_id             Attribute Vendor ID
         * @param type                  Attribute Type
         */
-       void (*add)(ietf_attr_attr_request_t *this, pen_t vendor_id, u_int32_t type);
+       void (*add)(ietf_attr_attr_request_t *this, pen_t vendor_id, uint32_t type);
 
        /**
         * Creates an enumerator over all attribute types contained
@@ -59,7 +59,7 @@ struct ietf_attr_attr_request_t {
  * Creates an ietf_attr_attr_request_t object
  *
  */
-pa_tnc_attr_t* ietf_attr_attr_request_create(pen_t vendor_id, u_int32_t type);
+pa_tnc_attr_t* ietf_attr_attr_request_create(pen_t vendor_id, uint32_t type);
 
 /**
  * @param length                       Total length of attribute value
index 876a740c0339d9211770442ff9002b568ee9dda7..93eca3b3c5d37eaaea41960a2f7ef5e278e41bc3 100644 (file)
@@ -117,10 +117,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_fwd_enabled_t *this, u_int32_t *offset)
+       private_ietf_attr_fwd_enabled_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t fwd_status;
+       uint32_t fwd_status;
 
        *offset = 0;
 
index 39eea555a6e6e0fdf3b706dc02b4c0c51d2fe388..7a870ac40e86ec87df00d1bec3b95c0220591d9f 100644 (file)
@@ -169,13 +169,13 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_installed_packages_t *this, u_int32_t *offset)
+       private_ietf_attr_installed_packages_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        package_entry_t *entry;
        status_t status = NEED_MORE;
        chunk_t name, version;
-       u_int16_t reserved;
+       uint16_t reserved;
        u_char *pos;
 
        if (this->offset == 0)
index c8fd6c1cadbae978049edd948d1239e8f82f253f..7a3e78fd0ca511b59c6bb638374f063b878a2cdd 100644 (file)
@@ -73,27 +73,27 @@ struct private_ietf_attr_numeric_version_t {
        /**
         * Major Version Number
         */
-       u_int32_t major_version;
+       uint32_t major_version;
 
        /**
         * Minor Version Number
         */
-       u_int32_t minor_version;
+       uint32_t minor_version;
 
        /**
         * IBuild Number
         */
-       u_int32_t build;
+       uint32_t build;
 
        /**
         * Service Pack Major Number
         */
-       u_int16_t service_pack_major;
+       uint16_t service_pack_major;
 
        /**
         * Service Pack Minor Number
         */
-       u_int16_t service_pack_minor;
+       uint16_t service_pack_minor;
 
        /**
         * Reference count
@@ -148,7 +148,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_numeric_version_t *this, u_int32_t *offset)
+       private_ietf_attr_numeric_version_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
@@ -198,7 +198,7 @@ METHOD(pa_tnc_attr_t, destroy, void,
 }
 
 METHOD(ietf_attr_numeric_version_t, get_version, void,
-       private_ietf_attr_numeric_version_t *this, u_int32_t *major, u_int32_t *minor)
+       private_ietf_attr_numeric_version_t *this, uint32_t *major, uint32_t *minor)
 {
        if (major)
        {
@@ -210,14 +210,14 @@ METHOD(ietf_attr_numeric_version_t, get_version, void,
        }
 }
 
-METHOD(ietf_attr_numeric_version_t, get_build, u_int32_t,
+METHOD(ietf_attr_numeric_version_t, get_build, uint32_t,
        private_ietf_attr_numeric_version_t *this)
 {
        return this->build;
 }
 
 METHOD(ietf_attr_numeric_version_t, get_service_pack, void,
-       private_ietf_attr_numeric_version_t *this, u_int16_t *major, u_int16_t *minor)
+       private_ietf_attr_numeric_version_t *this, uint16_t *major, uint16_t *minor)
 {
        if (major)
        {
@@ -232,10 +232,10 @@ METHOD(ietf_attr_numeric_version_t, get_service_pack, void,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *ietf_attr_numeric_version_create(u_int32_t major, u_int32_t minor,
-                                                                                               u_int32_t build,
-                                                                                               u_int16_t service_pack_major,
-                                                                                               u_int16_t service_pack_minor)
+pa_tnc_attr_t *ietf_attr_numeric_version_create(uint32_t major, uint32_t minor,
+                                                                                               uint32_t build,
+                                                                                               uint16_t service_pack_major,
+                                                                                               uint16_t service_pack_minor)
 {
        private_ietf_attr_numeric_version_t *this;
 
index 8808d48ed172f071baab6f80dbe7d93a9ad9c1cb..afb3823e48a1577c123e81e79cb26822d9e95cc5 100644 (file)
@@ -45,7 +45,7 @@ struct ietf_attr_numeric_version_t {
         * @param minor                 Minor Version Number
         */
        void (*get_version)(ietf_attr_numeric_version_t *this,
-                                               u_int32_t *major, u_int32_t *minor);
+                                               uint32_t *major, uint32_t *minor);
 
        /**
         * Gets the Build Number
@@ -53,7 +53,7 @@ struct ietf_attr_numeric_version_t {
         * @param major                 Major Version Number
         * @param minor                 Minor Version Number
         */
-       u_int32_t (*get_build)(ietf_attr_numeric_version_t *this);
+       uint32_t (*get_build)(ietf_attr_numeric_version_t *this);
 
        /**
         * Gets the Major and Minor Numbers of the Service Pack
@@ -62,17 +62,17 @@ struct ietf_attr_numeric_version_t {
         * @param minor                 Servcie Pack Minor Number
         */
        void (*get_service_pack)(ietf_attr_numeric_version_t *this,
-                                                        u_int16_t *major, u_int16_t *minor);
+                                                        uint16_t *major, uint16_t *minor);
 };
 
 /**
  * Creates an ietf_attr_numeric_version_t object
  *
  */
-pa_tnc_attr_t* ietf_attr_numeric_version_create(u_int32_t major, u_int32_t minor,
-                                                                                               u_int32_t build,
-                                                                                               u_int16_t service_pack_major,
-                                                                                               u_int16_t service_pack_minor);
+pa_tnc_attr_t* ietf_attr_numeric_version_create(uint32_t major, uint32_t minor,
+                                                                                               uint32_t build,
+                                                                                               uint16_t service_pack_major,
+                                                                                               uint16_t service_pack_minor);
 
 /**
  * Creates an ietf_attr_numeric_version_t object from received data
index d061a52f96b6e06217d523e085d8191316eeb775..f04c89b96d088271ca2df11ee5ccb6ce4c4eb114 100644 (file)
@@ -93,12 +93,12 @@ struct private_ietf_attr_op_status_t {
        /**
         * Status
         */
-       u_int8_t status;
+       uint8_t status;
 
        /**
         * Result
         */
-       u_int8_t result;
+       uint8_t result;
 
        /**
         * Last Use
@@ -164,11 +164,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_op_status_t *this, u_int32_t *offset)
+       private_ietf_attr_op_status_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        chunk_t last_use;
-       u_int16_t reserved;
+       uint16_t reserved;
        struct tm t;
 
        *offset = 0;
@@ -245,13 +245,13 @@ METHOD(pa_tnc_attr_t, destroy, void,
        }
 }
 
-METHOD(ietf_attr_op_status_t, get_status, u_int8_t,
+METHOD(ietf_attr_op_status_t, get_status, uint8_t,
        private_ietf_attr_op_status_t *this)
 {
        return this->status;
 }
 
-METHOD(ietf_attr_op_status_t, get_result, u_int8_t,
+METHOD(ietf_attr_op_status_t, get_result, uint8_t,
        private_ietf_attr_op_status_t *this)
 {
        return this->result;
@@ -266,7 +266,7 @@ METHOD(ietf_attr_op_status_t, get_last_use, time_t,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *ietf_attr_op_status_create(u_int8_t status, u_int8_t result,
+pa_tnc_attr_t *ietf_attr_op_status_create(uint8_t status, uint8_t result,
                                                                                  time_t last_use)
 {
        private_ietf_attr_op_status_t *this;
index ceb13fe75cfbcef01eb1ee81424f98bb21631718..c91735a55e4bb3e1ff29e63c59500f7b4871cad1 100644 (file)
@@ -70,14 +70,14 @@ struct ietf_attr_op_status_t {
         *
         * @return                              Operational Status
         */
-       u_int8_t (*get_status)(ietf_attr_op_status_t *this);
+       uint8_t (*get_status)(ietf_attr_op_status_t *this);
 
        /**
         * Gets the Operational Result
         *
         * @return                              Operational Result
         */
-       u_int8_t (*get_result)(ietf_attr_op_status_t *this);
+       uint8_t (*get_result)(ietf_attr_op_status_t *this);
 
        /**
         * Gets the time of last use
@@ -94,7 +94,7 @@ struct ietf_attr_op_status_t {
  * @param result                       Operational Result
  * @param last_use                     Time of last use
  */
-pa_tnc_attr_t* ietf_attr_op_status_create(u_int8_t status, u_int8_t result,
+pa_tnc_attr_t* ietf_attr_op_status_create(uint8_t status, uint8_t result,
                                                                                  time_t last_use);
 
 /**
index 6f7ff54ccdb2c72901c50d7b6f156b3475d51bd0..05920fdd8a3a97cc37b57d2f2f05df1c2b7742d4 100644 (file)
@@ -30,8 +30,8 @@ typedef struct port_entry_t port_entry_t;
  */
 struct port_entry_t {
        bool      blocked;
-       u_int8_t  protocol;
-       u_int16_t port;
+       uint8_t  protocol;
+       uint16_t port;
 };
 
 /**
@@ -142,11 +142,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_port_filter_t *this, u_int32_t *offset)
+       private_ietf_attr_port_filter_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        port_entry_t *entry;
-       u_int8_t blocked;
+       uint8_t blocked;
 
        *offset = 0;
 
@@ -201,8 +201,8 @@ METHOD(pa_tnc_attr_t, destroy, void,
 }
 
 METHOD(ietf_attr_port_filter_t, add_port, void,
-       private_ietf_attr_port_filter_t *this, bool blocked, u_int8_t protocol,
-       u_int16_t port)
+       private_ietf_attr_port_filter_t *this, bool blocked, uint8_t protocol,
+       uint16_t port)
 {
        port_entry_t *entry;
 
@@ -217,8 +217,8 @@ METHOD(ietf_attr_port_filter_t, add_port, void,
  * Enumerate port filter entries
  */
 static bool port_filter(void *null, port_entry_t **entry,
-                                               bool *blocked, void *i2, u_int8_t *protocol, void *i3,
-                                               u_int16_t *port)
+                                               bool *blocked, void *i2, uint8_t *protocol, void *i3,
+                                               uint16_t *port)
 {
        *blocked = (*entry)->blocked;
        *protocol = (*entry)->protocol;
index e6c5a3f61a938a211e80a0eb4e6d1a449cf0c9de..db35453c4a87e05be8c23fc5967fbead67e80852 100644 (file)
@@ -46,11 +46,11 @@ struct ietf_attr_port_filter_t {
         * @param port                  TCP/UDP port number
         */
        void (*add_port)(ietf_attr_port_filter_t *this, bool blocked,
-                                        u_int8_t protocol, u_int16_t port);
+                                        uint8_t protocol, uint16_t port);
 
        /**
         * Enumerates over all ports
-        * Format:  bool *blocked, u_int8_t *protocol, u_int16_t *port
+        * Format:  bool *blocked, uint8_t *protocol, uint16_t *port
         *
         * @return                              enumerator
         */
index 37c89e9e5c4eeff39f03be2906420a7ff1220b05..ed1a74b4397e18921a231b5f49c4a23b17a78b56 100644 (file)
@@ -74,7 +74,7 @@ struct private_ietf_attr_product_info_t {
        /**
         * Product ID
         */
-       u_int16_t product_id;
+       uint16_t product_id;
 
        /**
         * Product Name
@@ -131,7 +131,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_product_info_t *this, u_int32_t *offset)
+       private_ietf_attr_product_info_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        chunk_t product_name;
@@ -190,7 +190,7 @@ METHOD(pa_tnc_attr_t, destroy, void,
 }
 
 METHOD(ietf_attr_product_info_t, get_info, chunk_t,
-       private_ietf_attr_product_info_t *this, pen_t *vendor_id, u_int16_t *id)
+       private_ietf_attr_product_info_t *this, pen_t *vendor_id, uint16_t *id)
 {
        if (vendor_id)
        {
@@ -206,7 +206,7 @@ METHOD(ietf_attr_product_info_t, get_info, chunk_t,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *ietf_attr_product_info_create(pen_t vendor_id, u_int16_t id,
+pa_tnc_attr_t *ietf_attr_product_info_create(pen_t vendor_id, uint16_t id,
                                                                                         chunk_t name)
 {
        private_ietf_attr_product_info_t *this;
index 5151b58088ed60b53fe70dab0df89b12ebfce0de..53e2409557410608bd512339a44612964d2bae90 100644 (file)
@@ -46,7 +46,7 @@ struct ietf_attr_product_info_t {
         * @return                              Product Name
         */
        chunk_t (*get_info)(ietf_attr_product_info_t *this,
-                                               pen_t *vendor_id, u_int16_t *id);
+                                               pen_t *vendor_id, uint16_t *id);
 
 };
 
@@ -54,7 +54,7 @@ struct ietf_attr_product_info_t {
  * Creates an ietf_attr_product_info_t object
  *
  */
-pa_tnc_attr_t* ietf_attr_product_info_create(pen_t vendor_id, u_int16_t id,
+pa_tnc_attr_t* ietf_attr_product_info_create(pen_t vendor_id, uint16_t id,
                                                                                         chunk_t name);
 
 /**
index 64070374ec1807bd7f893da3009b8b78f9586822..c834b23fd239b4324a2863d9e540486881e56646 100644 (file)
@@ -165,10 +165,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_remediation_instr_t *this, u_int32_t *offset)
+       private_ietf_attr_remediation_instr_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t reserved;
+       uint8_t reserved;
        status_t status = SUCCESS;
        u_char *pos;
 
index c46200b8fb27e5ce2e648224d78daef6c7240714..f78138747e6b8bd5f8c601046ec9925318deb610 100644 (file)
@@ -134,7 +134,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ietf_attr_string_version_t *this, u_int32_t *offset)
+       private_ietf_attr_string_version_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        status_t status = FAILED;
index 0d622f1b88ea85f472ec519614917e9676c2f433..3a7a16bc22578efdcbc4e40d85a0f32f32f29d8b 100644 (file)
@@ -46,7 +46,7 @@ struct private_imc_agent_t {
        /**
         * number of message types registered by IMC
         */
-       u_int32_t type_count;
+       uint32_t type_count;
 
        /**
         * ID of IMC as assigned by TNCC
@@ -320,7 +320,7 @@ static char* get_str_attribute(private_imc_agent_t *this, TNC_ConnectionID id,
 /**
  * Read an UInt32 attribute
  */
-static u_int32_t get_uint_attribute(private_imc_agent_t *this, TNC_ConnectionID id,
+static uint32_t get_uint_attribute(private_imc_agent_t *this, TNC_ConnectionID id,
                                                                        TNC_AttributeID attribute_id)
 {
        TNC_UInt32 len;
@@ -341,7 +341,7 @@ METHOD(imc_agent_t, create_state, TNC_Result,
        TNC_ConnectionID conn_id;
        char *tnccs_p = NULL, *tnccs_v = NULL, *t_p = NULL, *t_v = NULL;
        bool has_long = FALSE, has_excl = FALSE, has_soh = FALSE;
-       u_int32_t max_msg_len;
+       uint32_t max_msg_len;
 
        conn_id = state->get_connection_id(state);
        if (find_connection(this, conn_id))
@@ -550,7 +550,7 @@ METHOD(imc_agent_t, destroy, void,
  * Described in header.
  */
 imc_agent_t *imc_agent_create(const char *name,
-                                                         pen_type_t *supported_types, u_int32_t type_count,
+                                                         pen_type_t *supported_types, uint32_t type_count,
                                                          TNC_IMCID id, TNC_Version *actual_version)
 {
        private_imc_agent_t *this;
index 8bdfb6c32b5eeb20a2cda50e1bd35b255ed79c8d..bac1b48328d4ed975db7458c0299466a0ba3f5d9 100644 (file)
@@ -198,7 +198,7 @@ struct imc_agent_t {
  *
  */
 imc_agent_t *imc_agent_create(const char *name,
-                                                         pen_type_t *supported_types, u_int32_t type_count,
+                                                         pen_type_t *supported_types, uint32_t type_count,
                                                          TNC_IMCID id, TNC_Version *actual_version);
 
 #endif /** IMC_AGENT_H_ @}*/
index 55e152af59abbd9e72d9ec6408acb7bbe12e89fd..3315c209f3285d15c73867c537cee858f09eea73 100644 (file)
@@ -69,7 +69,7 @@ METHOD(imc_os_info_t, get_name, chunk_t,
 }
 
 METHOD(imc_os_info_t, get_numeric_version, void,
-       private_imc_os_info_t *this, u_int32_t *major, u_int32_t *minor)
+       private_imc_os_info_t *this, uint32_t *major, uint32_t *minor)
 {
        u_char *pos;
 
index ef7fb6d435e7f04338b3e9d024a984af289d3252..680e2b7a36b7b5bcbc673b539c67dba6afadef91 100644 (file)
@@ -54,8 +54,8 @@ struct imc_os_info_t {
         * @param major                         OS major version number
         * @param minor                         OS minor version number
         */
-       void (*get_numeric_version)(imc_os_info_t *this, u_int32_t *major,
-                                                                                                u_int32_t *minor);
+       void (*get_numeric_version)(imc_os_info_t *this, uint32_t *major,
+                                                                                                uint32_t *minor);
 
        /**
         * Get the OS version or release
index efcf567f0b33c1ea65a52d4abbd50d7f0638691c..d8aeab996421437d0d935d1b9a746bde0a5636c7 100644 (file)
@@ -72,14 +72,14 @@ struct imc_state_t {
         *
         * @param max_msg_len   maximum size of a PA-TNC message
         */
-       void (*set_max_msg_len)(imc_state_t *this, u_int32_t max_msg_len);
+       void (*set_max_msg_len)(imc_state_t *this, uint32_t max_msg_len);
 
        /**
         * Get the maximum size of a PA-TNC message for this TNCCS connection
         *
         * @return                              maximum size of a PA-TNC message
         */
-       u_int32_t (*get_max_msg_len)(imc_state_t *this);
+       uint32_t (*get_max_msg_len)(imc_state_t *this);
 
        /**
         * Get attribute segmentation contracts associated with TNCCS Connection
index 79551cc79ce7fba39f5ad06dd2bd3ce7195023d9..d0b2db2b45f1e5b0c1e58152460c56d1594b7fef 100644 (file)
@@ -46,7 +46,7 @@ struct imv_database_t {
         */
         imv_session_t* (*add_session)(imv_database_t *this,
                                                                   TNC_ConnectionID conn_id,
-                                                                  u_int32_t ar_id_type, chunk_t ar_id_value);
+                                                                  uint32_t ar_id_type, chunk_t ar_id_value);
 
        /**
         * Remove and delete a session
index 35c882c37dc4ed3097fa8852ab420e7809d8bfb2..1d8db71cbcede3c65157b919862bf3fe60d5ade8 100644 (file)
@@ -35,7 +35,7 @@ ENUM(ita_attr_names, ITA_ATTR_COMMAND, ITA_ATTR_DEVICE_ID,
 /**
  * See header
  */
-pa_tnc_attr_t* ita_attr_create_from_data(u_int32_t type, size_t length,
+pa_tnc_attr_t* ita_attr_create_from_data(uint32_t type, size_t length,
                                                                                 chunk_t value)
 {
        switch (type)
index 7378a1cbe071425a1120571d8ab7213260e43718..726537420addded2ecb609b71cbc215790bae8b2 100644 (file)
@@ -53,7 +53,7 @@ extern enum_name_t *ita_attr_names;
  * @param length                       attribute length
  * @param value                                attribute value or segment
  */
-pa_tnc_attr_t* ita_attr_create_from_data(u_int32_t type, size_t length,
+pa_tnc_attr_t* ita_attr_create_from_data(uint32_t type, size_t length,
                                                                                 chunk_t value);
 
 #endif /** ITA_ATTR_H_ @}*/
index 11086360879a8d2babe07a36a83ec8458167d493..133089759dc6a85732ca49c33856e712849b2d8d 100644 (file)
@@ -81,7 +81,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ita_attr_angel_t *this, u_int32_t *offset)
+       private_ita_attr_angel_t *this, uint32_t *offset)
 {
        return SUCCESS;
 }
index a6b187f13ccb345ea7f52e386a6689c08ed2cf4f..03a53412525f6d4bae2cfb2722d649c0ba8e7f0f 100644 (file)
@@ -101,7 +101,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ita_attr_command_t *this, u_int32_t *offset)
+       private_ita_attr_command_t *this, uint32_t *offset)
 {
        *offset = 0;
 
index 0d21ac6ea52e636bd3aea62e4321048b6b1b020e..8fa23cf99731b6bbc8c54a679426fd2516ed6cb8 100644 (file)
@@ -99,7 +99,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ita_attr_dummy_t *this, u_int32_t *offset)
+       private_ita_attr_dummy_t *this, uint32_t *offset)
 {
        *offset = 0;
 
index 3c047fb8230bb629343269bdfc8b4358735f749c..4c50cffd997f2695cdcbf6ab8280b1a5497fa144 100644 (file)
@@ -140,10 +140,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ita_attr_get_settings_t *this, u_int32_t *offset)
+       private_ita_attr_get_settings_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t count;
+       uint32_t count;
        chunk_t name;
        status_t status = FAILED;
 
index ced347705973434237b1c10728bf52f5d3f7fb58..c7c968a26c87be10f42a4533357b0794dcba15b9 100644 (file)
@@ -169,10 +169,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_ita_attr_settings_t *this, u_int32_t *offset)
+       private_ita_attr_settings_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t count;
+       uint32_t count;
        chunk_t name, value;
        entry_t *entry;
        status_t status = FAILED;
index 8607feede86e28cac7ef030f38917e56c6edf6da..1fec8e3f938d0af2fd63314e39229db1edab3106 100644 (file)
@@ -28,7 +28,7 @@ typedef struct pa_tnc_attr_manager_t pa_tnc_attr_manager_t;
 #include <library.h>
 #include <bio/bio_reader.h>
 
-typedef pa_tnc_attr_t* (*pa_tnc_attr_create_t)(u_int32_t type, size_t length,
+typedef pa_tnc_attr_t* (*pa_tnc_attr_create_t)(uint32_t type, size_t length,
                                                                                           chunk_t value);
 
 /**
index f24aec881b6e411436e9173418ec901599fec6fd..0e1bc153b05e3d8381881a64d0436942fbe8a68e 100644 (file)
@@ -225,9 +225,9 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, imc_msg_t *msg,
                {
                        tcg_pts_attr_req_file_meas_t *attr_cast;
                        char *pathname;
-                       u_int16_t request_id;
+                       uint16_t request_id;
                        bool is_directory;
-                       u_int32_t delimiter;
+                       uint32_t delimiter;
                        pts_file_meas_t *measurements;
                        pen_type_t error_code;
 
@@ -282,7 +282,7 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, imc_msg_t *msg,
                        tcg_pts_attr_req_file_meta_t *attr_cast;
                        char *pathname;
                        bool is_directory;
-                       u_int8_t delimiter;
+                       uint8_t delimiter;
                        pts_file_meta_t *metadata;
                        pen_type_t error_code;
 
@@ -336,8 +336,8 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, imc_msg_t *msg,
                        pts_comp_evidence_t *evid;
                        pts_component_t *comp;
                        pen_type_t error_code;
-                       u_int32_t depth;
-                       u_int8_t flags;
+                       uint32_t depth;
+                       uint8_t flags;
                        status_t status;
                        enumerator_t *e;
 
index 0b594cb1079fd4742d75b8989c9445568e1ec839..b789a210418bca02e4d0c5eaf4a810bb61f2df29 100644 (file)
@@ -64,7 +64,7 @@ struct private_imc_attestation_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
@@ -114,12 +114,12 @@ METHOD(imc_state_t, set_flags, void,
 }
 
 METHOD(imc_state_t, set_max_msg_len, void,
-       private_imc_attestation_state_t *this, u_int32_t max_msg_len)
+       private_imc_attestation_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_attestation_state_t *this)
 {
        return this->max_msg_len;
@@ -175,7 +175,7 @@ METHOD(imc_attestation_state_t, get_pts, pts_t*,
 
 METHOD(imc_attestation_state_t, create_component, pts_component_t*,
        private_imc_attestation_state_t *this, pts_comp_func_name_t *name,
-       u_int32_t depth)
+       uint32_t depth)
 {
        enumerator_t *enumerator;
        pts_component_t *component;
index 854c8825b5b57fce7f36af9a660eaa1a8571373b..aaf27547cf030d5ed7b9003e1e88acc13245c385 100644 (file)
@@ -57,7 +57,7 @@ struct imc_attestation_state_t {
         * @return                                      created functional component instance or NULL
         */
        pts_component_t* (*create_component)(imc_attestation_state_t *this,
-                                                        pts_comp_func_name_t *name, u_int32_t depth);
+                                                        pts_comp_func_name_t *name, uint32_t depth);
 
        /**
         * Add an entry to the Component Evidence cache list
index ce93d7ef78473a6e696122b54ea4354e5e971716..60ccdce810e5b0ca75aa349981f2f5c71631a962 100644 (file)
@@ -59,7 +59,7 @@ struct private_imc_hcd_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
@@ -93,12 +93,12 @@ METHOD(imc_state_t, set_flags, void,
 }
 
 METHOD(imc_state_t, set_max_msg_len, void,
-       private_imc_hcd_state_t *this, u_int32_t max_msg_len)
+       private_imc_hcd_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_hcd_state_t *this)
 {
        return this->max_msg_len;
index af1862ad399583dd7f20347d0937be0304884a66..cabcd0a9e78437435097e36b70961f57f92d8eef 100644 (file)
@@ -162,7 +162,7 @@ static void add_product_info(imc_msg_t *msg)
 static void add_numeric_version(imc_msg_t *msg)
 {
        pa_tnc_attr_t *attr;
-       u_int32_t major, minor;
+       uint32_t major, minor;
 
        os->get_numeric_version(os, &major, &minor);
        DBG1(DBG_IMC, "operating system numeric version is %d.%d",
index 139ab0597d4612126645bc1116d1f356e424787e..a38696a81b3508db27260a4d39209018ca0ed6d3 100644 (file)
@@ -59,7 +59,7 @@ struct private_imc_os_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
@@ -93,12 +93,12 @@ METHOD(imc_state_t, set_flags, void,
 }
 
 METHOD(imc_state_t, set_max_msg_len, void,
-       private_imc_os_state_t *this, u_int32_t max_msg_len)
+       private_imc_os_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_os_state_t *this)
 {
        return this->max_msg_len;
index c67636f8f94b94395def641ab6c7ab2dae6a67d6..bf2479cf5f5250527dfe58cb8cc07d962862565a 100644 (file)
@@ -128,8 +128,8 @@ static bool do_netstat(ietf_attr_port_filter_t *attr)
        while (fgets(buf, sizeof(buf), file))
        {
                u_char *pos;
-               u_int8_t new_protocol, protocol;
-               u_int16_t new_port, port;
+               uint8_t new_protocol, protocol;
+               uint16_t new_port, port;
                int i;
                enumerator_t *enumerator;
                bool allowed, found = FALSE;
index d357859fad2e9aa01ab51c79df8d5fb5b03f5959..c1b7a50e4d7faf10c7f25f48418fc6ccdbbdd42b 100644 (file)
@@ -59,7 +59,7 @@ struct private_imc_scanner_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
@@ -93,12 +93,12 @@ METHOD(imc_state_t, set_flags, void,
 }
 
 METHOD(imc_state_t, set_max_msg_len, void,
-       private_imc_scanner_state_t *this, u_int32_t max_msg_len)
+       private_imc_scanner_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_scanner_state_t *this)
 {
        return this->max_msg_len;
index 65c279b3f3b8bd9d0188a39e6515aa21fd1c6e00..8d5e8e0895d65c8e88d69aee23a7d4ce1aa33e8c 100644 (file)
@@ -59,7 +59,7 @@ struct private_imc_swid_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
@@ -69,7 +69,7 @@ struct private_imc_swid_state_t {
        /**
         * Event ID Epoch
         */
-       u_int32_t eid_epoch;
+       uint32_t eid_epoch;
 };
 
 METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
@@ -98,12 +98,12 @@ METHOD(imc_state_t, set_flags, void,
 }
 
 METHOD(imc_state_t, set_max_msg_len, void,
-       private_imc_swid_state_t *this, u_int32_t max_msg_len)
+       private_imc_swid_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_swid_state_t *this)
 {
        return this->max_msg_len;
@@ -146,7 +146,7 @@ METHOD(imc_state_t, destroy, void,
        free(this);
 }
 
-METHOD(imc_swid_state_t, get_eid_epoch, u_int32_t,
+METHOD(imc_swid_state_t, get_eid_epoch, uint32_t,
        private_imc_swid_state_t *this)
 {
        return this->eid_epoch;
@@ -158,11 +158,11 @@ METHOD(imc_swid_state_t, get_eid_epoch, u_int32_t,
 imc_state_t *imc_swid_state_create(TNC_ConnectionID connection_id)
 {
        private_imc_swid_state_t *this;
-       u_int32_t eid_epoch;
+       uint32_t eid_epoch;
        nonce_gen_t *ng;
 
        ng = lib->crypto->create_nonce_gen(lib->crypto);
-       if (!ng || !ng->get_nonce(ng, 4, (u_int8_t*)&eid_epoch))
+       if (!ng || !ng->get_nonce(ng, 4, (uint8_t*)&eid_epoch))
        {
                DBG1(DBG_TNC, "failed to generate random EID epoch value");
                DESTROY_IF(ng);
index cb3ac458985f4aeab522fb4f8d4367d9301dbf85..c2719d21b647ff7edf922c1a37705fb3ff788877 100644 (file)
@@ -43,7 +43,7 @@ struct imc_swid_state_t {
         *
         * @return                      Event ID Epoch
         */
-       u_int32_t (*get_eid_epoch)(imc_swid_state_t *this);
+       uint32_t (*get_eid_epoch)(imc_swid_state_t *this);
 
 };
 
index d3f6805ad902d2a9fea85eb53c99d3b5b1d31c33..047c825022453b3d6c33c0fcf8d8b36e4095577e 100644 (file)
@@ -61,7 +61,7 @@ struct private_imc_test_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
@@ -124,12 +124,12 @@ METHOD(imc_state_t, set_flags, void,
 }
 
 METHOD(imc_state_t, set_max_msg_len, void,
-       private_imc_test_state_t *this, u_int32_t max_msg_len)
+       private_imc_test_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_test_state_t *this)
 {
        return this->max_msg_len;
index f1a1f923e0555d36d03b7cec48105f227eaea202..034418428efc581183356747ce34b3db3921f2fe 100644 (file)
@@ -853,7 +853,7 @@ METHOD(attest_db_t, list_devices, void,
        time_t timestamp;
        int id, last_id = 0, ar_id = 0, last_ar_id = 0, device_count = 0, trusted;
        int session_id, rec;
-       u_int32_t ar_id_type;
+       uint32_t ar_id_type;
        u_int tstamp;
 
        e = this->db->query(this->db,
index acef11cad894b287e4d8ec7eb1da00e03cd3af4f..8dce4986f621fbeb7bdf9bed1c8012a461d70cff 100644 (file)
@@ -185,13 +185,13 @@ METHOD(imv_agent_if_t, receive_message_long, TNC_Result,
 typedef struct port_range_t port_range_t;
 
 struct port_range_t {
-       u_int16_t start, stop;
+       uint16_t start, stop;
 };
 
 /**
  * Parse a TCP or UDP port list from an argument string
  */
-static linked_list_t* get_port_list(u_int8_t protocol_family,
+static linked_list_t* get_port_list(uint8_t protocol_family,
                                                                        bool closed_port_policy, char *arg_str)
 {
        chunk_t port_list, port_item, port_start;
@@ -336,8 +336,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
        {
                TNC_IMV_Evaluation_Result eval;
                TNC_IMV_Action_Recommendation rec;
-               u_int8_t protocol_family, protocol;
-               u_int16_t port;
+               uint8_t protocol_family, protocol;
+               uint16_t port;
                bool closed_port_policy, blocked, first;
                char result_str[BUF_LEN], *pos, *protocol_str;
                size_t len;
index 546d0a4b26cce58aea71962d4d827b4f155c167d..0577eccd9eeec51430f8eb402e66a522604a00e0 100644 (file)
@@ -29,7 +29,7 @@
  * @param depth                        Sub-component depth
  * @param pts_db               PTS measurement database
  */
-pts_component_t* pts_ita_comp_ima_create(u_int32_t depth,
+pts_component_t* pts_ita_comp_ima_create(uint32_t depth,
                                                                                 pts_database_t *pts_db);
 
 #endif /** PTS_ITA_COMP_IMA_H_ @}*/
index 3d990f6f2571697f7cfaf1ac23d3358b4283369c..324c41f127d1085303f6bb88d99655b752b371a0 100644 (file)
@@ -43,7 +43,7 @@ struct pts_ita_comp_tboot_t {
        /**
         * Sub-component depth
         */
-       u_int32_t depth;
+       uint32_t depth;
 
        /**
         * PTS measurement database
@@ -93,20 +93,20 @@ METHOD(pts_component_t, get_comp_func_name, pts_comp_func_name_t*,
        return this->name;
 }
 
-METHOD(pts_component_t, get_evidence_flags, u_int8_t,
+METHOD(pts_component_t, get_evidence_flags, uint8_t,
        pts_ita_comp_tboot_t *this)
 {
        return PTS_REQ_FUNC_COMP_EVID_PCR;
 }
 
-METHOD(pts_component_t, get_depth, u_int32_t,
+METHOD(pts_component_t, get_depth, uint32_t,
        pts_ita_comp_tboot_t *this)
 {
        return this->depth;
 }
 
 METHOD(pts_component_t, measure, status_t,
-       pts_ita_comp_tboot_t *this, u_int8_t qualifier, pts_t *pts,
+       pts_ita_comp_tboot_t *this, uint8_t qualifier, pts_t *pts,
        pts_comp_evidence_t **evidence)
 
 {
@@ -117,7 +117,7 @@ METHOD(pts_component_t, measure, status_t,
        pts_comp_evidence_t *evid;
        char *meas_hex, *pcr_before_hex, *pcr_after_hex;
        chunk_t measurement, pcr_before, pcr_after;
-       u_int32_t extended_pcr;
+       uint32_t extended_pcr;
 
        switch (this->seq_no++)
        {
@@ -183,11 +183,11 @@ METHOD(pts_component_t, measure, status_t,
 }
 
 METHOD(pts_component_t, verify, status_t,
-       pts_ita_comp_tboot_t *this, u_int8_t qualifier,pts_t *pts,
+       pts_ita_comp_tboot_t *this, uint8_t qualifier,pts_t *pts,
        pts_comp_evidence_t *evidence)
 {
        bool has_pcr_info;
-       u_int32_t extended_pcr, vid, name;
+       uint32_t extended_pcr, vid, name;
        enum_name_t *names;
        pts_meas_algorithms_t algo;
        pts_pcr_transform_t transform;
@@ -264,7 +264,7 @@ METHOD(pts_component_t, verify, status_t,
 }
 
 METHOD(pts_component_t, finalize, bool,
-       pts_ita_comp_tboot_t *this, u_int8_t qualifier, bio_writer_t *result)
+       pts_ita_comp_tboot_t *this, uint8_t qualifier, bio_writer_t *result)
 {
        char result_buf[BUF_LEN];
 
@@ -304,7 +304,7 @@ METHOD(pts_component_t, destroy, void,
           pts_ita_comp_tboot_t *this)
 {
        int count;
-       u_int32_t vid, name;
+       uint32_t vid, name;
        enum_name_t *names;
 
        if (ref_put(&this->ref))
@@ -328,7 +328,7 @@ METHOD(pts_component_t, destroy, void,
 /**
  * See header
  */
-pts_component_t *pts_ita_comp_tboot_create(u_int32_t depth,
+pts_component_t *pts_ita_comp_tboot_create(uint32_t depth,
                                                                                   pts_database_t *pts_db)
 {
        pts_ita_comp_tboot_t *this;
index 1e1a14831e7d0127787f399b4864b5e842fe5ed5..0459500cc8900963f24049a2dab2173ccafc1156 100644 (file)
@@ -29,7 +29,7 @@
  * @param depth                        Sub-component depth
  * @param pts_db               PTS measurement database
  */
-pts_component_t* pts_ita_comp_tboot_create(u_int32_t depth,
+pts_component_t* pts_ita_comp_tboot_create(uint32_t depth,
                                                                                   pts_database_t *pts_db);
 
 #endif /** PTS_ITA_COMP_TBOOT_H_ @}*/
index e9555726ae96cb30df952dd5d55132875ea10ef1..8c22e9440e0d515c25e2b809082ac11c25e9531a 100644 (file)
@@ -42,7 +42,7 @@ struct pts_ita_comp_tgrub_t {
        /**
         * Sub-component depth
         */
-       u_int32_t depth;
+       uint32_t depth;
 
        /**
         * PTS measurement database
@@ -62,27 +62,27 @@ METHOD(pts_component_t, get_comp_func_name, pts_comp_func_name_t*,
        return this->name;
 }
 
-METHOD(pts_component_t, get_evidence_flags, u_int8_t,
+METHOD(pts_component_t, get_evidence_flags, uint8_t,
        pts_ita_comp_tgrub_t *this)
 {
        return PTS_REQ_FUNC_COMP_EVID_PCR;
 }
 
-METHOD(pts_component_t, get_depth, u_int32_t,
+METHOD(pts_component_t, get_depth, uint32_t,
        pts_ita_comp_tgrub_t *this)
 {
        return this->depth;
 }
 
 METHOD(pts_component_t, measure, status_t,
-       pts_ita_comp_tgrub_t *this, u_int8_t qualifier, pts_t *pts,
+       pts_ita_comp_tgrub_t *this, uint8_t qualifier, pts_t *pts,
        pts_comp_evidence_t **evidence)
 {
        size_t pcr_len;
        pts_pcr_transform_t pcr_transform;
        pts_meas_algorithms_t hash_algo;
        pts_comp_evidence_t *evid;
-       u_int32_t extended_pcr;
+       uint32_t extended_pcr;
        time_t measurement_time;
        chunk_t measurement, pcr_before, pcr_after;
 
@@ -116,11 +116,11 @@ METHOD(pts_component_t, measure, status_t,
 }
 
 METHOD(pts_component_t, verify, status_t,
-       pts_ita_comp_tgrub_t *this, u_int8_t qualifier, pts_t *pts,
+       pts_ita_comp_tgrub_t *this, uint8_t qualifier, pts_t *pts,
        pts_comp_evidence_t *evidence)
 {
        bool has_pcr_info;
-       u_int32_t extended_pcr;
+       uint32_t extended_pcr;
        pts_meas_algorithms_t algo;
        pts_pcr_transform_t transform;
        pts_pcr_t *pcrs;
@@ -155,7 +155,7 @@ METHOD(pts_component_t, verify, status_t,
 }
 
 METHOD(pts_component_t, finalize, bool,
-       pts_ita_comp_tgrub_t *this, u_int8_t qualifier, bio_writer_t *result)
+       pts_ita_comp_tgrub_t *this, uint8_t qualifier, bio_writer_t *result)
 {
        return FALSE;
 }
@@ -180,7 +180,7 @@ METHOD(pts_component_t, destroy, void,
 /**
  * See header
  */
-pts_component_t *pts_ita_comp_tgrub_create(u_int32_t depth,
+pts_component_t *pts_ita_comp_tgrub_create(uint32_t depth,
                                                                                   pts_database_t *pts_db)
 {
        pts_ita_comp_tgrub_t *this;
index 59913c82de3f2eeb9684f06dcc2f304a9b4b141e..7c856ebb9382ef062625e91195cabbf877daba09 100644 (file)
@@ -29,7 +29,7 @@
  * @param depth                        Sub-component depth
  * @param pts_db               PTS measurement database
  */
-pts_component_t* pts_ita_comp_tgrub_create(u_int32_t depth,
+pts_component_t* pts_ita_comp_tgrub_create(uint32_t depth,
                                                                                   pts_database_t *pts_db);
 
 #endif /** PTS_ITA_COMP_TGRUB_H_ @}*/
index 08c3d5e9a316525b8215e22de81113453a178c8f..f039deb7a50b025127674c3c60183d217117f4f9 100644 (file)
@@ -37,7 +37,7 @@ struct private_pts_comp_evidence_t {
        /**
         * Sub-Component Depth
         */
-       u_int32_t depth;
+       uint32_t depth;
 
        /**
         * Measurement Time
@@ -62,7 +62,7 @@ struct private_pts_comp_evidence_t {
        /**
         * PCR the measurement was extended into
         */
-       u_int32_t extended_pcr;
+       uint32_t extended_pcr;
 
        /**
         * PCR value before extension
@@ -92,7 +92,7 @@ struct private_pts_comp_evidence_t {
 };
 
 METHOD(pts_comp_evidence_t, get_comp_func_name, pts_comp_func_name_t*,
-       private_pts_comp_evidence_t *this, u_int32_t *depth)
+       private_pts_comp_evidence_t *this, uint32_t *depth)
 {
        if (depth)
        {
@@ -101,14 +101,14 @@ METHOD(pts_comp_evidence_t, get_comp_func_name, pts_comp_func_name_t*,
        return this->name;
 }
 
-METHOD(pts_comp_evidence_t, get_extended_pcr, u_int32_t,
+METHOD(pts_comp_evidence_t, get_extended_pcr, uint32_t,
        private_pts_comp_evidence_t *this)
 {
        return this->extended_pcr;
 }
 
 METHOD(pts_comp_evidence_t, get_measurement, chunk_t,
-       private_pts_comp_evidence_t *this, u_int32_t *extended_pcr,
+       private_pts_comp_evidence_t *this, uint32_t *extended_pcr,
        pts_meas_algorithms_t *algo, pts_pcr_transform_t *transform,
        time_t *measurement_time)
 {
@@ -193,8 +193,8 @@ METHOD(pts_comp_evidence_t, destroy, void,
  * See header
  */
 pts_comp_evidence_t *pts_comp_evidence_create(pts_comp_func_name_t *name,
-                                                                                         u_int32_t depth,
-                                                                                         u_int32_t extended_pcr,
+                                                                                         uint32_t depth,
+                                                                                         uint32_t extended_pcr,
                                                                                          pts_meas_algorithms_t algo,
                                                                                          pts_pcr_transform_t transform,
                                                                                          time_t measurement_time,
index 55776ce8b53165fbd51c391e30c4e9d5e04db979..6178c2abdbe027d47215fc1acd9556ac06058eb4 100644 (file)
@@ -70,14 +70,14 @@ struct pts_comp_evidence_t {
         * @result                                      Component Functional Name
         */
        pts_comp_func_name_t* (*get_comp_func_name)(pts_comp_evidence_t *this,
-                                                                                               u_int32_t *depth);
+                                                                                               uint32_t *depth);
 
        /**
         * Gets the PCR the measurement was extended into
         *
         * @result                                      PCR the measurement was extended into
         */
-       u_int32_t (*get_extended_pcr)(pts_comp_evidence_t *this);
+       uint32_t (*get_extended_pcr)(pts_comp_evidence_t *this);
 
        /**
         * Gets the measurement and the algorithms used
@@ -89,7 +89,7 @@ struct pts_comp_evidence_t {
         * @result                                      Measurement hash value
         */
        chunk_t (*get_measurement)(pts_comp_evidence_t *this,
-                                                          u_int32_t *extended_pcr,
+                                                          uint32_t *extended_pcr,
                                                           pts_meas_algorithms_t *algo,
                                                           pts_pcr_transform_t *transform,
                                                           time_t *measurement_time);
@@ -150,8 +150,8 @@ struct pts_comp_evidence_t {
  * @param measurement                  Measurement hash value
  */
 pts_comp_evidence_t* pts_comp_evidence_create(pts_comp_func_name_t *name,
-                                                                                         u_int32_t depth,
-                                                                                         u_int32_t extended_pcr,
+                                                                                         uint32_t depth,
+                                                                                         uint32_t extended_pcr,
                                                                                          pts_meas_algorithms_t algo,
                                                                                          pts_pcr_transform_t transform,
                                                                                          time_t measurement_time,
index e12522ed1ee24d42a661f72126fbedccae404173..257d205aea4f9c5f6bcefba23419994060b2255c 100644 (file)
@@ -35,40 +35,40 @@ struct private_pts_comp_func_name_t {
        /**
         * PTS Component Functional Name Vendor ID
         */
-       u_int32_t vid;
+       uint32_t vid;
 
        /**
         * PTS Component Functional Name
         */
-       u_int32_t name;
+       uint32_t name;
 
        /**
         * PTS Component Functional Name Qualifier
         */
-       u_int8_t qualifier;
+       uint8_t qualifier;
 
 };
 
-METHOD(pts_comp_func_name_t, get_vendor_id, u_int32_t,
+METHOD(pts_comp_func_name_t, get_vendor_id, uint32_t,
        private_pts_comp_func_name_t *this)
 {
        return this->vid;
 }
 
-METHOD(pts_comp_func_name_t, get_name, u_int32_t,
+METHOD(pts_comp_func_name_t, get_name, uint32_t,
        private_pts_comp_func_name_t *this)
 {
        return this->name;
 }
 
-METHOD(pts_comp_func_name_t, get_qualifier, u_int8_t,
+METHOD(pts_comp_func_name_t, get_qualifier, uint8_t,
        private_pts_comp_func_name_t *this)
 {
        return this->qualifier;
 }
 
 METHOD(pts_comp_func_name_t, set_qualifier, void,
-       private_pts_comp_func_name_t *this, u_int8_t qualifier)
+       private_pts_comp_func_name_t *this, uint8_t qualifier)
 {
        this->qualifier = qualifier;
 }
@@ -136,8 +136,8 @@ METHOD(pts_comp_func_name_t, destroy, void,
 /**
  * See header
  */
-pts_comp_func_name_t* pts_comp_func_name_create(u_int32_t vid, u_int32_t name,
-                                                                                               u_int8_t qualifier)
+pts_comp_func_name_t* pts_comp_func_name_create(uint32_t vid, uint32_t name,
+                                                                                               uint8_t qualifier)
 {
        private_pts_comp_func_name_t *this;
 
index 90ad7083f35a736ca7f283d26c6726f0c3468203..cb069c404929f1814bd8fc028a67f2bd11a1e2b3 100644 (file)
@@ -38,28 +38,28 @@ struct pts_comp_func_name_t {
         *
         * @return                              PTS Component Functional Name Vendor ID
         */
-       u_int32_t (*get_vendor_id)(pts_comp_func_name_t *this);
+       uint32_t (*get_vendor_id)(pts_comp_func_name_t *this);
 
        /**
         * Get the PTS Component Functional Name
         *
         * @return                              PTS Component Functional Name
         */
-       u_int32_t (*get_name)(pts_comp_func_name_t *this);
+       uint32_t (*get_name)(pts_comp_func_name_t *this);
 
        /**
         * Get the PTS Component Functional Name Qualifier
         *
         * @return                              PTS Component Functional Name Qualifier
         */
-       u_int8_t (*get_qualifier)(pts_comp_func_name_t *this);
+       uint8_t (*get_qualifier)(pts_comp_func_name_t *this);
 
        /**
         * Set the PTS Component Functional Name Qualifier
         *
         * @param qualifier             PTS Component Functional Name Qualifier to be set
         */
-       void (*set_qualifier)(pts_comp_func_name_t *this, u_int8_t qualifier);
+       void (*set_qualifier)(pts_comp_func_name_t *this, uint8_t qualifier);
 
        /**
         * Check to PTS Component Functional Names for equality
@@ -97,7 +97,7 @@ struct pts_comp_func_name_t {
  * @param name                         PTS Component Functional Name
  * @param qualifier                    PTS Component Functional Name Qualifier
  */
-pts_comp_func_name_t* pts_comp_func_name_create(u_int32_t vid, u_int32_t name,
-                                                                                               u_int8_t qualifier);
+pts_comp_func_name_t* pts_comp_func_name_create(uint32_t vid, uint32_t name,
+                                                                                               uint8_t qualifier);
 
 #endif /** PTS_FUNC_COMP_NAME_H_ @}*/
index 71b1ad59c1ef28da8c339624261bc5184019e663..1ca4458bf0450308e439c6c3052ec6e44845a297 100644 (file)
@@ -49,14 +49,14 @@ struct pts_component_t {
         *
         * @return                              PTS Component Functional Name
         */
-       u_int8_t (*get_evidence_flags)(pts_component_t *this);
+       uint8_t (*get_evidence_flags)(pts_component_t *this);
 
        /**
         * Get the PTS Sub-component Depth
         *
         * @return                              PTS Sub-component Depth
         */
-       u_int32_t (*get_depth)(pts_component_t *this);
+       uint32_t (*get_depth)(pts_component_t *this);
 
        /**
         * Do evidence measurements on the PTS Functional Component
@@ -67,7 +67,7 @@ struct pts_component_t {
         * @param measurements  additional file measurements (NULL if not present)
         * @return                              status return code
         */
-       status_t (*measure)(pts_component_t *this, u_int8_t qualifier, pts_t *pts,
+       status_t (*measure)(pts_component_t *this, uint8_t qualifier, pts_t *pts,
                                                pts_comp_evidence_t** evidence);
 
        /**
@@ -78,7 +78,7 @@ struct pts_component_t {
         * @param evidence              component evidence measurement to be verified
         * @return                              status return code
         */
-       status_t (*verify)(pts_component_t *this, u_int8_t qualifier, pts_t *pts,
+       status_t (*verify)(pts_component_t *this, uint8_t qualifier, pts_t *pts,
                                           pts_comp_evidence_t *evidence);
 
        /**
@@ -89,7 +89,7 @@ struct pts_component_t {
         * @param result                writer appending concise measurement result
         * @return                              TRUE if finalization successful
         */
-       bool (*finalize)(pts_component_t *this, u_int8_t qualifier,
+       bool (*finalize)(pts_component_t *this, uint8_t qualifier,
                                         bio_writer_t *result);
 
        /**
index 9c1375b79418d15d3e6b1d4e4cc4b28af19a8a00..4f0004fe8607c3128f2b182d5a005d085f321644 100644 (file)
@@ -77,7 +77,7 @@ struct component_entry_t {
        /**
         * Vendor-Specific Component Functional Name
         */
-       u_int32_t name;
+       uint32_t name;
 
        /**
         * Functional Component creation method
@@ -165,7 +165,7 @@ METHOD(pts_component_manager_t, get_qualifier_type_names, enum_name_t*,
 }
 
 METHOD(pts_component_manager_t, add_component, void,
-       private_pts_component_manager_t *this, pen_t vendor_id, u_int32_t name,
+       private_pts_component_manager_t *this, pen_t vendor_id, uint32_t name,
        pts_component_create_t create)
 {
        enumerator_t *enumerator;
@@ -210,13 +210,13 @@ METHOD(pts_component_manager_t, remove_vendor, void,
        enumerator->destroy(enumerator);
 }
 
-METHOD(pts_component_manager_t, get_qualifier, u_int8_t,
+METHOD(pts_component_manager_t, get_qualifier, uint8_t,
        private_pts_component_manager_t *this, pts_comp_func_name_t *name,
        char *flags)
 {
        enumerator_t *enumerator;
        vendor_entry_t *entry;
-       u_int8_t qualifier, size, flag, type = 0;
+       uint8_t qualifier, size, flag, type = 0;
        int i;
 
        enumerator = this->list->create_enumerator(this->list);
@@ -252,7 +252,7 @@ METHOD(pts_component_manager_t, get_qualifier, u_int8_t,
 
 METHOD(pts_component_manager_t, create, pts_component_t*,
        private_pts_component_manager_t *this,
-       pts_comp_func_name_t *name, u_int32_t depth, pts_database_t *pts_db)
+       pts_comp_func_name_t *name, uint32_t depth, pts_database_t *pts_db)
 {
        enumerator_t *enumerator, *e2;
        vendor_entry_t *entry;
index 00f8765cae03b4888799d65ea76c1b78b77b2882..bd1974b9267d038a25cfd904ce6794a0c0b58cb7 100644 (file)
@@ -30,7 +30,7 @@ typedef struct pts_component_manager_t pts_component_manager_t;
 #include <library.h>
 #include <pen/pen.h>
 
-typedef pts_component_t* (*pts_component_create_t)(u_int32_t depth,
+typedef pts_component_t* (*pts_component_create_t)(uint32_t depth,
                                                                                                   pts_database_t *pts_db);
 
 /**
@@ -61,7 +61,7 @@ struct pts_component_manager_t {
         * @param create                                Functional Component creation method
         */
        void (*add_component)(pts_component_manager_t *this, pen_t vendor_id,
-                                                 u_int32_t name, pts_component_create_t create);
+                                                 uint32_t name, pts_component_create_t create);
 
        /**
         * Remove vendor-specific components and associated namespace
@@ -95,7 +95,7 @@ struct pts_component_manager_t {
         * @param flags                                 Qualifier Flags as a string in a char buffer
         * @return                                              Qualifier Type
         */
-       u_int8_t (*get_qualifier)(pts_component_manager_t *this,
+       uint8_t (*get_qualifier)(pts_component_manager_t *this,
                                                          pts_comp_func_name_t *name, char *flags);
 
        /**
@@ -107,7 +107,7 @@ struct pts_component_manager_t {
         * @return                                              Component object if supported, NULL else
         */
        pts_component_t* (*create)(pts_component_manager_t *this,
-                                                          pts_comp_func_name_t *name, u_int32_t depth,
+                                                          pts_comp_func_name_t *name, uint32_t depth,
                                                           pts_database_t *pts_db);
 
        /**
index 1ca72098ed09c50964dbdbb380d931afdfa3b52a..3c5359193315a574d102232032eaa4c5e3964672 100644 (file)
@@ -615,7 +615,7 @@ METHOD(pts_t, get_metadata, pts_file_meta_t*,
 #ifdef TSS_TROUSERS
 
 METHOD(pts_t, read_pcr, bool,
-       private_pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value)
+       private_pts_t *this, uint32_t pcr_num, chunk_t *pcr_value)
 {
        TSS_HCONTEXT hContext;
        TSS_HTPM hTPM;
@@ -663,12 +663,12 @@ err:
 }
 
 METHOD(pts_t, extend_pcr, bool,
-       private_pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output)
+       private_pts_t *this, uint32_t pcr_num, chunk_t input, chunk_t *output)
 {
        TSS_HCONTEXT hContext;
        TSS_HTPM hTPM;
        TSS_RESULT result;
-       u_int32_t pcr_length;
+       uint32_t pcr_length;
        chunk_t pcr_value = chunk_empty;
 
        result = Tspi_Context_Create(&hContext);
@@ -734,7 +734,7 @@ METHOD(pts_t, quote_tpm, bool,
        TSS_RESULT result;
        chunk_t quote_info;
        BYTE* versionInfo;
-       u_int32_t versionInfoSize, pcr;
+       uint32_t versionInfoSize, pcr;
        enumerator_t *enumerator;
        bool success = FALSE;
 
@@ -876,13 +876,13 @@ err1:
 #else /* TSS_TROUSERS */
 
 METHOD(pts_t, read_pcr, bool,
-       private_pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value)
+       private_pts_t *this, uint32_t pcr_num, chunk_t *pcr_value)
 {
        return FALSE;
 }
 
 METHOD(pts_t, extend_pcr, bool,
-       private_pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output)
+       private_pts_t *this, uint32_t pcr_num, chunk_t input, chunk_t *output)
 {
        return FALSE;
 }
@@ -1086,7 +1086,7 @@ static bool has_tpm(private_pts_t *this)
        TSS_HCONTEXT hContext;
        TSS_HTPM hTPM;
        TSS_RESULT result;
-       u_int32_t version_info_len;
+       uint32_t version_info_len;
 
        result = Tspi_Context_Create(&hContext);
        if (result != TSS_SUCCESS)
index d525306dd812b8047f309d9af06e6e43aba304ef..1e07c4be357cf5feaac59750859129a5b6863e90 100644 (file)
@@ -243,7 +243,7 @@ struct pts_t {
         * @param pcr_value                     Chunk to save pcr read output
         * @return                                      NULL in case of TSS error, PCR value otherwise
         */
-       bool (*read_pcr)(pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value);
+       bool (*read_pcr)(pts_t *this, uint32_t pcr_num, chunk_t *pcr_value);
 
        /**
         * Extends given PCR with given value
@@ -254,7 +254,7 @@ struct pts_t {
         * @param output                        Chunk to save PCR value after extension
         * @return                                      FALSE in case of TSS error, TRUE otherwise
         */
-       bool (*extend_pcr)(pts_t *this, u_int32_t pcr_num, chunk_t input,
+       bool (*extend_pcr)(pts_t *this, uint32_t pcr_num, chunk_t input,
                                           chunk_t *output);
 
        /**
index 966d54ba2c76ac675bc4ce4b85f54b21e5dffe7b..6cfb86cb3347fe613171466dd27ae6367a4b5a25 100644 (file)
@@ -39,7 +39,7 @@ struct private_pts_file_meas_t {
        /**
         * ID of PTS File Measurement Request
         */
-       u_int16_t request_id;
+       uint16_t request_id;
 
        /**
         * List of File Measurements
@@ -70,7 +70,7 @@ static void free_entry(entry_t *entry)
        }
 }
 
-METHOD(pts_file_meas_t, get_request_id, u_int16_t,
+METHOD(pts_file_meas_t, get_request_id, uint16_t,
        private_pts_file_meas_t *this)
 {
        return this->request_id;
@@ -266,7 +266,7 @@ METHOD(pts_file_meas_t, destroy, void,
 /**
  * See header
  */
-pts_file_meas_t *pts_file_meas_create(u_int16_t request_id)
+pts_file_meas_t *pts_file_meas_create(uint16_t request_id)
 {
        private_pts_file_meas_t *this;
 
@@ -334,7 +334,7 @@ static bool hash_file(hasher_t *hasher, char *pathname, u_char *hash)
 /**
  * See header
  */
-pts_file_meas_t *pts_file_meas_create_from_path(u_int16_t request_id,
+pts_file_meas_t *pts_file_meas_create_from_path(uint16_t request_id,
                                                        char *pathname, bool is_dir, bool use_rel_name,
                                                        pts_meas_algorithms_t alg)
 {
index 4bf28e280310a0eac71f6d76a250ccbe1c33a8c1..514006925e81d08a4b637d003d29704053286b05 100644 (file)
@@ -38,7 +38,7 @@ struct pts_file_meas_t {
         *
         * @return                              ID of PTS File Measurement Request
         */
-       u_int16_t (*get_request_id)(pts_file_meas_t *this);
+       uint16_t (*get_request_id)(pts_file_meas_t *this);
 
        /**
         * Get the number of measured files
@@ -94,7 +94,7 @@ struct pts_file_meas_t {
  *
  * @param request_id           ID of PTS File Measurement Request
  */
-pts_file_meas_t* pts_file_meas_create(u_int16_t request_id);
+pts_file_meas_t* pts_file_meas_create(uint16_t request_id);
 
 /**
  * Creates a pts_file_meas_t object measuring a file/directory
@@ -105,7 +105,7 @@ pts_file_meas_t* pts_file_meas_create(u_int16_t request_id);
  * @param use_rel_name         TRUE if relative filenames are to be used
  * @param alg                          PTS hash measurement algorithm to be used
  */
-pts_file_meas_t* pts_file_meas_create_from_path(u_int16_t request_id,
+pts_file_meas_t* pts_file_meas_create_from_path(uint16_t request_id,
                                                        char* pathname, bool is_dir, bool use_rel_name,
                                                        pts_meas_algorithms_t alg);
 
index 3f18133069e6801916959d329b18047ef7ba831b..b02b142dbf5666d4ad93b6c0f6f53ed167bc36b4 100644 (file)
@@ -34,12 +34,12 @@ typedef struct pts_file_metadata_t pts_file_metadata_t;
  */
 struct pts_file_metadata_t {
        pts_file_type_t type;
-       u_int64_t       filesize;
-       u_int64_t       created;
-       u_int64_t       modified;
-       u_int64_t       accessed;
-       u_int64_t       owner;
-       u_int64_t       group;
+       uint64_t       filesize;
+       uint64_t       created;
+       uint64_t       modified;
+       uint64_t       accessed;
+       uint64_t       owner;
+       uint64_t       group;
        char           *filename;
 };
 
index 0af93b608a66ce6dcd6b2ebae3456e933a2d88f4..895c273bbf8811d021577c7dcd36a15b7981bb1d 100644 (file)
@@ -40,17 +40,17 @@ struct private_pts_pcr_t {
        /**
         * Number of extended PCR registers
         */
-       u_int32_t pcr_count;
+       uint32_t pcr_count;
 
        /**
         * Highest extended PCR register
         */
-       u_int32_t pcr_max;
+       uint32_t pcr_max;
 
        /**
         * Bitmap of extended PCR registers
         */
-       u_int8_t pcr_select[PTS_PCR_MAX_NUM / 8];
+       uint8_t pcr_select[PTS_PCR_MAX_NUM / 8];
 
        /**
         * Hasher used to extend shadow PCRs
@@ -59,16 +59,16 @@ struct private_pts_pcr_t {
 
 };
 
-METHOD(pts_pcr_t, get_count, u_int32_t,
+METHOD(pts_pcr_t, get_count, uint32_t,
        private_pts_pcr_t *this)
 {
        return this->pcr_count;
 }
 
 METHOD(pts_pcr_t, select_pcr, bool,
-       private_pts_pcr_t *this, u_int32_t pcr)
+       private_pts_pcr_t *this, uint32_t pcr)
 {
-       u_int32_t i, f;
+       uint32_t i, f;
 
        if (pcr >= PTS_PCR_MAX_NUM)
        {
@@ -106,7 +106,7 @@ typedef struct {
        /** implements enumerator_t */
        enumerator_t public;
        /** current PCR */
-       u_int32_t pcr;
+       uint32_t pcr;
        /** back reference to parent */
        private_pts_pcr_t *pcrs;
 } pcr_enumerator_t;
@@ -116,11 +116,11 @@ typedef struct {
  */
 static bool pcr_enumerator_enumerate(pcr_enumerator_t *this, ...)
 {
-       u_int32_t *pcr, i, f;
+       uint32_t *pcr, i, f;
        va_list args;
 
        va_start(args, this);
-       pcr = va_arg(args, u_int32_t*);
+       pcr = va_arg(args, uint32_t*);
        va_end(args);
 
        while (this->pcr <= this->pcrs->pcr_max)
@@ -158,13 +158,13 @@ METHOD(pts_pcr_t, create_enumerator, enumerator_t*,
 }
 
 METHOD(pts_pcr_t, get, chunk_t,
-       private_pts_pcr_t *this, u_int32_t pcr)
+       private_pts_pcr_t *this, uint32_t pcr)
 {
        return (pcr < PTS_PCR_MAX_NUM) ? this->pcrs[pcr] : chunk_empty;
 }
 
 METHOD(pts_pcr_t, set, bool,
-       private_pts_pcr_t *this, u_int32_t pcr, chunk_t value)
+       private_pts_pcr_t *this, uint32_t pcr, chunk_t value)
 {
        if (value.len != PTS_PCR_LEN)
        {
@@ -180,7 +180,7 @@ METHOD(pts_pcr_t, set, bool,
 }
 
 METHOD(pts_pcr_t, extend, chunk_t,
-       private_pts_pcr_t *this, u_int32_t pcr, chunk_t measurement)
+       private_pts_pcr_t *this, uint32_t pcr, chunk_t measurement)
 {
        if (measurement.len != PTS_PCR_LEN)
        {
@@ -205,8 +205,8 @@ METHOD(pts_pcr_t, get_composite, chunk_t,
 {
        chunk_t composite;
        enumerator_t *enumerator;
-       u_int16_t selection_size;
-       u_int32_t pcr_field_size, pcr;
+       uint16_t selection_size;
+       uint32_t pcr_field_size, pcr;
        u_char *pos;
 
        selection_size = get_selection_size(this);
@@ -236,7 +236,7 @@ METHOD(pts_pcr_t, get_composite, chunk_t,
 METHOD(pts_pcr_t, destroy, void,
        private_pts_pcr_t *this)
 {
-       u_int32_t i;
+       uint32_t i;
 
        for (i = 0; i < PTS_PCR_MAX_NUM; i++)
        {
@@ -253,7 +253,7 @@ pts_pcr_t *pts_pcr_create(void)
 {
        private_pts_pcr_t *this;
        hasher_t *hasher;
-       u_int32_t i;
+       uint32_t i;
 
        hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA1);
        if (!hasher)
index f638b5ee417a869fa067713f2c20996db9e4e65a..b6ca73edc3ad9355e1302a8863a43ff624206307 100644 (file)
@@ -45,7 +45,7 @@ struct pts_pcr_t {
         *
         * @return                              number of selected PCRs
         */
-       u_int32_t (*get_count)(pts_pcr_t *this);
+       uint32_t (*get_count)(pts_pcr_t *this);
 
        /**
         * Mark a PCR as selected
@@ -53,7 +53,7 @@ struct pts_pcr_t {
         * @param pcr                   index of PCR
         * @return                              TRUE if PCR index exists
         */
-       bool (*select_pcr)(pts_pcr_t *this, u_int32_t pcr);
+       bool (*select_pcr)(pts_pcr_t *this, uint32_t pcr);
 
        /**
         * Get the size of the selection field in bytes
@@ -75,7 +75,7 @@ struct pts_pcr_t {
         * @param pcr                   index of PCR
         * @return                              content of PCR
         */
-       chunk_t (*get)(pts_pcr_t *this, u_int32_t pcr);
+       chunk_t (*get)(pts_pcr_t *this, uint32_t pcr);
 
        /**
         * Set the content of a PCR
@@ -84,7 +84,7 @@ struct pts_pcr_t {
         * @param value                 new value of PCR
         * @return                              TRUE if value could be set
         */
-       bool (*set)(pts_pcr_t *this, u_int32_t pcr, chunk_t value);
+       bool (*set)(pts_pcr_t *this, uint32_t pcr, chunk_t value);
 
        /**
         * Extend the content of a PCR
@@ -93,7 +93,7 @@ struct pts_pcr_t {
         * @param measurement   measurment value to be extended into PCR
         * @return                              new content of PCR
         */
-       chunk_t (*extend)(pts_pcr_t *this, u_int32_t pcr, chunk_t measurement);
+       chunk_t (*extend)(pts_pcr_t *this, uint32_t pcr, chunk_t measurement);
 
        /**
         * Create a PCR Composite object over all selected PCRs
index 8a2eb2828883e82a2c55a8c9e41c0f9443be51b4..123df05d6b0c29a4f30e92f4293324002cde9ebf 100644 (file)
@@ -75,7 +75,7 @@ ENUM_END(pwg_attr_names,      PWG_HCD_CONFIGURATION_STATE);
 /**
  * See header
  */
-pa_tnc_attr_t* pwg_attr_create_from_data(u_int32_t type, size_t length, chunk_t value)
+pa_tnc_attr_t* pwg_attr_create_from_data(uint32_t type, size_t length, chunk_t value)
 {
        switch (type)
        {
index 01db42cd286e400692171f3affcbd9c571faeab9..2782075b2adbc09b373e7364e3cc164168b02b05 100644 (file)
@@ -69,7 +69,7 @@ extern enum_name_t *pwg_attr_names;
  * @param length                       attribute length
  * @param value                                attribute value or segment
  */
-pa_tnc_attr_t* pwg_attr_create_from_data(u_int32_t type, size_t length,
+pa_tnc_attr_t* pwg_attr_create_from_data(uint32_t type, size_t length,
                                                                                 chunk_t value);
 
 #endif /** PWG_ATTR_H_ @}*/
index 7931259aa12e1f80ff75bc245228a67107e8b587..0b03f12ec24ffd4cb22abaec9ba5cfe440a7ae46 100644 (file)
@@ -117,7 +117,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_pwg_attr_vendor_smi_code_t *this, u_int32_t *offset)
+       private_pwg_attr_vendor_smi_code_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        uint32_t vendor_smi_code;
index 7f3c344762e2ec61822270cce138fd0c29dc1000..7c7427fb11307d3d29fb84c79246bf170aaea26c 100644 (file)
@@ -27,8 +27,8 @@ ENUM(swid_error_code_names, TCG_SWID_ERROR, TCG_SWID_RESPONSE_TOO_LARGE,
 /**
  * Described in header.
  */
-pa_tnc_attr_t* swid_error_create(swid_error_code_t code, u_int32_t request_id,
-                                                                u_int32_t max_attr_size, char *description)
+pa_tnc_attr_t* swid_error_create(swid_error_code_t code, uint32_t request_id,
+                                                                uint32_t max_attr_size, char *description)
 {
        bio_writer_t *writer;
        chunk_t msg_info;
index b459ba686d2c12e93bc7b8a12a35371b7907326c..2ed099186d6146614c46f14c8b860e81a3b10065 100644 (file)
@@ -52,7 +52,7 @@ extern enum_name_t *swid_error_code_names;
  * @param max_attr_size                Maximum IF-M attribute size (if applicable)
  * @param description          Optional description string or NULL
  */
-pa_tnc_attr_t* swid_error_create(swid_error_code_t code, u_int32_t request,
-                                                                u_int32_t max_attr_size, char *description);
+pa_tnc_attr_t* swid_error_create(swid_error_code_t code, uint32_t request,
+                                                                uint32_t max_attr_size, char *description);
 
 #endif /** SWID_ERROR_H_ @}*/
index 194cf1b68fa360b9895a05327a73706563c15fca..3ca24faec5908f7df7fd3fd7c9fbd81f0dca4628 100644 (file)
@@ -108,7 +108,7 @@ METHOD(pa_tnc_attr_t, build, void,
        private_tcg_pts_attr_aik_t *this)
 {
        bio_writer_t *writer;
-       u_int8_t flags = PTS_AIK_FLAGS_NONE;
+       uint8_t flags = PTS_AIK_FLAGS_NONE;
        cred_encoding_type_t encoding_type = CERT_ASN1_DER;
        chunk_t aik_blob;
 
@@ -136,10 +136,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_aik_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_aik_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t flags;
+       uint8_t flags;
        certificate_type_t type;
        chunk_t aik_blob;
 
index 2a1506898490763efe4a059299233462bb84c8d4..5cb81c122baa4b13828eadc45b4fa23f76a2fb28 100644 (file)
@@ -140,11 +140,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_dh_nonce_finish_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_dh_nonce_finish_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t reserved, nonce_len;
-       u_int16_t hash_algo;
+       uint8_t reserved, nonce_len;
+       uint16_t hash_algo;
 
        *offset = 0;
 
index 78b5025bc6197de211337aa59d9e659c2d10f7a8..cbc9847faadb2d6af7da3e850d2577f31b417cbb 100644 (file)
@@ -43,7 +43,7 @@ struct tcg_pts_attr_dh_nonce_finish_t {
         *
         * @return                              Length of nonce
         */
-       u_int8_t (*get_nonce_len)(tcg_pts_attr_dh_nonce_finish_t *this);
+       uint8_t (*get_nonce_len)(tcg_pts_attr_dh_nonce_finish_t *this);
 
        /**
         * Get selected hash algorithm
index 0349ce53e85b8074b8162b757fccde7d0bb83646..9c24759ea107a5eaaafaa6835de0dd2992a38e98 100644 (file)
@@ -72,7 +72,7 @@ struct private_tcg_pts_attr_dh_nonce_params_req_t {
        /**
         * Minimum acceptable length of nonce
         */
-       u_int8_t min_nonce_len;
+       uint8_t min_nonce_len;
 
        /**
         * Diffie Hellman group set
@@ -129,11 +129,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_dh_nonce_params_req_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_dh_nonce_params_req_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t reserved;
-       u_int16_t dh_groups;
+       uint8_t reserved;
+       uint16_t dh_groups;
 
        *offset = 0;
 
@@ -179,7 +179,7 @@ METHOD(pa_tnc_attr_t, destroy, void,
        }
 }
 
-METHOD(tcg_pts_attr_dh_nonce_params_req_t, get_min_nonce_len, u_int8_t,
+METHOD(tcg_pts_attr_dh_nonce_params_req_t, get_min_nonce_len, uint8_t,
        private_tcg_pts_attr_dh_nonce_params_req_t *this)
 {
        return this->min_nonce_len;
@@ -194,7 +194,7 @@ METHOD(tcg_pts_attr_dh_nonce_params_req_t, get_dh_groups, pts_dh_group_t,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *tcg_pts_attr_dh_nonce_params_req_create(u_int8_t min_nonce_len,
+pa_tnc_attr_t *tcg_pts_attr_dh_nonce_params_req_create(uint8_t min_nonce_len,
                                                                                                pts_dh_group_t dh_groups)
 {
        private_tcg_pts_attr_dh_nonce_params_req_t *this;
index 4396bf687244c529182f0c78657079c9a16d4801..3d83b6d861ddbd8a3d24df82a7c0eda743cdbe51 100644 (file)
@@ -44,7 +44,7 @@ struct tcg_pts_attr_dh_nonce_params_req_t {
         *
         * @return                              Minimum acceptable length of nonce
         */
-       u_int8_t (*get_min_nonce_len)(tcg_pts_attr_dh_nonce_params_req_t *this);
+       uint8_t (*get_min_nonce_len)(tcg_pts_attr_dh_nonce_params_req_t *this);
 
        /**
         * Get supported Diffie Hellman Groups
@@ -60,7 +60,7 @@ struct tcg_pts_attr_dh_nonce_params_req_t {
  * @param min_nonce_len                                Minimum acceptable length of nonce
  * @param dh_groups                                    Initiator's supported DH groups
  */
-pa_tnc_attr_t* tcg_pts_attr_dh_nonce_params_req_create(u_int8_t min_nonce_len,
+pa_tnc_attr_t* tcg_pts_attr_dh_nonce_params_req_create(uint8_t min_nonce_len,
                                                                                                pts_dh_group_t dh_groups);
 
 /**
index fa1dbdd3ae003497ab6efce5a6f675cef9c871c5..a4e66a670922e2455ac28f4e3c4f34a5d93787ab 100644 (file)
@@ -148,12 +148,12 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_dh_nonce_params_resp_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_dh_nonce_params_resp_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t reserved;
-       u_int8_t nonce_len;
-       u_int16_t dh_group, hash_algo_set;
+       uint32_t reserved;
+       uint8_t nonce_len;
+       uint16_t dh_group, hash_algo_set;
 
        *offset = 0;
 
index 397882926ae10462c1324558fe42911b460b240e..aba34a817b2fc6d57a94443db7e242cd27f81570 100644 (file)
@@ -149,8 +149,8 @@ METHOD(pa_tnc_attr_t, build, void,
 {
        bio_writer_t *writer;
        enumerator_t *enumerator;
-       u_int64_t count;
-       u_int16_t request_id;
+       uint64_t count;
+       uint16_t request_id;
        char *filename;
        chunk_t measurement;
        bool first = TRUE;
@@ -192,7 +192,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_file_meas_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_file_meas_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        chunk_t measurement, filename;
index b7b4d7e3f7ba94104404098ca0c73b452399ca54..e203f71c56f771a549fad1f2500697a9e034aa88 100644 (file)
@@ -118,10 +118,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_gen_attest_evid_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_gen_attest_evid_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t reserved;
+       uint32_t reserved;
 
        *offset = 0;
 
index 8fda2b1f59959dc73f06ff8d5d9689ab8f762003..e2da704dc5d62b5aa7c8230f538f98ada2558f23 100644 (file)
@@ -121,10 +121,10 @@ METHOD(pa_tnc_attr_t, add_segment, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_get_aik_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_get_aik_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t reserved;
+       uint32_t reserved;
 
        *offset = 0;
 
index a4c9dba87e649cfe35f1b27be526bca269663d20..e98d7b40e5397ce8521b15cc010c19775f3a180a 100644 (file)
@@ -118,10 +118,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_get_tpm_version_info_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_get_tpm_version_info_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t reserved;
+       uint32_t reserved;
 
        *offset = 0;
 
index 8b0502a919b9e3953bcb9080148aae0f22b9af0c..ce38b626a33fd414dc9a3a20a5e7a2b4f8af2e8b 100644 (file)
@@ -121,10 +121,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_meas_algo_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_meas_algo_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int16_t reserved, algorithms;
+       uint16_t reserved, algorithms;
 
        *offset = 0;
 
index 0a562c0bca1d3bff9304fad61f9c1081b9c5943c..ba017438c0fd8b80d46c405fec42efd34ba277c8 100644 (file)
@@ -123,10 +123,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_proto_caps_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_proto_caps_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int16_t reserved, flags;
+       uint16_t reserved, flags;
 
        *offset = 0;
 
index a3c3ce56e519a291b3bc2d5ce00b7fafa5a6eb39..b4f336713e4039a5edbf737d232883708ec5de15 100644 (file)
@@ -85,12 +85,12 @@ struct private_tcg_pts_attr_req_file_meas_t {
        /**
         * Request ID
         */
-       u_int16_t request_id;
+       uint16_t request_id;
 
        /**
         * UTF8 Encoding of Delimiter Character
         */
-       u_int32_t delimiter;
+       uint32_t delimiter;
 
        /**
         * Fully Qualified File Pathname
@@ -130,7 +130,7 @@ METHOD(pa_tnc_attr_t, set_noskip_flag,void,
 METHOD(pa_tnc_attr_t, build, void,
        private_tcg_pts_attr_req_file_meas_t *this)
 {
-       u_int8_t flags = PTS_REQ_FILE_MEAS_NO_FLAGS;
+       uint8_t flags = PTS_REQ_FILE_MEAS_NO_FLAGS;
        chunk_t pathname;
        bio_writer_t *writer;
 
@@ -156,11 +156,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_req_file_meas_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_req_file_meas_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t flags;
-       u_int8_t reserved;
+       uint8_t flags;
+       uint8_t reserved;
        chunk_t pathname;
 
        *offset = 0;
@@ -220,13 +220,13 @@ METHOD(tcg_pts_attr_req_file_meas_t, get_directory_flag, bool,
        return this->directory_flag;
 }
 
-METHOD(tcg_pts_attr_req_file_meas_t, get_request_id, u_int16_t,
+METHOD(tcg_pts_attr_req_file_meas_t, get_request_id, uint16_t,
        private_tcg_pts_attr_req_file_meas_t *this)
 {
        return this->request_id;
 }
 
-METHOD(tcg_pts_attr_req_file_meas_t, get_delimiter, u_int32_t,
+METHOD(tcg_pts_attr_req_file_meas_t, get_delimiter, uint32_t,
        private_tcg_pts_attr_req_file_meas_t *this)
 {
        return this->delimiter;
@@ -242,8 +242,8 @@ METHOD(tcg_pts_attr_req_file_meas_t, get_pathname, char*,
  * Described in header.
  */
 pa_tnc_attr_t *tcg_pts_attr_req_file_meas_create(bool directory_flag,
-                                                                                                u_int16_t request_id,
-                                                                                                u_int32_t delimiter,
+                                                                                                uint16_t request_id,
+                                                                                                uint32_t delimiter,
                                                                                                 char *pathname)
 {
        private_tcg_pts_attr_req_file_meas_t *this;
index 20a54dfaf5171af4237d74c9f3a45feacda19f22..cbf429dab260c94429be5ce96246975689b3e11d 100644 (file)
@@ -50,14 +50,14 @@ struct tcg_pts_attr_req_file_meas_t {
         *
         * @return                              Request ID
         */
-       u_int16_t (*get_request_id)(tcg_pts_attr_req_file_meas_t *this);
+       uint16_t (*get_request_id)(tcg_pts_attr_req_file_meas_t *this);
 
        /**
         * Get Delimiter
         *
         * @return                              UTF-8 encoding of a Delimiter Character
         */
-       u_int32_t (*get_delimiter)(tcg_pts_attr_req_file_meas_t *this);
+       uint32_t (*get_delimiter)(tcg_pts_attr_req_file_meas_t *this);
 
        /**
         * Get Fully Qualified File Pathname
@@ -77,8 +77,8 @@ struct tcg_pts_attr_req_file_meas_t {
  * @param pathname                     File Pathname
  */
 pa_tnc_attr_t* tcg_pts_attr_req_file_meas_create(bool directory_flag,
-                                                                                                u_int16_t request_id,
-                                                                                                u_int32_t delimiter,
+                                                                                                uint16_t request_id,
+                                                                                                uint32_t delimiter,
                                                                                                 char *pathname);
 
 /**
index f6befa8b9f06ce279344d8d11a63d60fa73979fc..d8acf062510ac2036776d9158fdc794ceec2db20 100644 (file)
@@ -83,7 +83,7 @@ struct private_tcg_pts_attr_req_file_meta_t {
        /**
         * UTF8 Encoding of Delimiter Character
         */
-       u_int8_t delimiter;
+       uint8_t delimiter;
 
        /**
         * Fully Qualified File Pathname
@@ -123,7 +123,7 @@ METHOD(pa_tnc_attr_t, set_noskip_flag,void,
 METHOD(pa_tnc_attr_t, build, void,
        private_tcg_pts_attr_req_file_meta_t *this)
 {
-       u_int8_t flags = PTS_REQ_FILE_META_NO_FLAGS;
+       uint8_t flags = PTS_REQ_FILE_META_NO_FLAGS;
        chunk_t pathname;
        bio_writer_t *writer;
 
@@ -149,11 +149,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_req_file_meta_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_req_file_meta_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t flags;
-       u_int16_t reserved;
+       uint8_t flags;
+       uint16_t reserved;
        chunk_t pathname;
 
        *offset = 0;
@@ -212,7 +212,7 @@ METHOD(tcg_pts_attr_req_file_meta_t, get_directory_flag, bool,
        return this->directory_flag;
 }
 
-METHOD(tcg_pts_attr_req_file_meta_t, get_delimiter, u_int8_t,
+METHOD(tcg_pts_attr_req_file_meta_t, get_delimiter, uint8_t,
        private_tcg_pts_attr_req_file_meta_t *this)
 {
        return this->delimiter;
@@ -228,7 +228,7 @@ METHOD(tcg_pts_attr_req_file_meta_t, get_pathname, char*,
  * Described in header.
  */
 pa_tnc_attr_t *tcg_pts_attr_req_file_meta_create(bool directory_flag,
-                                                                                                u_int8_t delimiter,
+                                                                                                uint8_t delimiter,
                                                                                                 char *pathname)
 {
        private_tcg_pts_attr_req_file_meta_t *this;
index c2f1cca7403329fbcdd4c5720aed39f33ecc71e2..91ab5c6789c2bdf2ded7b50a8d0fa9f30cc331b1 100644 (file)
@@ -50,7 +50,7 @@ struct tcg_pts_attr_req_file_meta_t {
         *
         * @return                              UTF-8 encoding of a Delimiter Character
         */
-       u_int8_t (*get_delimiter)(tcg_pts_attr_req_file_meta_t *this);
+       uint8_t (*get_delimiter)(tcg_pts_attr_req_file_meta_t *this);
 
        /**
         * Get Fully Qualified File Pathname
@@ -69,7 +69,7 @@ struct tcg_pts_attr_req_file_meta_t {
  * @param pathname                     File Pathname
  */
 pa_tnc_attr_t* tcg_pts_attr_req_file_meta_create(bool directory_flag,
-                                                                                                u_int8_t delimiter,
+                                                                                                uint8_t delimiter,
                                                                                                 char *pathname);
 
 /**
index 03891104c891dcfe5cac80c81394ae720447c023..da21003e311e9f5e67b14026d1eccf3d493f9bd7 100644 (file)
@@ -110,16 +110,16 @@ typedef struct entry_t entry_t;
  * Functional component entry
  */
 struct entry_t {
-       u_int8_t flags;
-       u_int32_t depth;
+       uint8_t flags;
+       uint32_t depth;
        pts_comp_func_name_t *name;
 };
 
 /**
  * Enumerate functional component entries
  */
-static bool entry_filter(void *null, entry_t **entry, u_int8_t *flags,
-                                                void *i2, u_int32_t *depth, void *i3,
+static bool entry_filter(void *null, entry_t **entry, uint8_t *flags,
+                                                void *i2, uint32_t *depth, void *i3,
                                                 pts_comp_func_name_t **name)
 {
        *flags = (*entry)->flags;
@@ -195,11 +195,11 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_req_func_comp_evid_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_req_func_comp_evid_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t depth, vendor_id, name;
-       u_int8_t flags, fam_and_qualifier, qualifier;
+       uint32_t depth, vendor_id, name;
+       uint8_t flags, fam_and_qualifier, qualifier;
        status_t status = FAILED;
        entry_t *entry = NULL;
 
@@ -296,8 +296,8 @@ METHOD(pa_tnc_attr_t, destroy, void,
 }
 
 METHOD(tcg_pts_attr_req_func_comp_evid_t, add_component, void,
-       private_tcg_pts_attr_req_func_comp_evid_t *this, u_int8_t flags,
-       u_int32_t depth, pts_comp_func_name_t *name)
+       private_tcg_pts_attr_req_func_comp_evid_t *this, uint8_t flags,
+       uint32_t depth, pts_comp_func_name_t *name)
 {
        entry_t *entry;
 
index 2f8657ed209b054bbf49f0b2c318e7a720792a41..43abcbb4d187a4dd90af799403100560c6af2b5f 100644 (file)
@@ -47,7 +47,7 @@ struct tcg_pts_attr_req_func_comp_evid_t {
         * @param name                          Functional Component Name
         */
        void (*add_component)(tcg_pts_attr_req_func_comp_evid_t *this,
-                                                 u_int8_t flags, u_int32_t depth,
+                                                 uint8_t flags, uint32_t depth,
                                                  pts_comp_func_name_t *name);
 
        /**
index d94ee89a57d0de5dff9c1fa046c89d265b2e902d..c249ca1516a037f79eb2b01b0615b0ec43e49620 100644 (file)
@@ -181,9 +181,9 @@ METHOD(pa_tnc_attr_t, build, void,
        bio_writer_t *writer;
        bool has_pcr_info;
        char utc_time_buf[25], *policy_uri;
-       u_int8_t flags;
-       u_int16_t len;
-       u_int32_t depth, extended_pcr;
+       uint8_t flags;
+       uint16_t len;
+       uint32_t depth, extended_pcr;
        pts_comp_func_name_t *name;
        pts_meas_algorithms_t hash_algorithm;
        pts_pcr_transform_t transform;
@@ -301,14 +301,14 @@ bool measurement_time_from_utc(time_t *measurement_time, chunk_t utc_time)
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_simple_comp_evid_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_simple_comp_evid_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        pts_comp_func_name_t *name;
-       u_int8_t flags, fam_and_qualifier, qualifier, reserved;
-       u_int8_t measurement_type, transform, validation;
-       u_int16_t hash_algorithm, len;
-       u_int32_t depth, vendor_id, comp_name, extended_pcr;
+       uint8_t flags, fam_and_qualifier, qualifier, reserved;
+       uint8_t measurement_type, transform, validation;
+       uint16_t hash_algorithm, len;
+       uint32_t depth, vendor_id, comp_name, extended_pcr;
        chunk_t measurement, utc_time, policy_uri, pcr_before, pcr_after;
        time_t measurement_time;
        bool has_pcr_info = FALSE, has_validation = FALSE;
index cfeaec6e98386e62c88a8fdcd39644972ae0ad8f..a847dcb70b02ca24c491dd393b8d569aa8ee36f5 100644 (file)
@@ -81,7 +81,7 @@ struct private_tcg_pts_attr_simple_evid_final_t {
        /**
         * Set of flags for Simple Evidence Final
         */
-       u_int8_t flags;
+       uint8_t flags;
 
        /**
         * Optional Composite Hash Algorithm
@@ -168,7 +168,7 @@ METHOD(pa_tnc_attr_t, build, void,
        private_tcg_pts_attr_simple_evid_final_t *this)
 {
        bio_writer_t *writer;
-       u_int8_t flags;
+       uint8_t flags;
 
        if (this->value.ptr)
        {
@@ -212,12 +212,12 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_simple_evid_final_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_simple_evid_final_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t flags, reserved;
-       u_int16_t algorithm;
-       u_int32_t pcr_comp_len, tpm_quote_sig_len, evid_sig_len;
+       uint8_t flags, reserved;
+       uint16_t algorithm;
+       uint32_t pcr_comp_len, tpm_quote_sig_len, evid_sig_len;
        status_t status = FAILED;
 
        *offset = 0;
@@ -296,7 +296,7 @@ end:
        return status;
 }
 
-METHOD(tcg_pts_attr_simple_evid_final_t, get_quote_info, u_int8_t,
+METHOD(tcg_pts_attr_simple_evid_final_t, get_quote_info, uint8_t,
        private_tcg_pts_attr_simple_evid_final_t *this,
        pts_meas_algorithms_t *comp_hash_algo, chunk_t *pcr_comp, chunk_t *tpm_quote_sig)
 {
@@ -335,7 +335,7 @@ METHOD(tcg_pts_attr_simple_evid_final_t, set_evid_sig, void,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *tcg_pts_attr_simple_evid_final_create(u_int8_t flags,
+pa_tnc_attr_t *tcg_pts_attr_simple_evid_final_create(uint8_t flags,
                                                        pts_meas_algorithms_t comp_hash_algorithm,
                                                        chunk_t pcr_comp, chunk_t tpm_quote_sig)
 {
index 8343b5b30ba549f675aac63b193b8281414e3315..aed4d941fbdf6c165cfc65f93f7936f38264987b 100644 (file)
@@ -47,7 +47,7 @@ struct tcg_pts_attr_simple_evid_final_t {
         * @param tpm_quote sig         Optional TPM Quote Signature
         * @return                                      PTS_SIMPLE_EVID_FINAL flags
         */
-       u_int8_t (*get_quote_info)(tcg_pts_attr_simple_evid_final_t *this,
+       uint8_t (*get_quote_info)(tcg_pts_attr_simple_evid_final_t *this,
                                                           pts_meas_algorithms_t *comp_hash_algo,
                                                           chunk_t *pcr_comp, chunk_t *tpm_quote_sig);
 
@@ -79,7 +79,7 @@ struct tcg_pts_attr_simple_evid_final_t {
  * @param tpm_quote_sign               Optional TPM Quote Signature
  */
 pa_tnc_attr_t* tcg_pts_attr_simple_evid_final_create(
-                                                       u_int8_t flags,
+                                                       uint8_t flags,
                                                        pts_meas_algorithms_t comp_hash_algorithm,
                                                        chunk_t pcr_comp,
                                                        chunk_t tpm_quote_sign);
index db877e9c5bf0fd841760f9048b46eff828947cf3..fca1932a9ae3e0acef0d330fc5f4d772895b9bed 100644 (file)
@@ -122,7 +122,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_tpm_version_info_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_tpm_version_info_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
index 7c176fdf694ea2cebd2f7bb2db868693749eff3e..df5898c3e8cf9b35ba7c5cee3af65eea34e3d425 100644 (file)
@@ -144,7 +144,7 @@ METHOD(pa_tnc_attr_t, build, void,
        bio_writer_t *writer;
        enumerator_t *enumerator;
        pts_file_metadata_t *entry;
-       u_int64_t number_of_files;
+       uint64_t number_of_files;
 
        if (this->value.ptr)
        {
@@ -179,14 +179,14 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_file_meta_t *this, u_int32_t *offset)
+       private_tcg_pts_attr_file_meta_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        pts_file_metadata_t *entry;
-       u_int8_t type, reserved;
-       u_int16_t len;
-       u_int64_t number_of_files, filesize, created, modified, accessed;
-       u_int64_t owner, group;
+       uint8_t type, reserved;
+       uint16_t len;
+       uint64_t number_of_files, filesize, created, modified, accessed;
+       uint64_t owner, group;
        chunk_t filename;
        status_t status = FAILED;
 
index 010eaf83d1bc9382eaa2a73af598211d131475dc..e56a96f94b52fca50d97318d6664e14e6ca6f9af 100644 (file)
@@ -124,7 +124,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_seg_attr_max_size_t *this, u_int32_t *offset)
+       private_tcg_seg_attr_max_size_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
index 995f64cad5e80b1a35b91b464015f291becf1fb5..985e57be8fc8eb81ab26b68f2d184a93219b94d5 100644 (file)
@@ -128,7 +128,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_seg_attr_next_seg_t *this, u_int32_t *offset)
+       private_tcg_seg_attr_next_seg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
        uint8_t flags;
index 4f767539c12162dd845226451b25e6e69c78c03a..7cd585a04ad63e2f63e1ce1e612b47914d76fdf4 100644 (file)
@@ -119,7 +119,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_seg_attr_seg_env_t *this, u_int32_t *offset)
+       private_tcg_seg_attr_seg_env_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
index 561242758e5c6e3fceb958519af6db3ead35df0f..f02bbcb856d168bbd018c1b97361e42b4d9febc7 100644 (file)
@@ -80,17 +80,17 @@ struct private_tcg_swid_attr_req_t {
        /**
         * SWID request flags
         */
-       u_int8_t flags;
+       uint8_t flags;
 
        /**
         * Request ID
         */
-       u_int32_t request_id;
+       uint32_t request_id;
 
        /**
         * Earliest EID
         */
-       u_int32_t earliest_eid;
+       uint32_t earliest_eid;
 
        /**
         * List of Target Tag Identifiers
@@ -162,10 +162,10 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_swid_attr_req_t *this, u_int32_t *offset)
+       private_tcg_swid_attr_req_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int32_t tag_id_count;
+       uint32_t tag_id_count;
        chunk_t tag_creator, unique_sw_id;
        swid_tag_id_t *tag_id;
 
@@ -244,19 +244,19 @@ METHOD(pa_tnc_attr_t, destroy, void,
        }
 }
 
-METHOD(tcg_swid_attr_req_t, get_flags, u_int8_t,
+METHOD(tcg_swid_attr_req_t, get_flags, uint8_t,
        private_tcg_swid_attr_req_t *this)
 {
        return this->flags;
 }
 
-METHOD(tcg_swid_attr_req_t, get_request_id, u_int32_t,
+METHOD(tcg_swid_attr_req_t, get_request_id, uint32_t,
        private_tcg_swid_attr_req_t *this)
 {
        return this->request_id;
 }
 
-METHOD(tcg_swid_attr_req_t, get_earliest_eid, u_int32_t,
+METHOD(tcg_swid_attr_req_t, get_earliest_eid, uint32_t,
        private_tcg_swid_attr_req_t *this)
 {
        return this->earliest_eid;
@@ -277,8 +277,8 @@ METHOD(tcg_swid_attr_req_t, get_targets, swid_inventory_t*,
 /**
  * Described in header.
  */
-pa_tnc_attr_t *tcg_swid_attr_req_create(u_int8_t flags, u_int32_t request_id,
-                                                                               u_int32_t eid)
+pa_tnc_attr_t *tcg_swid_attr_req_create(uint8_t flags, uint32_t request_id,
+                                                                               uint32_t eid)
 {
        private_tcg_swid_attr_req_t *this;
 
index fd2ccdc4f28b253ea96c28d2913da15533a6fd95..b28c33a8b4ec66f2abe44a91cf8aae7f255d6a07 100644 (file)
@@ -53,21 +53,21 @@ struct tcg_swid_attr_req_t {
         *
         * @return                              Flags
         */
-       u_int8_t (*get_flags)(tcg_swid_attr_req_t *this);
+       uint8_t (*get_flags)(tcg_swid_attr_req_t *this);
 
        /**
         * Get Request ID
         *
         * @return                              Request ID
         */
-       u_int32_t (*get_request_id)(tcg_swid_attr_req_t *this);
+       uint32_t (*get_request_id)(tcg_swid_attr_req_t *this);
 
        /**
         * Get Earliest EID
         *
         * @return                              Event ID
         */
-       u_int32_t (*get_earliest_eid)(tcg_swid_attr_req_t *this);
+       uint32_t (*get_earliest_eid)(tcg_swid_attr_req_t *this);
 
        /**
         * Add Tag ID
@@ -92,8 +92,8 @@ struct tcg_swid_attr_req_t {
  * @param request_id           Request ID
  * @param eid                          Earliest Event ID
  */
-pa_tnc_attr_t* tcg_swid_attr_req_create(u_int8_t flags, u_int32_t request_id,
-                                                                               u_int32_t eid);
+pa_tnc_attr_t* tcg_swid_attr_req_create(uint8_t flags, uint32_t request_id,
+                                                                               uint32_t eid);
 
 /**
  * Creates an tcg_swid_attr_req_t object from received data
index 3ed6e86998e276007c1c5c1b648c5121b9679ebd..ab1fa43a56121fef79fd79223249856c22e142fd 100644 (file)
@@ -185,7 +185,7 @@ ENUM_END(tcg_attr_names,    TCG_PTS_AIK);
 /**
  * See header
  */
-pa_tnc_attr_t* tcg_attr_create_from_data(u_int32_t type, size_t length, chunk_t value)
+pa_tnc_attr_t* tcg_attr_create_from_data(uint32_t type, size_t length, chunk_t value)
 {
        switch (type)
        {
index 3a9a7b2e789809465b8961ddb992da4b0c1e7f9b..d915c785c2487ec39e55bf6194a76ab2927bf13d 100644 (file)
@@ -101,7 +101,7 @@ extern enum_name_t *tcg_attr_names;
  * @param length                       attribute length
  * @param value                                attribute value or segment
  */
-pa_tnc_attr_t* tcg_attr_create_from_data(u_int32_t type, size_t length,
+pa_tnc_attr_t* tcg_attr_create_from_data(uint32_t type, size_t length,
                                                                                 chunk_t value);
 
 #endif /** TCG_ATTR_H_ @}*/
index 2b003e390de23da96fb6c71e10e443bb217c04dd..6c7e9a1c91e639f1768544e4a1c74d01bb25df30 100644 (file)
@@ -49,7 +49,7 @@ struct private_esp_context_t {
         * The highest sequence number that was successfully verified
         * and authenticated, or assigned in an outbound context
         */
-       u_int32_t last_seqno;
+       uint32_t last_seqno;
 
        /**
         * The bit in the window of the highest authenticated sequence number
@@ -103,7 +103,7 @@ static inline bool get_window_bit(private_esp_context_t *this, u_int index)
 /**
  * Returns TRUE if the supplied seqno is not already marked in the window
  */
-static bool check_window(private_esp_context_t *this, u_int32_t seqno)
+static bool check_window(private_esp_context_t *this, uint32_t seqno)
 {
        u_int offset;
 
@@ -113,7 +113,7 @@ static bool check_window(private_esp_context_t *this, u_int32_t seqno)
 }
 
 METHOD(esp_context_t, verify_seqno, bool,
-       private_esp_context_t *this, u_int32_t seqno)
+       private_esp_context_t *this, uint32_t seqno)
 {
        if (!this->inbound)
        {
@@ -145,7 +145,7 @@ METHOD(esp_context_t, verify_seqno, bool,
 }
 
 METHOD(esp_context_t, set_authenticated_seqno, void,
-       private_esp_context_t *this, u_int32_t seqno)
+       private_esp_context_t *this, uint32_t seqno)
 {
        u_int i, shift;
 
@@ -173,14 +173,14 @@ METHOD(esp_context_t, set_authenticated_seqno, void,
        }
 }
 
-METHOD(esp_context_t, get_seqno, u_int32_t,
+METHOD(esp_context_t, get_seqno, uint32_t,
        private_esp_context_t *this)
 {
        return this->last_seqno;
 }
 
 METHOD(esp_context_t, next_seqno, bool,
-       private_esp_context_t *this, u_int32_t *seqno)
+       private_esp_context_t *this, uint32_t *seqno)
 {
        if (this->inbound || this->last_seqno == UINT32_MAX)
        {       /* inbound or segno would cycle */
index b33daf58940f2ff0908f7a80eac37ff2b0cd6a3d..322dab97fb9a4a9b5cacdb48f924fb341ba9ebfd 100644 (file)
@@ -46,7 +46,7 @@ struct esp_context_t {
         *
         * @return                      current sequence number, in host byte order
         */
-       u_int32_t (*get_seqno)(esp_context_t *this);
+       uint32_t (*get_seqno)(esp_context_t *this);
 
        /**
         * Allocate the next outbound ESP sequence number.
@@ -54,7 +54,7 @@ struct esp_context_t {
         * @param seqno         the sequence number, in host byte order
         * @return                      FALSE if the sequence number cycled or inbound context
         */
-       bool (*next_seqno)(esp_context_t *this, u_int32_t *seqno);
+       bool (*next_seqno)(esp_context_t *this, uint32_t *seqno);
 
        /**
         * Verify an ESP sequence number.  Checks whether a packet with this
@@ -66,7 +66,7 @@ struct esp_context_t {
         * @param seqno         the sequence number to verify, in host byte order
         * @return                      TRUE when sequence number is valid
         */
-       bool (*verify_seqno)(esp_context_t *this, u_int32_t seqno);
+       bool (*verify_seqno)(esp_context_t *this, uint32_t seqno);
 
        /**
         * Adds a sequence number that was successfully verified and
@@ -76,7 +76,7 @@ struct esp_context_t {
         * @param seqno         verified and authenticated seq number in host byte order
         */
        void (*set_authenticated_seqno)(esp_context_t *this,
-                                                                       u_int32_t seqno);
+                                                                       uint32_t seqno);
 
        /**
         * Destroy an esp_context_t
index 82230228057a3c7ee7a345bd32db7ff95dc41fb2..50bc8b4f70444700163726cfde503740721632ad 100644 (file)
@@ -52,7 +52,7 @@ struct private_esp_packet_t {
        /**
         * Next Header info (e.g. IPPROTO_IPIP)
         */
-       u_int8_t next_header;
+       uint8_t next_header;
 
 };
 
@@ -97,14 +97,14 @@ METHOD(packet_t, set_data, void,
        return this->packet->set_data(this->packet, data);
 }
 
-METHOD(packet_t, get_dscp, u_int8_t,
+METHOD(packet_t, get_dscp, uint8_t,
        private_esp_packet_t *this)
 {
        return this->packet->get_dscp(this->packet);
 }
 
 METHOD(packet_t, set_dscp, void,
-       private_esp_packet_t *this, u_int8_t value)
+       private_esp_packet_t *this, uint8_t value)
 {
        this->packet->set_dscp(this->packet, value);
 }
@@ -127,10 +127,10 @@ METHOD(packet_t, clone_, packet_t*,
 }
 
 METHOD(esp_packet_t, parse_header, bool,
-       private_esp_packet_t *this, u_int32_t *spi)
+       private_esp_packet_t *this, uint32_t *spi)
 {
        bio_reader_t *reader;
-       u_int32_t seq;
+       uint32_t seq;
 
        reader = bio_reader_create(this->packet->get_data(this->packet));
        if (!reader->read_uint32(reader, spi) ||
@@ -156,7 +156,7 @@ static bool check_padding(chunk_t padding)
 
        for (i = 0; i < padding.len; ++i)
        {
-               if (padding.ptr[i] != (u_int8_t)(i + 1))
+               if (padding.ptr[i] != (uint8_t)(i + 1))
                {
                        return FALSE;
                }
@@ -169,7 +169,7 @@ static bool check_padding(chunk_t padding)
  */
 static bool remove_padding(private_esp_packet_t *this, chunk_t plaintext)
 {
-       u_int8_t next_header, pad_length;
+       uint8_t next_header, pad_length;
        chunk_t padding, payload;
        bio_reader_t *reader;
 
@@ -211,7 +211,7 @@ METHOD(esp_packet_t, decrypt, status_t,
        private_esp_packet_t *this, esp_context_t *esp_context)
 {
        bio_reader_t *reader;
-       u_int32_t spi, seq;
+       uint32_t spi, seq;
        chunk_t data, iv, icv, aad, ciphertext, plaintext;
        aead_t *aead;
 
@@ -272,16 +272,16 @@ static void generate_padding(chunk_t padding)
 
        for (i = 0; i < padding.len; ++i)
        {
-               padding.ptr[i] = (u_int8_t)(i + 1);
+               padding.ptr[i] = (uint8_t)(i + 1);
        }
 }
 
 METHOD(esp_packet_t, encrypt, status_t,
-       private_esp_packet_t *this, esp_context_t *esp_context, u_int32_t spi)
+       private_esp_packet_t *this, esp_context_t *esp_context, uint32_t spi)
 {
        chunk_t iv, icv, aad, padding, payload, ciphertext;
        bio_writer_t *writer;
-       u_int32_t next_seqno;
+       uint32_t next_seqno;
        size_t blocksize, plainlen;
        aead_t *aead;
        iv_gen_t *iv_gen;
@@ -316,7 +316,7 @@ METHOD(esp_packet_t, encrypt, status_t,
        plainlen += padding.len;
 
        /* len = spi, seq, IV, plaintext, ICV */
-       writer = bio_writer_create(2 * sizeof(u_int32_t) + iv.len + plainlen +
+       writer = bio_writer_create(2 * sizeof(uint32_t) + iv.len + plainlen +
                                                           icv.len);
        writer->write_uint32(writer, ntohl(spi));
        writer->write_uint32(writer, next_seqno);
@@ -349,7 +349,7 @@ METHOD(esp_packet_t, encrypt, status_t,
 
        DBG3(DBG_ESP, "ESP before encryption:\n  payload = %B\n  padding = %B\n  "
                 "padding length = %hhu, next header = %hhu", &payload, &padding,
-                (u_int8_t)padding.len, this->next_header);
+                (uint8_t)padding.len, this->next_header);
 
        /* encrypt/authenticate the content inline */
        if (!aead->encrypt(aead, ciphertext, aad, iv, NULL))
@@ -368,7 +368,7 @@ METHOD(esp_packet_t, encrypt, status_t,
        return SUCCESS;
 }
 
-METHOD(esp_packet_t, get_next_header, u_int8_t,
+METHOD(esp_packet_t, get_next_header, uint8_t,
        private_esp_packet_t *this)
 {
        return this->next_header;
index f1941a3ba54a11c552e53525592eb1061c4cd5b2..c42acba43c1b23735533498c6bca8a76e0d14848 100644 (file)
@@ -64,7 +64,7 @@ struct esp_packet_t {
         * @return                              TRUE when successful, FALSE otherwise (e.g. when the
         *                                              length of the packet is invalid)
         */
-       bool (*parse_header)(esp_packet_t *this, u_int32_t *spi);
+       bool (*parse_header)(esp_packet_t *this, uint32_t *spi);
 
        /**
         * Authenticate and decrypt the packet. Also verifies the sequence number
@@ -94,7 +94,7 @@ struct esp_packet_t {
         *                                                      - NOT_FOUND if no suitable IV generator provided
         */
        status_t (*encrypt)(esp_packet_t *this, esp_context_t *esp_context,
-                                               u_int32_t spi);
+                                               uint32_t spi);
 
        /**
         * Get the next header field of a packet.
@@ -103,7 +103,7 @@ struct esp_packet_t {
         *
         * @return                                      next header field
         */
-       u_int8_t (*get_next_header)(esp_packet_t *this);
+       uint8_t (*get_next_header)(esp_packet_t *this);
 
        /**
         * Get the plaintext payload of this packet.
index 21dbd5e891c663a45009f9699c8e6323e09529c6..0fdd5d340f655bac8c503896e9eef7e5571ce494 100644 (file)
  * and unfortunately Android does not define a variant with BSD names.
  */
 struct tcphdr {
-       u_int16_t source;
-       u_int16_t dest;
-       u_int32_t seq;
-       u_int32_t ack_seq;
-       u_int16_t flags;
-       u_int16_t window;
-       u_int16_t check;
-       u_int16_t urg_ptr;
+       uint16_t source;
+       uint16_t dest;
+       uint32_t seq;
+       uint32_t ack_seq;
+       uint16_t flags;
+       uint16_t window;
+       uint16_t check;
+       uint16_t urg_ptr;
 } __attribute__((packed));
 
 /**
@@ -47,10 +47,10 @@ struct tcphdr {
  * the BSD member names, but this is simpler and more consistent with the above.
  */
 struct udphdr {
-       u_int16_t source;
-       u_int16_t dest;
-       u_int16_t len;
-       u_int16_t check;
+       uint16_t source;
+       uint16_t dest;
+       uint16_t len;
+       uint16_t check;
 } __attribute__((packed));
 
 typedef struct private_ip_packet_t private_ip_packet_t;
@@ -88,16 +88,16 @@ struct private_ip_packet_t {
        /**
         * IP version
         */
-       u_int8_t version;
+       uint8_t version;
 
        /**
         * Protocol|Next Header field
         */
-       u_int8_t next_header;
+       uint8_t next_header;
 
 };
 
-METHOD(ip_packet_t, get_version, u_int8_t,
+METHOD(ip_packet_t, get_version, uint8_t,
        private_ip_packet_t *this)
 {
        return this->version;
@@ -127,7 +127,7 @@ METHOD(ip_packet_t, get_payload, chunk_t,
        return this->payload;
 }
 
-METHOD(ip_packet_t, get_next_header, u_int8_t,
+METHOD(ip_packet_t, get_next_header, uint8_t,
        private_ip_packet_t *this)
 {
        return this->next_header;
@@ -151,8 +151,8 @@ METHOD(ip_packet_t, destroy, void,
 /**
  * Parse transport protocol header
  */
-static bool parse_transport_header(chunk_t packet, u_int8_t proto,
-                                                                  u_int16_t *sport, u_int16_t *dport)
+static bool parse_transport_header(chunk_t packet, uint8_t proto,
+                                                                  uint16_t *sport, uint16_t *dport)
 {
        switch (proto)
        {
@@ -196,8 +196,8 @@ static bool parse_transport_header(chunk_t packet, u_int8_t proto,
 ip_packet_t *ip_packet_create(chunk_t packet)
 {
        private_ip_packet_t *this;
-       u_int8_t version, next_header;
-       u_int16_t sport = 0, dport = 0;
+       uint8_t version, next_header;
+       uint16_t sport = 0, dport = 0;
        host_t *src, *dst;
        chunk_t payload;
 
@@ -296,19 +296,19 @@ failed:
 /**
  * Calculate the checksum for the pseudo IP header
  */
-static u_int16_t pseudo_header_checksum(host_t *src, host_t *dst,
-                                                                               u_int8_t proto, chunk_t payload)
+static uint16_t pseudo_header_checksum(host_t *src, host_t *dst,
+                                                                               uint8_t proto, chunk_t payload)
 {
        switch (src->get_family(src))
        {
                case AF_INET:
                {
                        struct __attribute__((packed)) {
-                               u_int32_t src;
-                               u_int32_t dst;
+                               uint32_t src;
+                               uint32_t dst;
                                u_char zero;
                                u_char proto;
-                               u_int16_t len;
+                               uint16_t len;
                        } pseudo = {
                                .proto = proto,
                                .len = htons(payload.len),
@@ -324,7 +324,7 @@ static u_int16_t pseudo_header_checksum(host_t *src, host_t *dst,
                        struct __attribute__((packed)) {
                                u_char src[16];
                                u_char dst[16];
-                               u_int32_t len;
+                               uint32_t len;
                                u_char zero[3];
                                u_char next_header;
                        } pseudo = {
@@ -344,10 +344,10 @@ static u_int16_t pseudo_header_checksum(host_t *src, host_t *dst,
 /**
  * Apply transport ports and calculate header checksums
  */
-static void fix_transport_header(host_t *src, host_t *dst, u_int8_t proto,
+static void fix_transport_header(host_t *src, host_t *dst, uint8_t proto,
                                                                 chunk_t payload)
 {
-       u_int16_t sum = 0, sport, dport;
+       uint16_t sum = 0, sport, dport;
 
        sport = src->get_port(src);
        dport = dst->get_port(dst);
@@ -407,7 +407,7 @@ static void fix_transport_header(host_t *src, host_t *dst, u_int8_t proto,
  * Described in header.
  */
 ip_packet_t *ip_packet_create_from_data(host_t *src, host_t *dst,
-                                                                               u_int8_t next_header, chunk_t data)
+                                                                               uint8_t next_header, chunk_t data)
 {
        chunk_t packet;
        int family;
index fa38eac2ccc69c4ea849386b7b84381521c0c7c1..1e1d619a298757a86d0bb592abd43d74f4c389bc 100644 (file)
@@ -37,7 +37,7 @@ struct ip_packet_t {
         *
         * @return                              ip version
         */
-       u_int8_t (*get_version)(ip_packet_t *this);
+       uint8_t (*get_version)(ip_packet_t *this);
 
        /**
         * Get the source address of this packet
@@ -58,7 +58,7 @@ struct ip_packet_t {
         *
         * @return                              protocol|next header field
         */
-       u_int8_t (*get_next_header)(ip_packet_t *this);
+       uint8_t (*get_next_header)(ip_packet_t *this);
 
        /**
         * Get the complete IP packet (including the header)
@@ -113,7 +113,7 @@ ip_packet_t *ip_packet_create(chunk_t packet);
  * @return                             ip_packet_t instance, or NULL if invalid
  */
 ip_packet_t *ip_packet_create_from_data(host_t *src, host_t *dst,
-                                                                               u_int8_t next_header, chunk_t data);
+                                                                               uint8_t next_header, chunk_t data);
 
 /**
  * Encode a UDP packet from the given data.
index f15f6fe5291cb6152cefd6b5a6fbe580f762219a..e784cedb39369bac1fdeab6ca0fabbe2af2ca1f5 100644 (file)
@@ -40,7 +40,7 @@ struct ipsec_event_listener_t {
         * @param dst                   destination address of expired SA
         * @param hard                  TRUE if this is a hard expire, FALSE otherwise
         */
-       void (*expire)(u_int8_t protocol, u_int32_t spi, host_t *dst, bool hard);
+       void (*expire)(uint8_t protocol, uint32_t spi, host_t *dst, bool hard);
 };
 
 #endif /** IPSEC_EVENT_LISTENER_H_ @}*/
index 048063053a78d85adcea1553c322fa7cd5870e54..94cc6527f2dae114aa1ec7b4cb7691543d845d24 100644 (file)
@@ -67,12 +67,12 @@ typedef struct {
        /**
         * Protocol of the SA
         */
-       u_int8_t protocol;
+       uint8_t protocol;
 
        /**
         * SPI of the SA, if any
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * SA destination address
@@ -135,7 +135,7 @@ static job_requeue_t handle_events(private_ipsec_event_relay_t *this)
 }
 
 METHOD(ipsec_event_relay_t, expire, void,
-       private_ipsec_event_relay_t *this, u_int8_t protocol, u_int32_t spi,
+       private_ipsec_event_relay_t *this, uint8_t protocol, uint32_t spi,
        host_t *dst, bool hard)
 {
        ipsec_event_t *event;
index 1dddf121bbaa5fab21ca12a2e6cfd39f05df9e6a..056352e84d14534c051ad6072b08e761be89b0a3 100644 (file)
@@ -43,7 +43,7 @@ struct ipsec_event_relay_t {
         * @param dst                   destination address of expired SA
         * @param hard                  TRUE for a hard expire, FALSE otherwise
         */
-       void (*expire)(ipsec_event_relay_t *this, u_int8_t protocol, u_int32_t spi,
+       void (*expire)(ipsec_event_relay_t *this, uint8_t protocol, uint32_t spi,
                                   host_t *dst, bool hard);
 
        /**
index 8407921acdc0b8b25443f5b28d881e1b2ed1217f..8077d3c8d83a86842bedae577e4a59b44fc175bc 100644 (file)
@@ -54,7 +54,7 @@ struct private_ipsec_policy_t {
        /**
         * If any of the two TS has a protocol selector we cache it here
         */
-       u_int8_t protocol;
+       uint8_t protocol;
 
        /**
         * Traffic direction
@@ -90,7 +90,7 @@ struct private_ipsec_policy_t {
 
 METHOD(ipsec_policy_t, match, bool,
        private_ipsec_policy_t *this, traffic_selector_t *src_ts,
-       traffic_selector_t *dst_ts, policy_dir_t direction, u_int32_t reqid,
+       traffic_selector_t *dst_ts, policy_dir_t direction, uint32_t reqid,
        mark_t mark, policy_priority_t priority)
 {
        return (this->direction == direction &&
@@ -104,7 +104,7 @@ METHOD(ipsec_policy_t, match, bool,
 METHOD(ipsec_policy_t, match_packet, bool,
        private_ipsec_policy_t *this, ip_packet_t *packet)
 {
-       u_int8_t proto = packet->get_next_header(packet);
+       uint8_t proto = packet->get_next_header(packet);
        host_t *src = packet->get_source(packet),
                   *dst = packet->get_destination(packet);
 
@@ -125,7 +125,7 @@ METHOD(ipsec_policy_t, get_destination_ts, traffic_selector_t*,
        return this->dst_ts;
 }
 
-METHOD(ipsec_policy_t, get_reqid, u_int32_t,
+METHOD(ipsec_policy_t, get_reqid, uint32_t,
        private_ipsec_policy_t *this)
 {
        return this->sa.reqid;
index 23a9ea99d21b8dfbe2dd4dc763682d7b750c523a..6d67a602ee930d8b2261353e3f74a2987b4b1803 100644 (file)
@@ -77,7 +77,7 @@ struct ipsec_policy_t {
         *
         * @return                      the reqid
         */
-       u_int32_t (*get_reqid)(ipsec_policy_t *this);
+       uint32_t (*get_reqid)(ipsec_policy_t *this);
 
        /**
         * Get another reference to this policy
@@ -99,7 +99,7 @@ struct ipsec_policy_t {
         */
        bool (*match)(ipsec_policy_t *this, traffic_selector_t *src_ts,
                                  traffic_selector_t *dst_ts, policy_dir_t direction,
-                                 u_int32_t reqid, mark_t mark, policy_priority_t priority);
+                                 uint32_t reqid, mark_t mark, policy_priority_t priority);
 
        /**
         * Check if this policy matches the given IP packet
index 3f312ffd25b63a2ee70c84a6ccfbd2a319bbb547..8570e07a8fb4af066085c3374878702521bdc6fd 100644 (file)
@@ -57,7 +57,7 @@ typedef struct {
        /**
         * Priority used to sort policies
         */
-       u_int32_t priority;
+       uint32_t priority;
 
        /**
         * The policy
@@ -70,13 +70,13 @@ typedef struct {
  * Calculate the pseudo-priority to sort policies.  This is the same algorithm
  * used by the NETLINK kernel interface (i.e. high priority -> low value).
  */
-static u_int32_t calculate_priority(policy_priority_t policy_priority,
+static uint32_t calculate_priority(policy_priority_t policy_priority,
                                                                        traffic_selector_t *src,
                                                                        traffic_selector_t *dst)
 {
-       u_int32_t priority = PRIO_BASE;
-       u_int16_t port;
-       u_int8_t mask, proto;
+       uint32_t priority = PRIO_BASE;
+       uint16_t port;
+       uint8_t mask, proto;
        host_t *net;
 
        switch (policy_priority)
@@ -182,7 +182,7 @@ METHOD(ipsec_policy_mgr_t, del_policy, status_t,
 {
        enumerator_t *enumerator;
        ipsec_policy_entry_t *current, *found = NULL;
-       u_int32_t priority;
+       uint32_t priority;
 
        if (type != POLICY_IPSEC || direction == POLICY_FWD)
        {       /* we ignore these policies as we currently have no use for them */
@@ -235,7 +235,7 @@ METHOD(ipsec_policy_mgr_t, flush_policies, status_t,
 
 METHOD(ipsec_policy_mgr_t, find_by_packet, ipsec_policy_t*,
        private_ipsec_policy_mgr_t *this, ip_packet_t *packet, bool inbound,
-       u_int32_t reqid)
+       uint32_t reqid)
 {
        enumerator_t *enumerator;
        ipsec_policy_entry_t *current;
index 0ea797e7aa8f6489508fed2dd2a50fe7699f115d..97e147e4005be229eb02ed48a2a9dc7cf5197c7b 100644 (file)
@@ -105,7 +105,7 @@ struct ipsec_policy_mgr_t {
         */
        ipsec_policy_t *(*find_by_packet)(ipsec_policy_mgr_t *this,
                                                                          ip_packet_t *packet, bool inbound,
-                                                                         u_int32_t reqid);
+                                                                         uint32_t reqid);
 
        /**
         * Destroy an ipsec_policy_mgr_t
index ee297a34b70f7592ff99c22cb9d95d48960b147a..af79707d19dd5d3a267d9e9f6d25d70657982ea6 100644 (file)
@@ -93,8 +93,8 @@ static job_requeue_t process_inbound(private_ipsec_processor_t *this)
        esp_packet_t *packet;
        ip_packet_t *ip_packet;
        ipsec_sa_t *sa;
-       u_int8_t next_header;
-       u_int32_t spi, reqid;
+       uint8_t next_header;
+       uint32_t spi, reqid;
 
        packet = (esp_packet_t*)this->inbound_queue->dequeue(this->inbound_queue);
 
index ccbbb1b3cc2380b9750958006d5a4c574dec151d..ba020658beb6f3285358dca883644c4efbf53477 100644 (file)
@@ -36,7 +36,7 @@ struct private_ipsec_sa_t {
        /**
         * SPI of this SA
         */
-       u_int32_t spi;
+       uint32_t spi;
 
        /**
         * Source address
@@ -51,12 +51,12 @@ struct private_ipsec_sa_t {
        /**
         * Protocol
         */
-       u_int8_t protocol;
+       uint8_t protocol;
 
        /**
         * Reqid of this SA
         */
-       u_int32_t reqid;
+       uint32_t reqid;
 
        /**
         * Lifetime configuration
@@ -90,9 +90,9 @@ struct private_ipsec_sa_t {
                /** last time of use */
                time_t time;
                /** number of packets processed */
-               u_int64_t packets;
+               uint64_t packets;
                /** number of bytes processed */
-               u_int64_t bytes;
+               uint64_t bytes;
        } use;
 
        /**
@@ -132,19 +132,19 @@ METHOD(ipsec_sa_t, set_destination, void,
        this->dst = addr->clone(addr);
 }
 
-METHOD(ipsec_sa_t, get_spi, u_int32_t,
+METHOD(ipsec_sa_t, get_spi, uint32_t,
        private_ipsec_sa_t *this)
 {
        return this->spi;
 }
 
-METHOD(ipsec_sa_t, get_reqid, u_int32_t,
+METHOD(ipsec_sa_t, get_reqid, uint32_t,
        private_ipsec_sa_t *this)
 {
        return this->reqid;
 }
 
-METHOD(ipsec_sa_t, get_protocol, u_int8_t,
+METHOD(ipsec_sa_t, get_protocol, uint8_t,
        private_ipsec_sa_t *this)
 {
        return this->protocol;
@@ -169,7 +169,7 @@ METHOD(ipsec_sa_t, get_esp_context, esp_context_t*,
 }
 
 METHOD(ipsec_sa_t, get_usestats, void,
-       private_ipsec_sa_t *this, u_int64_t *bytes, u_int64_t *packets,
+       private_ipsec_sa_t *this, uint64_t *bytes, uint64_t *packets,
        time_t *time)
 {
        if (bytes)
@@ -210,7 +210,7 @@ METHOD(ipsec_sa_t, expire, void,
 }
 
 METHOD(ipsec_sa_t, update_usestats, void,
-       private_ipsec_sa_t *this, u_int32_t bytes)
+       private_ipsec_sa_t *this, uint32_t bytes)
 {
        this->use.time = time_monotonic(NULL);
        this->use.packets++;
@@ -239,21 +239,21 @@ METHOD(ipsec_sa_t, update_usestats, void,
 }
 
 METHOD(ipsec_sa_t, match_by_spi_dst, bool,
-       private_ipsec_sa_t *this, u_int32_t spi, host_t *dst)
+       private_ipsec_sa_t *this, uint32_t spi, host_t *dst)
 {
        return this->spi == spi && this->dst->ip_equals(this->dst, dst) &&
                   !this->hard_expired;
 }
 
 METHOD(ipsec_sa_t, match_by_spi_src_dst, bool,
-       private_ipsec_sa_t *this, u_int32_t spi, host_t *src, host_t *dst)
+       private_ipsec_sa_t *this, uint32_t spi, host_t *src, host_t *dst)
 {
        return this->spi == spi && this->src->ip_equals(this->src, src) &&
                   this->dst->ip_equals(this->dst, dst);
 }
 
 METHOD(ipsec_sa_t, match_by_reqid, bool,
-       private_ipsec_sa_t *this, u_int32_t reqid, bool inbound)
+       private_ipsec_sa_t *this, uint32_t reqid, bool inbound)
 {
        return this->reqid == reqid && this->inbound == inbound &&
                   !this->hard_expired;
@@ -271,11 +271,11 @@ METHOD(ipsec_sa_t, destroy, void,
 /**
  * Described in header.
  */
-ipsec_sa_t *ipsec_sa_create(u_int32_t spi, host_t *src, host_t *dst,
-               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, bool encap, bool esn, bool inbound)
+ipsec_sa_t *ipsec_sa_create(uint32_t spi, host_t *src, host_t *dst,
+               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, bool encap, bool esn, bool inbound)
 {
        private_ipsec_sa_t *this;
 
index 8dad29ac5db2d70ef831b6ca10ddf626e8bbac33..36fe48379f4a5a11d5ae6758000e88df9568eacf 100644 (file)
@@ -70,21 +70,21 @@ struct ipsec_sa_t {
         *
         * @return                      SPI of this SA
         */
-       u_int32_t (*get_spi)(ipsec_sa_t *this);
+       uint32_t (*get_spi)(ipsec_sa_t *this);
 
        /**
         * Get the reqid of this SA
         *
         * @return                      reqid of this SA
         */
-       u_int32_t (*get_reqid)(ipsec_sa_t *this);
+       uint32_t (*get_reqid)(ipsec_sa_t *this);
 
        /**
         * Get the protocol (e.g. IPPROTO_ESP) of this SA
         *
         * @return                      protocol of this SA
         */
-       u_int8_t (*get_protocol)(ipsec_sa_t *this);
+       uint8_t (*get_protocol)(ipsec_sa_t *this);
 
        /**
         * Returns whether this SA is inbound or outbound
@@ -116,7 +116,7 @@ struct ipsec_sa_t {
         * @param packets       receives number of processed packets, or NULL
         * @param time          receives last use time of this SA, or NULL
         */
-       void (*get_usestats)(ipsec_sa_t *this, u_int64_t *bytes, u_int64_t *packets,
+       void (*get_usestats)(ipsec_sa_t *this, uint64_t *bytes, uint64_t *packets,
                                                 time_t *time);
 
        /**
@@ -124,7 +124,7 @@ struct ipsec_sa_t {
         *
         * @param bytes         length of packet processed
         */
-       void (*update_usestats)(ipsec_sa_t *this, u_int32_t bytes);
+       void (*update_usestats)(ipsec_sa_t *this, uint32_t bytes);
 
        /**
         * Expire this SA, soft or hard.
@@ -145,7 +145,7 @@ struct ipsec_sa_t {
         * @param dst           destination address
         * @return                      TRUE if this SA matches all parameters, FALSE otherwise
         */
-       bool (*match_by_spi_dst)(ipsec_sa_t *this, u_int32_t spi, host_t *dst);
+       bool (*match_by_spi_dst)(ipsec_sa_t *this, uint32_t spi, host_t *dst);
 
        /**
         * Check if this SA matches all given parameters
@@ -155,7 +155,7 @@ struct ipsec_sa_t {
         * @param dst           destination address
         * @return                      TRUE if this SA matches all parameters, FALSE otherwise
         */
-       bool (*match_by_spi_src_dst)(ipsec_sa_t *this, u_int32_t spi, host_t *src,
+       bool (*match_by_spi_src_dst)(ipsec_sa_t *this, uint32_t spi, host_t *src,
                                                                 host_t *dst);
 
        /**
@@ -167,7 +167,7 @@ struct ipsec_sa_t {
         * @param inbound       TRUE for inbound SA, FALSE for outbound
         * @return                      TRUE if this SA matches all parameters, FALSE otherwise
         */
-       bool (*match_by_reqid)(ipsec_sa_t *this, u_int32_t reqid, bool inbound);
+       bool (*match_by_reqid)(ipsec_sa_t *this, uint32_t reqid, bool inbound);
 
        /**
         * Destroy an ipsec_sa_t
@@ -199,12 +199,12 @@ struct ipsec_sa_t {
  * @param inbound              TRUE if this is an inbound SA, FALSE otherwise
  * @return                             the IPsec SA, or NULL if the creation failed
  */
-ipsec_sa_t *ipsec_sa_create(u_int32_t spi, host_t *src, host_t *dst,
-                                                       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,
+ipsec_sa_t *ipsec_sa_create(uint32_t spi, host_t *src, host_t *dst,
+                                                       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,
                                                        bool encap, bool esn, bool inbound);
 
 #endif /** IPSEC_SA_H_ @}*/
index 9d461f2c1318c66c28b21f6fe2cf14fffd7e2dd5..ec35c6ea36183231a4acd840acdccc8a64ba753a 100644 (file)
@@ -109,19 +109,19 @@ typedef struct {
        /**
         * 0 if this is a hard expire, otherwise the offset in s (soft->hard)
         */
-       u_int32_t hard_offset;
+       uint32_t hard_offset;
 
 } ipsec_sa_expired_t;
 
 /*
  * Used for the hash table of allocated SPIs
  */
-static bool spi_equals(u_int32_t *spi, u_int32_t *other_spi)
+static bool spi_equals(uint32_t *spi, uint32_t *other_spi)
 {
        return *spi == *other_spi;
 }
 
-static u_int spi_hash(u_int32_t *spi)
+static u_int spi_hash(uint32_t *spi)
 {
        return chunk_hash(chunk_from_thing(*spi));
 }
@@ -237,26 +237,26 @@ static bool match_entry_by_sa_ptr(ipsec_sa_entry_t *item, ipsec_sa_t *sa)
        return item->sa == sa;
 }
 
-static bool match_entry_by_spi_inbound(ipsec_sa_entry_t *item, u_int32_t *spi,
+static bool match_entry_by_spi_inbound(ipsec_sa_entry_t *item, uint32_t *spi,
                                                                           bool *inbound)
 {
        return item->sa->get_spi(item->sa) == *spi &&
                   item->sa->is_inbound(item->sa) == *inbound;
 }
 
-static bool match_entry_by_spi_src_dst(ipsec_sa_entry_t *item, u_int32_t *spi,
+static bool match_entry_by_spi_src_dst(ipsec_sa_entry_t *item, uint32_t *spi,
                                                                           host_t *src, host_t *dst)
 {
        return item->sa->match_by_spi_src_dst(item->sa, *spi, src, dst);
 }
 
 static bool match_entry_by_reqid_inbound(ipsec_sa_entry_t *item,
-                                                                                u_int32_t *reqid, bool *inbound)
+                                                                                uint32_t *reqid, bool *inbound)
 {
        return item->sa->match_by_reqid(item->sa, *reqid, *inbound);
 }
 
-static bool match_entry_by_spi_dst(ipsec_sa_entry_t *item, u_int32_t *spi,
+static bool match_entry_by_spi_dst(ipsec_sa_entry_t *item, uint32_t *spi,
                                                                   host_t *dst)
 {
        return item->sa->match_by_spi_dst(item->sa, *spi, dst);
@@ -299,7 +299,7 @@ static job_requeue_t sa_expired(ipsec_sa_expired_t *expired)
        if (this->sas->find_first(this->sas, (void*)match_entry_by_ptr,
                                                          NULL, expired->entry) == SUCCESS)
        {
-               u_int32_t hard_offset;
+               uint32_t hard_offset;
 
                hard_offset = expired->hard_offset;
                expired->entry->sa->expire(expired->entry->sa, hard_offset == 0);
@@ -328,7 +328,7 @@ static void schedule_expiration(private_ipsec_sa_mgr_t *this,
        lifetime_cfg_t *lifetime = entry->sa->get_lifetime(entry->sa);
        ipsec_sa_expired_t *expired;
        callback_job_t *job;
-       u_int32_t timeout;
+       uint32_t timeout;
 
        if (!lifetime->time.life)
        {       /* no expiration at all */
@@ -362,7 +362,7 @@ static void schedule_expiration(private_ipsec_sa_mgr_t *this,
 static void flush_allocated_spis(private_ipsec_sa_mgr_t *this)
 {
        enumerator_t *enumerator;
-       u_int32_t *current;
+       uint32_t *current;
 
        DBG2(DBG_ESP, "flushing allocated SPIs");
        enumerator = this->allocated_spis->create_enumerator(this->allocated_spis);
@@ -378,9 +378,9 @@ static void flush_allocated_spis(private_ipsec_sa_mgr_t *this)
 /**
  * Pre-allocate an SPI for an inbound SA
  */
-static bool allocate_spi(private_ipsec_sa_mgr_t *this, u_int32_t spi)
+static bool allocate_spi(private_ipsec_sa_mgr_t *this, uint32_t spi)
 {
-       u_int32_t *spi_alloc;
+       uint32_t *spi_alloc;
 
        if (this->allocated_spis->get(this->allocated_spis, &spi) ||
                this->sas->find_first(this->sas, (void*)match_entry_by_spi_inbound,
@@ -388,17 +388,17 @@ static bool allocate_spi(private_ipsec_sa_mgr_t *this, u_int32_t spi)
        {
                return FALSE;
        }
-       spi_alloc = malloc_thing(u_int32_t);
+       spi_alloc = malloc_thing(uint32_t);
        *spi_alloc = spi;
        this->allocated_spis->put(this->allocated_spis, spi_alloc, spi_alloc);
        return TRUE;
 }
 
 METHOD(ipsec_sa_mgr_t, get_spi, status_t,
-       private_ipsec_sa_mgr_t *this, host_t *src, host_t *dst, u_int8_t protocol,
-       u_int32_t *spi)
+       private_ipsec_sa_mgr_t *this, host_t *src, host_t *dst, uint8_t protocol,
+       uint32_t *spi)
 {
-       u_int32_t spi_new;
+       uint32_t spi_new;
 
        this->mutex->lock(this->mutex);
        if (!this->rng)
@@ -415,7 +415,7 @@ METHOD(ipsec_sa_mgr_t, get_spi, status_t,
        do
        {
                if (!this->rng->get_bytes(this->rng, sizeof(spi_new),
-                                                                (u_int8_t*)&spi_new))
+                                                                (uint8_t*)&spi_new))
                {
                        this->mutex->unlock(this->mutex);
                        DBG1(DBG_ESP, "failed to allocate SPI");
@@ -435,11 +435,11 @@ METHOD(ipsec_sa_mgr_t, get_spi, status_t,
 }
 
 METHOD(ipsec_sa_mgr_t, add_sa, status_t,
-       private_ipsec_sa_mgr_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, bool initiator, bool encap, bool esn, bool inbound,
+       private_ipsec_sa_mgr_t *this, host_t *src, host_t *dst, uint32_t spi,
+       uint8_t protocol, uint32_t reqid,       mark_t mark, uint32_t tfc,
+       lifetime_cfg_t *lifetime, uint16_t enc_alg, chunk_t enc_key,
+       uint16_t int_alg, chunk_t int_key, ipsec_mode_t mode, uint16_t ipcomp,
+       uint16_t cpi, bool initiator, bool encap, bool esn, bool inbound,
        bool update)
 {
        ipsec_sa_entry_t *entry;
@@ -465,7 +465,7 @@ METHOD(ipsec_sa_mgr_t, add_sa, status_t,
 
        if (update)
        {       /* remove any pre-allocated SPIs */
-               u_int32_t *spi_alloc;
+               uint32_t *spi_alloc;
 
                spi_alloc = this->allocated_spis->remove(this->allocated_spis, &spi);
                free(spi_alloc);
@@ -489,8 +489,8 @@ METHOD(ipsec_sa_mgr_t, add_sa, status_t,
 }
 
 METHOD(ipsec_sa_mgr_t, update_sa, status_t,
-       private_ipsec_sa_mgr_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_ipsec_sa_mgr_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)
 {
        ipsec_sa_entry_t *entry = NULL;
@@ -528,8 +528,8 @@ METHOD(ipsec_sa_mgr_t, update_sa, status_t,
 
 METHOD(ipsec_sa_mgr_t, query_sa, status_t,
        private_ipsec_sa_mgr_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)
 {
        ipsec_sa_entry_t *entry = NULL;
 
@@ -549,8 +549,8 @@ METHOD(ipsec_sa_mgr_t, query_sa, status_t,
 }
 
 METHOD(ipsec_sa_mgr_t, del_sa, status_t,
-       private_ipsec_sa_mgr_t *this, host_t *src, host_t *dst, u_int32_t spi,
-       u_int8_t protocol, u_int16_t cpi, mark_t mark)
+       private_ipsec_sa_mgr_t *this, host_t *src, host_t *dst, uint32_t spi,
+       uint8_t protocol, uint16_t cpi, mark_t mark)
 {
        ipsec_sa_entry_t *current, *found = NULL;
        enumerator_t *enumerator;
@@ -583,7 +583,7 @@ METHOD(ipsec_sa_mgr_t, del_sa, status_t,
 }
 
 METHOD(ipsec_sa_mgr_t, checkout_by_reqid, ipsec_sa_t*,
-       private_ipsec_sa_mgr_t *this, u_int32_t reqid, bool inbound)
+       private_ipsec_sa_mgr_t *this, uint32_t reqid, bool inbound)
 {
        ipsec_sa_entry_t *entry;
        ipsec_sa_t *sa = NULL;
@@ -600,7 +600,7 @@ METHOD(ipsec_sa_mgr_t, checkout_by_reqid, ipsec_sa_t*,
 }
 
 METHOD(ipsec_sa_mgr_t, checkout_by_spi, ipsec_sa_t*,
-       private_ipsec_sa_mgr_t *this, u_int32_t spi, host_t *dst)
+       private_ipsec_sa_mgr_t *this, uint32_t spi, host_t *dst)
 {
        ipsec_sa_entry_t *entry;
        ipsec_sa_t *sa = NULL;
index a57eab4e705d71570db86320b587776edeaee360..708af1fdab4a9127cce33459cfac364f3c482cf9 100644 (file)
@@ -49,7 +49,7 @@ struct ipsec_sa_mgr_t {
         * @return                              SUCCESS of operation successful
         */
        status_t (*get_spi)(ipsec_sa_mgr_t *this, host_t *src, host_t *dst,
-                                               u_int8_t protocol, u_int32_t *spi);
+                                               uint8_t protocol, uint32_t *spi);
 
        /**
         * Add a new SA
@@ -77,11 +77,11 @@ struct ipsec_sa_mgr_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*add_sa)(ipsec_sa_mgr_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, bool initiator, bool encap, bool esn,
+                                          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, bool initiator, bool encap, bool esn,
                                           bool inbound, bool update);
 
        /**
@@ -100,7 +100,7 @@ struct ipsec_sa_mgr_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*update_sa)(ipsec_sa_mgr_t *this,
-                                                 u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+                                                 uint32_t spi, uint8_t protocol, uint16_t cpi,
                                                  host_t *src, host_t *dst,
                                                  host_t *new_src, host_t *new_dst,
                                                  bool encap, bool new_encap, mark_t mark);
@@ -119,8 +119,8 @@ struct ipsec_sa_mgr_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*query_sa)(ipsec_sa_mgr_t *this, host_t *src, host_t *dst,
-                                                u_int32_t spi, u_int8_t protocol, mark_t mark,
-                                                u_int64_t *bytes, u_int64_t *packets, time_t *time);
+                                                uint32_t spi, uint8_t protocol, mark_t mark,
+                                                uint64_t *bytes, uint64_t *packets, time_t *time);
 
        /**
         * Delete a previously added SA
@@ -134,7 +134,7 @@ struct ipsec_sa_mgr_t {
         * @return                              SUCCESS if operation completed
         */
        status_t (*del_sa)(ipsec_sa_mgr_t *this, host_t *src, host_t *dst,
-                                          u_int32_t spi, u_int8_t protocol, u_int16_t cpi,
+                                          uint32_t spi, uint8_t protocol, uint16_t cpi,
                                           mark_t mark);
 
        /**
@@ -159,7 +159,7 @@ struct ipsec_sa_mgr_t {
         * @param dst                   destination address (e.g. of an inbound packet)
         * @return                              the matching IPsec SA, or NULL if none is found
         */
-       ipsec_sa_t *(*checkout_by_spi)(ipsec_sa_mgr_t *this, u_int32_t spi,
+       ipsec_sa_t *(*checkout_by_spi)(ipsec_sa_mgr_t *this, uint32_t spi,
                                                                   host_t *dst);
 
        /**
@@ -177,7 +177,7 @@ struct ipsec_sa_mgr_t {
         * @param inbound               TRUE for an inbound SA, FALSE for an outbound SA
         * @return                              the matching IPsec SA, or NULL if none is found
         */
-       ipsec_sa_t *(*checkout_by_reqid)(ipsec_sa_mgr_t *this, u_int32_t reqid,
+       ipsec_sa_t *(*checkout_by_reqid)(ipsec_sa_mgr_t *this, uint32_t reqid,
                                                                         bool inbound);
 
        /**
index 31dc2ac7bae2e2c634394259e2571ec1a07f9f3e..67099deb2490a59a60020a3fd8b9feaf85803d93 100644 (file)
@@ -27,7 +27,7 @@ METHOD(aead_t, get_iv_gen, iv_gen_t*,
 }
 
 METHOD(iv_gen_t, get_iv, bool,
-       iv_gen_t *this, u_int64_t seq, size_t size, u_int8_t *buffer)
+       iv_gen_t *this, uint64_t seq, size_t size, uint8_t *buffer)
 {
        if (size != 8)
        {
@@ -38,7 +38,7 @@ METHOD(iv_gen_t, get_iv, bool,
 }
 
 METHOD(iv_gen_t, allocate_iv, bool,
-       iv_gen_t *this, u_int64_t seq, size_t size, chunk_t *chunk)
+       iv_gen_t *this, uint64_t seq, size_t size, chunk_t *chunk)
 {
        if (size != 8)
        {
@@ -58,7 +58,7 @@ START_TEST(test_chapoly)
        esp_packet_t *esp;
        esp_context_t *ctx;
        chunk_t data, exp;
-       u_int32_t seq = 0;
+       uint32_t seq = 0;
 
        icmp = ip_packet_create(chunk_clone(chunk_from_chars(
                                                                0x45,0x00,0x00,0x54,0xa6,0xf2,0x00,0x00,
index 3c1f874d7d992992fc13d14873e9af424392e11e..1b136a7f0297112282f8372f005676010a68a9c9 100644 (file)
@@ -87,12 +87,12 @@ static bio_reader_t* read_tls(tls_socket_t *tls, size_t len)
 /**
  * Read a PT-TLS message, return header data
  */
-bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
-                                                 u_int32_t *type, u_int32_t *identifier)
+bio_reader_t* pt_tls_read(tls_socket_t *tls, uint32_t *vendor,
+                                                 uint32_t *type, uint32_t *identifier)
 {
        bio_reader_t *reader;
-       u_int32_t len;
-       u_int8_t reserved;
+       uint32_t len;
+       uint8_t reserved;
 
        reader = read_tls(tls, PT_TLS_HEADER_LEN);
        if (!reader)
@@ -135,7 +135,7 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
  * Prepend a PT-TLS header to a writer, send data, destroy writer
  */
 bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type,
-                                 u_int32_t identifier, chunk_t data)
+                                 uint32_t identifier, chunk_t data)
 {
        bio_writer_t *writer;
        chunk_t out;
index b2f3198a4af15497d1b0deb548fd25a837510cd5..2cee8e10f9fe6ff1813e293fdca7fa2a153cdbc1 100644 (file)
@@ -105,8 +105,8 @@ enum pt_tls_auth_t {
  * @param identifier   receives Message Identifer
  * @return                             reader over message value, NULL on error
  */
-bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
-                                                 u_int32_t *type, u_int32_t *identifier);
+bio_reader_t* pt_tls_read(tls_socket_t *tls, uint32_t *vendor,
+                                                 uint32_t *type, uint32_t *identifier);
 
 /**
  * Prepend a PT-TLS header to a writer, send data, destroy writer.
@@ -118,7 +118,7 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
  * @return                             TRUE if data written successfully
  */
 bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type,
-                                 u_int32_t identifier, chunk_t data);
+                                 uint32_t identifier, chunk_t data);
 
 /**
  * Dummy libpttls initialization function needed for integrity test
index bd5b96f7000706cf001e5b4a0f57605d31d836d5..1679188112e968b962ff75b5ef20d1e9ae74f9dd 100644 (file)
@@ -60,7 +60,7 @@ struct private_pt_tls_client_t {
        /**
         * Current PT-TLS message identifier
         */
-       u_int32_t identifier;
+       uint32_t identifier;
 };
 
 /**
@@ -101,8 +101,8 @@ static bool negotiate_version(private_pt_tls_client_t *this)
 {
        bio_writer_t *writer;
        bio_reader_t *reader;
-       u_int32_t type, vendor, identifier, reserved;
-       u_int8_t version;
+       uint32_t type, vendor, identifier, reserved;
+       uint8_t version;
        bool res;
 
        DBG1(DBG_TNC, "sending offer for PT-TLS version %d", PT_TLS_VERSION);
@@ -143,8 +143,8 @@ static bool negotiate_version(private_pt_tls_client_t *this)
  */
 static status_t do_sasl(private_pt_tls_client_t *this, sasl_mechanism_t *sasl)
 {
-       u_int32_t type, vendor, identifier;
-       u_int8_t result;
+       uint32_t type, vendor, identifier;
+       uint8_t result;
        bio_reader_t *reader;
        bio_writer_t *writer;
        chunk_t data;
@@ -277,8 +277,8 @@ static status_t select_and_do_sasl(private_pt_tls_client_t *this)
 {
        bio_reader_t *reader;
        sasl_mechanism_t *sasl = NULL;
-       u_int32_t type, vendor, identifier;
-       u_int8_t len;
+       uint32_t type, vendor, identifier;
+       uint8_t len;
        chunk_t chunk;
        char buf[21];
        status_t status = NEED_MORE;
@@ -364,7 +364,7 @@ static bool assess(private_pt_tls_client_t *this, tls_t *tnccs)
                size_t buflen = PT_TLS_MAX_MESSAGE_LEN;
                char buf[buflen];
                bio_reader_t *reader;
-               u_int32_t vendor, type, identifier;
+               uint32_t vendor, type, identifier;
                chunk_t data;
 
                switch (tnccs->build(tnccs, buf, &buflen, &msglen))
index cedc2632c34a12f723211bb7cbda0fe603967e9b..a1c645319bc7c17f990aee34ccb132439241998a 100644 (file)
@@ -55,7 +55,7 @@ struct private_pt_tls_server_t {
        /**
         * Message Identifier
         */
-       u_int32_t identifier;
+       uint32_t identifier;
 
        /**
         * TNCCS protocol handler, implemented as tls_t
@@ -71,8 +71,8 @@ static bool negotiate_version(private_pt_tls_server_t *this)
 {
        bio_reader_t *reader;
        bio_writer_t *writer;
-       u_int32_t vendor, type, identifier;
-       u_int8_t reserved, vmin, vmax, vpref;
+       uint32_t vendor, type, identifier;
+       uint8_t reserved, vmin, vmax, vpref;
        bool res;
 
        reader = pt_tls_read(this->tls, &vendor, &type, &identifier);
@@ -161,7 +161,7 @@ static status_t process_sasl(private_pt_tls_server_t *this,
 static status_t read_sasl(private_pt_tls_server_t *this,
                                                  sasl_mechanism_t *sasl)
 {
-       u_int32_t vendor, type, identifier;
+       uint32_t vendor, type, identifier;
        bio_reader_t *reader;
        status_t status;
        chunk_t data;
@@ -260,11 +260,11 @@ static bool send_sasl_mechs(private_pt_tls_server_t *this)
 static status_t read_sasl_mech_selection(private_pt_tls_server_t *this,
                                                                                 sasl_mechanism_t **out)
 {
-       u_int32_t vendor, type, identifier;
+       uint32_t vendor, type, identifier;
        sasl_mechanism_t *sasl;
        bio_reader_t *reader;
        chunk_t chunk;
-       u_int8_t len;
+       uint8_t len;
        char buf[21];
 
        reader = pt_tls_read(this->tls, &vendor, &type, &identifier);
@@ -406,7 +406,7 @@ static status_t assess(private_pt_tls_server_t *this, tls_t *tnccs)
        size_t buflen = PT_TLS_MAX_MESSAGE_LEN;
        char buf[buflen];
        bio_reader_t *reader;
-       u_int32_t vendor, type, identifier;
+       uint32_t vendor, type, identifier;
        chunk_t data;
        status_t status;
 
index 663173411e36a9617dce1e57a7d67197137eb25f..521cd1dec682ad04da40dd00a326cb0a7785dd17 100644 (file)
@@ -200,7 +200,7 @@ METHOD(radius_config_t, destroy, void,
  * See header
  */
 radius_config_t *radius_config_create(char *name, char *address,
-                                                                         u_int16_t auth_port, u_int16_t acct_port,
+                                                                         uint16_t auth_port, uint16_t acct_port,
                                                                          char *nas_identifier, char *secret,
                                                                          int sockets, int preference,
                                                                          u_int tries, double timeout, double base)
index c0ff057c89f13539aa06c83b340d395dccfee022..c9a2f63bdb1d5cea6b90cec80eed8457fe309847 100644 (file)
@@ -118,7 +118,7 @@ struct radius_config_t {
  * @param base                         base to calculate retransmission timeout
  */
 radius_config_t *radius_config_create(char *name, char *address,
-                                                                         u_int16_t auth_port, u_int16_t acct_port,
+                                                                         uint16_t auth_port, uint16_t acct_port,
                                                                          char *nas_identifier, char *secret,
                                                                          int sockets, int preference,
                                                                          u_int tries, double timeout, double base);
index 01c8298411c749732d06459a72ab07e4fc8c5347..9705d3b5377ab01a4b60e867a1589aa4d00f3b98 100644 (file)
@@ -28,15 +28,15 @@ typedef struct rattr_t rattr_t;
  */
 struct rmsg_t {
        /** message code, radius_message_code_t */
-       u_int8_t code;
+       uint8_t code;
        /** message identifier */
-       u_int8_t identifier;
+       uint8_t identifier;
        /** length of Code, Identifier, Length, Authenticator and Attributes */
-       u_int16_t length;
+       uint16_t length;
        /** message authenticator, MD5 hash */
-       u_int8_t authenticator[HASH_SIZE_MD5];
+       uint8_t authenticator[HASH_SIZE_MD5];
        /** variable list of packed attributes */
-       u_int8_t attributes[];
+       uint8_t attributes[];
 } __attribute__((packed));
 
 /**
@@ -44,11 +44,11 @@ struct rmsg_t {
  */
 struct rattr_t {
        /** attribute type, radius_attribute_type_t */
-       u_int8_t type;
+       uint8_t type;
        /** length of the attriubte, including the Type, Length and Value fields */
-       u_int8_t length;
+       uint8_t length;
        /** variable length attribute value */
-       u_int8_t value[];
+       uint8_t value[];
 } __attribute__((packed));
 
 /**
@@ -293,7 +293,7 @@ typedef struct {
        /** inner attribute enumerator */
        enumerator_t *inner;
        /** current vendor ID */
-       u_int32_t vendor;
+       uint32_t vendor;
        /** reader for current vendor ID */
        bio_reader_t *reader;
 } vendor_enumerator_t;
@@ -303,7 +303,7 @@ METHOD(enumerator_t, vendor_enumerate, bool,
 {
        chunk_t inner_data;
        int inner_type;
-       u_int8_t type8, len;
+       uint8_t type8, len;
 
        while (TRUE)
        {
@@ -449,7 +449,7 @@ METHOD(radius_message_t, crypt, bool,
 }
 
 METHOD(radius_message_t, sign, bool,
-       private_radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+       private_radius_message_t *this, uint8_t *req_auth, chunk_t secret,
        hasher_t *hasher, signer_t *signer, rng_t *rng, bool msg_auth)
 {
        if (rng)
@@ -516,7 +516,7 @@ METHOD(radius_message_t, sign, bool,
 }
 
 METHOD(radius_message_t, verify, bool,
-       private_radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+       private_radius_message_t *this, uint8_t *req_auth, chunk_t secret,
        hasher_t *hasher, signer_t *signer)
 {
        char buf[HASH_SIZE_MD5], res_auth[HASH_SIZE_MD5];
@@ -606,19 +606,19 @@ METHOD(radius_message_t, get_code, radius_message_code_t,
        return this->msg->code;
 }
 
-METHOD(radius_message_t, get_identifier, u_int8_t,
+METHOD(radius_message_t, get_identifier, uint8_t,
        private_radius_message_t *this)
 {
        return this->msg->identifier;
 }
 
 METHOD(radius_message_t, set_identifier, void,
-       private_radius_message_t *this, u_int8_t identifier)
+       private_radius_message_t *this, uint8_t identifier)
 {
        this->msg->identifier = identifier;
 }
 
-METHOD(radius_message_t, get_authenticator, u_int8_t*,
+METHOD(radius_message_t, get_authenticator, uint8_t*,
        private_radius_message_t *this)
 {
        return this->msg->authenticator;
index e6cb40b18546e29f303dcf94b9c0e703f1253023..c72773312e7feaa51f1513920514af0d7b0193f9 100644 (file)
@@ -241,21 +241,21 @@ struct radius_message_t {
         *
         * @return                              message identifier
         */
-       u_int8_t (*get_identifier)(radius_message_t *this);
+       uint8_t (*get_identifier)(radius_message_t *this);
 
        /**
         * Set the message identifier.
         *
         * @param identifier    message identifier
         */
-       void (*set_identifier)(radius_message_t *this, u_int8_t identifier);
+       void (*set_identifier)(radius_message_t *this, uint8_t identifier);
 
        /**
         * Get the 16 byte authenticator.
         *
         * @return                              pointer to the Authenticator field
         */
-       u_int8_t* (*get_authenticator)(radius_message_t *this);
+       uint8_t* (*get_authenticator)(radius_message_t *this);
 
        /**
         * Get the RADIUS message in its encoded form.
@@ -275,7 +275,7 @@ struct radius_message_t {
         * @param msg_auth              calculate and add Message-Authenticator
         * @return                              TRUE if signed successfully
         */
-       bool (*sign)(radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+       bool (*sign)(radius_message_t *this, uint8_t *req_auth, chunk_t secret,
                                 hasher_t *hasher, signer_t *signer, rng_t *rng, bool msg_auth);
 
        /**
@@ -286,7 +286,7 @@ struct radius_message_t {
         * @param signer                HMAC-MD5 signer with secret set
         * @param hasher                MD5 hasher
         */
-       bool (*verify)(radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+       bool (*verify)(radius_message_t *this, uint8_t *req_auth, chunk_t secret,
                                   hasher_t *hasher, signer_t *signer);
 
        /**
index 1b7a732ec802188054a84e1d0e2e3d06445d9024..5006ca9d09c4d5a0eb27986d71f0459c44f81fd3 100644 (file)
 typedef struct mppe_key_t mppe_key_t;
 
 struct mppe_key_t {
-       u_int32_t id;
-       u_int8_t type;
-       u_int8_t length;
-       u_int16_t salt;
-       u_int8_t key[];
+       uint32_t id;
+       uint8_t type;
+       uint8_t length;
+       uint16_t salt;
+       uint8_t key[];
 } __attribute__((packed));
 
 #endif /** RADIUS_MPPE_H_ @}*/
index 065f2644ebcb4049bec644a25eea714ee3b5af73..115be79fb1fae119d02eba8cfd085ffef2051855 100644 (file)
@@ -60,7 +60,7 @@ struct private_radius_socket_t {
        /**
         * Server port for authentication
         */
-       u_int16_t auth_port;
+       uint16_t auth_port;
 
        /**
         * socket file descriptor for authentication
@@ -70,7 +70,7 @@ struct private_radius_socket_t {
        /**
         * Server port for accounting
         */
-       u_int16_t acct_port;
+       uint16_t acct_port;
 
        /**
         * socket file descriptor for accounting
@@ -85,7 +85,7 @@ struct private_radius_socket_t {
        /**
         * current RADIUS identifier
         */
-       u_int8_t identifier;
+       uint8_t identifier;
 
        /**
         * hasher to use for response verification
@@ -127,7 +127,7 @@ struct private_radius_socket_t {
  * Check or establish RADIUS connection
  */
 static bool check_connection(private_radius_socket_t *this,
-                                                        int *fd, u_int16_t port)
+                                                        int *fd, uint16_t port)
 {
        if (*fd == -1)
        {
@@ -166,7 +166,7 @@ static bool check_connection(private_radius_socket_t *this,
 /**
  * Receive the response to the message with the given ID
  */
-static status_t receive_response(int fd, int timeout, u_int8_t id,
+static status_t receive_response(int fd, int timeout, uint8_t id,
                                                                 radius_message_t **response)
 {
        radius_message_t *msg;
@@ -224,7 +224,7 @@ METHOD(radius_socket_t, request, radius_message_t*,
        radius_message_t *response;
        chunk_t data;
        int *fd, retransmit = 0, timeout;
-       u_int16_t port;
+       uint16_t port;
        rng_t *rng = NULL;
 
        if (request->get_code(request) == RMC_ACCOUNTING_REQUEST)
@@ -299,7 +299,7 @@ METHOD(radius_socket_t, request, radius_message_t*,
 /**
  * Decrypt a MS-MPPE-Send/Recv-Key
  */
-static chunk_t decrypt_mppe_key(private_radius_socket_t *this, u_int16_t salt,
+static chunk_t decrypt_mppe_key(private_radius_socket_t *this, uint16_t salt,
                                                                chunk_t C, radius_message_t *request)
 {
        chunk_t decrypted;
@@ -375,8 +375,8 @@ METHOD(radius_socket_t, destroy, void,
 /**
  * See header
  */
-radius_socket_t *radius_socket_create(char *address, u_int16_t auth_port,
-                                                                         u_int16_t acct_port, chunk_t secret,
+radius_socket_t *radius_socket_create(char *address, uint16_t auth_port,
+                                                                         uint16_t acct_port, chunk_t secret,
                                                                          u_int tries, double timeout, double base)
 {
        private_radius_socket_t *this;
index 84b146a7d062e7360d36ad7527050389dc3715a7..acc6c368fbcfd75408c1aa1c47b0dd7aaf963cf0 100644 (file)
@@ -96,8 +96,8 @@ struct radius_socket_t {
  * @param timeout      retransmission timeout
  * @param base         base to calculate retransmission timeout
  */
-radius_socket_t *radius_socket_create(char *address, u_int16_t auth_port,
-                                                                         u_int16_t acct_port, chunk_t secret,
+radius_socket_t *radius_socket_create(char *address, uint16_t auth_port,
+                                                                         uint16_t acct_port, chunk_t secret,
                                                                          u_int tries, double timeout, double base);
 
 #endif /** RADIUS_SOCKET_H_ @}*/
index 52cb3251419181cbad2acfa03904d4f5385333e7..da98b172fa39241ca5ab505051980feab8abfc45 100644 (file)
@@ -112,7 +112,7 @@ struct simaka_card_t {
         */
        void (*set_reauth)(simaka_card_t *this, identification_t *id,
                                           identification_t *next, char mk[HASH_SIZE_SHA1],
-                                          u_int16_t counter);
+                                          uint16_t counter);
 
        /**
         * Retrieve parameters for fast reauthentication stored via set_reauth().
@@ -123,7 +123,7 @@ struct simaka_card_t {
         * @return                      fast reauthentication identity, NULL if not found
         */
        identification_t* (*get_reauth)(simaka_card_t *this, identification_t *id,
-                                                                       char mk[HASH_SIZE_SHA1], u_int16_t *counter);
+                                                                       char mk[HASH_SIZE_SHA1], uint16_t *counter);
 };
 
 #endif /** SIMAKA_CARD_H_ @}*/
index e85dd660bb0616f1d51808c8eae1be45dacefb0b..47f1f6f8ae81bfdaba39c57146c81e07a82051c8 100644 (file)
@@ -207,7 +207,7 @@ METHOD(simaka_manager_t, card_get_pseudonym, identification_t*,
 
 METHOD(simaka_manager_t, card_set_reauth, void,
        private_simaka_manager_t *this, identification_t *id, identification_t *next,
-       char mk[HASH_SIZE_SHA1], u_int16_t counter)
+       char mk[HASH_SIZE_SHA1], uint16_t counter)
 {
        enumerator_t *enumerator;
        simaka_card_t *card;
@@ -227,7 +227,7 @@ METHOD(simaka_manager_t, card_set_reauth, void,
 
 METHOD(simaka_manager_t, card_get_reauth, identification_t*,
        private_simaka_manager_t *this, identification_t *id, char mk[HASH_SIZE_SHA1],
-       u_int16_t *counter)
+       uint16_t *counter)
 {
        enumerator_t *enumerator;
        simaka_card_t *card;
@@ -393,7 +393,7 @@ METHOD(simaka_manager_t, provider_gen_pseudonym, identification_t*,
 
 METHOD(simaka_manager_t, provider_is_reauth, identification_t*,
        private_simaka_manager_t *this, identification_t *id, char mk[HASH_SIZE_SHA1],
-       u_int16_t *counter)
+       uint16_t *counter)
 {
        enumerator_t *enumerator;
        simaka_provider_t *provider;
index bdd50296e20f243b48777a98a232b68ffb3647b9..045bed4d5def96a38a4d393faba26cc3041444b6 100644 (file)
@@ -131,7 +131,7 @@ struct simaka_manager_t {
         */
        void (*card_set_reauth)(simaka_manager_t *this, identification_t *id,
                                                        identification_t *next, char mk[HASH_SIZE_SHA1],
-                                                       u_int16_t counter);
+                                                       uint16_t counter);
 
        /**
         * Retrieve fast reauthentication parameters from one of the registered cards.
@@ -143,7 +143,7 @@ struct simaka_manager_t {
         */
        identification_t* (*card_get_reauth)(simaka_manager_t *this,
                                                                identification_t *id, char mk[HASH_SIZE_SHA1],
-                                                               u_int16_t *counter);
+                                                               uint16_t *counter);
 
        /**
         * Register a triplet provider (server) at the manager.
@@ -228,7 +228,7 @@ struct simaka_manager_t {
         */
        identification_t* (*provider_is_reauth)(simaka_manager_t *this,
                                                                identification_t *id, char mk[HASH_SIZE_SHA1],
-                                                               u_int16_t *counter);
+                                                               uint16_t *counter);
 
        /**
         * Generate a fast reauth id using one of the registered providers.
index 7dd15480b31ce93f015977a13d6dbadb148e21da..234d7ef2a02511fc954d3ac19e4bc2ac564c746f 100644 (file)
@@ -30,17 +30,17 @@ typedef struct attr_t attr_t;
  */
 struct hdr_t {
        /** EAP code (REQUEST/RESPONSE) */
-       u_int8_t code;
+       uint8_t code;
        /** unique message identifier */
-       u_int8_t identifier;
+       uint8_t identifier;
        /** length of whole message */
-       u_int16_t length;
+       uint16_t length;
        /** EAP type => EAP_SIM/EAP_AKA */
-       u_int8_t type;
+       uint8_t type;
        /** SIM subtype */
-       u_int8_t subtype;
+       uint8_t subtype;
        /** reserved bytes */
-       u_int16_t reserved;
+       uint16_t reserved;
 } __attribute__((__packed__));
 
 /**
@@ -48,9 +48,9 @@ struct hdr_t {
  */
 struct attr_hdr_t {
        /** attribute type */
-       u_int8_t type;
+       uint8_t type;
        /** attibute length */
-       u_int8_t length;
+       uint8_t length;
 } __attribute__((__packed__));
 
 /**
@@ -204,7 +204,7 @@ METHOD(simaka_message_t, is_request, bool,
        return this->hdr->code == EAP_REQUEST;
 }
 
-METHOD(simaka_message_t, get_identifier, u_int8_t,
+METHOD(simaka_message_t, get_identifier, uint8_t,
        private_simaka_message_t *this)
 {
        return this->hdr->identifier;
@@ -366,7 +366,7 @@ static bool parse_attributes(private_simaka_message_t *this, chunk_t in)
                        case AT_IDENTITY:
                        case AT_VERSION_LIST:
                        {
-                               u_int16_t len;
+                               uint16_t len;
 
                                if (hdr->length < 1 || in.len < 4)
                                {
@@ -610,7 +610,7 @@ METHOD(simaka_message_t, generate, bool,
        chunk_t out, encr, data, *target, mac = chunk_empty;
        simaka_attribute_t type;
        attr_hdr_t *hdr;
-       u_int16_t len;
+       uint16_t len;
        signer_t *signer;
 
        call_hook(this, FALSE, TRUE);
@@ -684,7 +684,7 @@ METHOD(simaka_message_t, generate, bool,
                        case AT_VERSION_LIST:
                        case AT_RES:
                        {
-                               u_int16_t len, padding;
+                               uint16_t len, padding;
 
                                len = htons(data.len);
                                if (type == AT_RES)
@@ -912,7 +912,7 @@ simaka_message_t *simaka_message_create_from_payload(chunk_t data,
 /**
  * See header.
  */
-simaka_message_t *simaka_message_create(bool request, u_int8_t identifier,
+simaka_message_t *simaka_message_create(bool request, uint8_t identifier,
                                                                        eap_type_t type, simaka_subtype_t subtype,
                                                                        simaka_crypto_t *crypto)
 {
index 9e2c7dea95bc126e8beba809b6f616cc74650623..2393d3450d34ba37fce9e1ed9de0b165a3acd039 100644 (file)
@@ -176,7 +176,7 @@ struct simaka_message_t {
         *
         * @return                      EAP message identifier
         */
-       u_int8_t (*get_identifier)(simaka_message_t *this);
+       uint8_t (*get_identifier)(simaka_message_t *this);
 
        /**
         * Get the EAP type of the message.
@@ -257,7 +257,7 @@ struct simaka_message_t {
  * @param crypto               EAP-SIM/AKA crypto helper
  * @return                             empty message of requested kind, NULL on error
  */
-simaka_message_t *simaka_message_create(bool request, u_int8_t identifier,
+simaka_message_t *simaka_message_create(bool request, uint8_t identifier,
                                                                        eap_type_t type, simaka_subtype_t subtype,
                                                                        simaka_crypto_t *crypto);
 
index f1bf80049e25434b0592dae223773415bde7a5fe..f4faba8d15029ebdf4bc69d017a1733e877d3467 100644 (file)
@@ -112,7 +112,7 @@ struct simaka_provider_t {
         * @return                      permanent identity, NULL if id not a reauth identity
         */
        identification_t* (*is_reauth)(simaka_provider_t *this, identification_t *id,
-                                                                  char mk[HASH_SIZE_SHA1], u_int16_t *counter);
+                                                                  char mk[HASH_SIZE_SHA1], uint16_t *counter);
 
        /**
         * Generate a fast reauthentication identity, associated to a master key.
index 628bb99e6e86f1000a34e6b434a66fea98edc5c9..2ee414abf1cf8bc852061bb89349d0f74c714a45 100644 (file)
@@ -592,15 +592,15 @@ bool asn1_parse_simple_object(chunk_t *object, asn1_t type, u_int level, const c
 /*
  * Described in header
  */
-u_int64_t asn1_parse_integer_uint64(chunk_t blob)
+uint64_t asn1_parse_integer_uint64(chunk_t blob)
 {
-       u_int64_t val = 0;
+       uint64_t val = 0;
        int i;
 
        for (i = 0; i < blob.len; i++)
        {       /* if it is longer than 8 bytes, we just use the 8 LSBs */
                val <<= 8;
-               val |= (u_int64_t)blob.ptr[i];
+               val |= (uint64_t)blob.ptr[i];
        }
        return val;
 }
index 8ac00561004f097c43365f73a26a74b2abeead44..f0b3e17e879fa85af285f75a05e7f95d3417f6f9 100644 (file)
@@ -172,13 +172,13 @@ bool asn1_parse_simple_object(chunk_t *object, asn1_t type, u_int level0,
                                                          const char* name);
 
 /**
- * Converts an ASN.1 INTEGER object to an u_int64_t. If the INTEGER is longer
+ * Converts an ASN.1 INTEGER object to an uint64_t. If the INTEGER is longer
  * than 8 bytes only the 8 LSBs are returned.
  *
  * @param blob         body of an ASN.1 coded integer object
  * @return                     converted integer
  */
-u_int64_t asn1_parse_integer_uint64(chunk_t blob);
+uint64_t asn1_parse_integer_uint64(chunk_t blob);
 
 /**
  * Print the value of an ASN.1 simple object
index 29b9e7279dce707761aadbe71a79cef18c84ad5a..6e35999cef5a42a95cea2dff94a0610ec342cd20 100644 (file)
@@ -43,7 +43,7 @@ struct private_bio_reader_t {
        chunk_t cleanup;
 };
 
-METHOD(bio_reader_t, remaining, u_int32_t,
+METHOD(bio_reader_t, remaining, uint32_t,
        private_bio_reader_t *this)
 {
        return this->buf.len;
@@ -76,16 +76,16 @@ static inline chunk_t chunk_skip_end(chunk_t chunk, size_t bytes, bool from_end)
 /**
  * Returns a pointer to the data to read, optionally from the end
  */
-static inline u_char *get_ptr_end(private_bio_reader_t *this, u_int32_t len,
+static inline u_char *get_ptr_end(private_bio_reader_t *this, uint32_t len,
                                                                  bool from_end)
 {
        return from_end ? this->buf.ptr + (this->buf.len - len) : this->buf.ptr;
 }
 
 /**
- * Read an u_int8_t from the buffer, optionally from the end of the buffer
+ * Read an uint8_t from the buffer, optionally from the end of the buffer
  */
-static bool read_uint8_internal(private_bio_reader_t *this, u_int8_t *res,
+static bool read_uint8_internal(private_bio_reader_t *this, uint8_t *res,
                                                                bool from_end)
 {
        if (this->buf.len < 1)
@@ -100,9 +100,9 @@ static bool read_uint8_internal(private_bio_reader_t *this, u_int8_t *res,
 }
 
 /**
- * Read an u_int16_t from the buffer, optionally from the end
+ * Read an uint16_t from the buffer, optionally from the end
  */
-static bool read_uint16_internal(private_bio_reader_t *this, u_int16_t *res,
+static bool read_uint16_internal(private_bio_reader_t *this, uint16_t *res,
                                                                 bool from_end)
 {
        if (this->buf.len < 2)
@@ -117,9 +117,9 @@ static bool read_uint16_internal(private_bio_reader_t *this, u_int16_t *res,
 }
 
 /**
- * Read an u_int32_t (only 24-bit) from the buffer, optionally from the end
+ * Read an uint32_t (only 24-bit) from the buffer, optionally from the end
  */
-static bool read_uint24_internal(private_bio_reader_t *this, u_int32_t *res,
+static bool read_uint24_internal(private_bio_reader_t *this, uint32_t *res,
                                                                 bool from_end)
 {
        if (this->buf.len < 3)
@@ -134,9 +134,9 @@ static bool read_uint24_internal(private_bio_reader_t *this, u_int32_t *res,
 }
 
 /**
- * Read an u_int32_t from the buffer, optionally from the end
+ * Read an uint32_t from the buffer, optionally from the end
  */
-static bool read_uint32_internal(private_bio_reader_t *this, u_int32_t *res,
+static bool read_uint32_internal(private_bio_reader_t *this, uint32_t *res,
                                                                 bool from_end)
 {
        if (this->buf.len < 4)
@@ -151,9 +151,9 @@ static bool read_uint32_internal(private_bio_reader_t *this, u_int32_t *res,
 }
 
 /**
- * Read an u_int64_t from the buffer, optionally from the end
+ * Read an uint64_t from the buffer, optionally from the end
  */
-static bool read_uint64_internal(private_bio_reader_t *this, u_int64_t *res,
+static bool read_uint64_internal(private_bio_reader_t *this, uint64_t *res,
                                                                 bool from_end)
 {
        if (this->buf.len < 8)
@@ -170,7 +170,7 @@ static bool read_uint64_internal(private_bio_reader_t *this, u_int64_t *res,
 /**
  * Read a chunk of data from the buffer, optionally from the end
  */
-static bool read_data_internal(private_bio_reader_t *this, u_int32_t len,
+static bool read_data_internal(private_bio_reader_t *this, uint32_t len,
                                                           chunk_t *res, bool from_end)
 {
        if (this->buf.len < len)
@@ -185,73 +185,73 @@ static bool read_data_internal(private_bio_reader_t *this, u_int32_t len,
 }
 
 METHOD(bio_reader_t, read_uint8, bool,
-       private_bio_reader_t *this, u_int8_t *res)
+       private_bio_reader_t *this, uint8_t *res)
 {
        return read_uint8_internal(this, res, FALSE);
 }
 
 METHOD(bio_reader_t, read_uint16, bool,
-       private_bio_reader_t *this, u_int16_t *res)
+       private_bio_reader_t *this, uint16_t *res)
 {
        return read_uint16_internal(this, res, FALSE);
 }
 
 METHOD(bio_reader_t, read_uint24, bool,
-       private_bio_reader_t *this, u_int32_t *res)
+       private_bio_reader_t *this, uint32_t *res)
 {
        return read_uint24_internal(this, res, FALSE);
 }
 
 METHOD(bio_reader_t, read_uint32, bool,
-       private_bio_reader_t *this, u_int32_t *res)
+       private_bio_reader_t *this, uint32_t *res)
 {
        return read_uint32_internal(this, res, FALSE);
 }
 
 METHOD(bio_reader_t, read_uint64, bool,
-       private_bio_reader_t *this, u_int64_t *res)
+       private_bio_reader_t *this, uint64_t *res)
 {
        return read_uint64_internal(this, res, FALSE);
 }
 
 METHOD(bio_reader_t, read_data, bool,
-       private_bio_reader_t *this, u_int32_t len, chunk_t *res)
+       private_bio_reader_t *this, uint32_t len, chunk_t *res)
 {
        return read_data_internal(this, len, res, FALSE);
 }
 
 METHOD(bio_reader_t, read_uint8_end, bool,
-       private_bio_reader_t *this, u_int8_t *res)
+       private_bio_reader_t *this, uint8_t *res)
 {
        return read_uint8_internal(this, res, TRUE);
 }
 
 METHOD(bio_reader_t, read_uint16_end, bool,
-       private_bio_reader_t *this, u_int16_t *res)
+       private_bio_reader_t *this, uint16_t *res)
 {
        return read_uint16_internal(this, res, TRUE);
 }
 
 METHOD(bio_reader_t, read_uint24_end, bool,
-       private_bio_reader_t *this, u_int32_t *res)
+       private_bio_reader_t *this, uint32_t *res)
 {
        return read_uint24_internal(this, res, TRUE);
 }
 
 METHOD(bio_reader_t, read_uint32_end, bool,
-       private_bio_reader_t *this, u_int32_t *res)
+       private_bio_reader_t *this, uint32_t *res)
 {
        return read_uint32_internal(this, res, TRUE);
 }
 
 METHOD(bio_reader_t, read_uint64_end, bool,
-       private_bio_reader_t *this, u_int64_t *res)
+       private_bio_reader_t *this, uint64_t *res)
 {
        return read_uint64_internal(this, res, TRUE);
 }
 
 METHOD(bio_reader_t, read_data_end, bool,
-       private_bio_reader_t *this, u_int32_t len, chunk_t *res)
+       private_bio_reader_t *this, uint32_t len, chunk_t *res)
 {
        return read_data_internal(this, len, res, TRUE);
 }
@@ -259,7 +259,7 @@ METHOD(bio_reader_t, read_data_end, bool,
 METHOD(bio_reader_t, read_data8, bool,
        private_bio_reader_t *this, chunk_t *res)
 {
-       u_int8_t len;
+       uint8_t len;
 
        if (!read_uint8(this, &len))
        {
@@ -271,7 +271,7 @@ METHOD(bio_reader_t, read_data8, bool,
 METHOD(bio_reader_t, read_data16, bool,
        private_bio_reader_t *this, chunk_t *res)
 {
-       u_int16_t len;
+       uint16_t len;
 
        if (!read_uint16(this, &len))
        {
@@ -283,7 +283,7 @@ METHOD(bio_reader_t, read_data16, bool,
 METHOD(bio_reader_t, read_data24, bool,
        private_bio_reader_t *this, chunk_t *res)
 {
-       u_int32_t len;
+       uint32_t len;
 
        if (!read_uint24(this, &len))
        {
@@ -295,7 +295,7 @@ METHOD(bio_reader_t, read_data24, bool,
 METHOD(bio_reader_t, read_data32, bool,
        private_bio_reader_t *this, chunk_t *res)
 {
-       u_int32_t len;
+       uint32_t len;
 
        if (!read_uint32(this, &len))
        {
index 475422428d86c03c7740146ee3fae8a8b0a8f175..358993c4f51e0d15104cd7d19811b3d24ba0457f 100644 (file)
@@ -40,7 +40,7 @@ struct bio_reader_t {
         *
         * @return                      number of remaining bytes in buffer
         */
-       u_int32_t (*remaining)(bio_reader_t *this);
+       uint32_t (*remaining)(bio_reader_t *this);
 
        /**
         * Peek the remaining data, not consuming any bytes.
@@ -55,7 +55,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint8)(bio_reader_t *this, u_int8_t *res);
+       bool (*read_uint8)(bio_reader_t *this, uint8_t *res);
 
        /**
         * Read a 16-bit integer from the buffer, advance.
@@ -63,7 +63,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint16)(bio_reader_t *this, u_int16_t *res);
+       bool (*read_uint16)(bio_reader_t *this, uint16_t *res);
 
        /**
         * Read a 24-bit integer from the buffer, advance.
@@ -71,7 +71,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint24)(bio_reader_t *this, u_int32_t *res);
+       bool (*read_uint24)(bio_reader_t *this, uint32_t *res);
 
        /**
         * Read a 32-bit integer from the buffer, advance.
@@ -79,7 +79,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint32)(bio_reader_t *this, u_int32_t *res);
+       bool (*read_uint32)(bio_reader_t *this, uint32_t *res);
 
        /**
         * Read a 64-bit integer from the buffer, advance.
@@ -87,7 +87,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint64)(bio_reader_t *this, u_int64_t *res);
+       bool (*read_uint64)(bio_reader_t *this, uint64_t *res);
 
        /**
         * Read a chunk of len bytes, advance.
@@ -96,7 +96,7 @@ struct bio_reader_t {
         * @param res           pointer to result, not cloned
         * @return                      TRUE if data read successfully
         */
-       bool (*read_data)(bio_reader_t *this, u_int32_t len, chunk_t *res);
+       bool (*read_data)(bio_reader_t *this, uint32_t len, chunk_t *res);
 
        /**
         * Read a 8-bit integer from the end of the buffer, reduce remaining.
@@ -104,7 +104,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint8_end)(bio_reader_t *this, u_int8_t *res);
+       bool (*read_uint8_end)(bio_reader_t *this, uint8_t *res);
 
        /**
         * Read a 16-bit integer from the end of the buffer, reduce remaining.
@@ -112,7 +112,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint16_end)(bio_reader_t *this, u_int16_t *res);
+       bool (*read_uint16_end)(bio_reader_t *this, uint16_t *res);
 
        /**
         * Read a 24-bit integer from the end of the buffer, reduce remaining.
@@ -120,7 +120,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint24_end)(bio_reader_t *this, u_int32_t *res);
+       bool (*read_uint24_end)(bio_reader_t *this, uint32_t *res);
 
        /**
         * Read a 32-bit integer from the end of the buffer, reduce remaining.
@@ -128,7 +128,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint32_end)(bio_reader_t *this, u_int32_t *res);
+       bool (*read_uint32_end)(bio_reader_t *this, uint32_t *res);
 
        /**
         * Read a 64-bit integer from the end of the buffer, reduce remaining.
@@ -136,7 +136,7 @@ struct bio_reader_t {
         * @param res           pointer to result
         * @return                      TRUE if integer read successfully
         */
-       bool (*read_uint64_end)(bio_reader_t *this, u_int64_t *res);
+       bool (*read_uint64_end)(bio_reader_t *this, uint64_t *res);
 
        /**
         * Read a chunk of len bytes from the end of the buffer, reduce remaining.
@@ -145,7 +145,7 @@ struct bio_reader_t {
         * @param res           ponter to result, not cloned
         * @return                      TRUE if data read successfully
         */
-       bool (*read_data_end)(bio_reader_t *this, u_int32_t len, chunk_t *res);
+       bool (*read_data_end)(bio_reader_t *this, uint32_t len, chunk_t *res);
 
        /**
         * Read a chunk of bytes with a 8-bit length header, advance.
index 152d9ce22e8459faeb7dc359513e48a75d6ebb14..a21b376cf029d242f2b3823fea117164716aeebc 100644 (file)
@@ -65,7 +65,7 @@ static inline void increase(private_bio_writer_t *this, size_t required)
 }
 
 METHOD(bio_writer_t, write_uint8, void,
-       private_bio_writer_t *this, u_int8_t value)
+       private_bio_writer_t *this, uint8_t value)
 {
        increase(this, 1);
        this->buf.ptr[this->used] = value;
@@ -73,7 +73,7 @@ METHOD(bio_writer_t, write_uint8, void,
 }
 
 METHOD(bio_writer_t, write_uint16, void,
-       private_bio_writer_t *this, u_int16_t value)
+       private_bio_writer_t *this, uint16_t value)
 {
        increase(this, 2);
        htoun16(this->buf.ptr + this->used, value);
@@ -81,7 +81,7 @@ METHOD(bio_writer_t, write_uint16, void,
 }
 
 METHOD(bio_writer_t, write_uint24, void,
-       private_bio_writer_t *this, u_int32_t value)
+       private_bio_writer_t *this, uint32_t value)
 {
        increase(this, 3);
        value = htonl(value);
@@ -90,7 +90,7 @@ METHOD(bio_writer_t, write_uint24, void,
 }
 
 METHOD(bio_writer_t, write_uint32, void,
-       private_bio_writer_t *this, u_int32_t value)
+       private_bio_writer_t *this, uint32_t value)
 {
        increase(this, 4);
        htoun32(this->buf.ptr + this->used, value);
@@ -98,7 +98,7 @@ METHOD(bio_writer_t, write_uint32, void,
 }
 
 METHOD(bio_writer_t, write_uint64, void,
-       private_bio_writer_t *this, u_int64_t value)
+       private_bio_writer_t *this, uint64_t value)
 {
        increase(this, 8);
        htoun64(this->buf.ptr + this->used, value);
@@ -166,7 +166,7 @@ METHOD(bio_writer_t, wrap16, void,
 METHOD(bio_writer_t, wrap24, void,
        private_bio_writer_t *this)
 {
-       u_int32_t len;
+       uint32_t len;
 
        increase(this, 3);
        memmove(this->buf.ptr + 3, this->buf.ptr, this->used);
@@ -221,7 +221,7 @@ METHOD(bio_writer_t, destroy, void,
 /**
  * See header
  */
-bio_writer_t *bio_writer_create(u_int32_t bufsize)
+bio_writer_t *bio_writer_create(uint32_t bufsize)
 {
        private_bio_writer_t *this;
 
index 2ac4f3556dfdeb36734d9b61d8a3f77d3bfed4eb..b6e3db7303e4a12871cad1c9784df9acb233bf0d 100644 (file)
@@ -40,35 +40,35 @@ struct bio_writer_t {
         *
         * @param value         value to append
         */
-       void (*write_uint8)(bio_writer_t *this, u_int8_t value);
+       void (*write_uint8)(bio_writer_t *this, uint8_t value);
 
        /**
         * Append a 16-bit integer to the buffer.
         *
         * @param value         value to append
         */
-       void (*write_uint16)(bio_writer_t *this, u_int16_t value);
+       void (*write_uint16)(bio_writer_t *this, uint16_t value);
 
        /**
         * Append a 24-bit integer to the buffer.
         *
         * @param value         value to append
         */
-       void (*write_uint24)(bio_writer_t *this, u_int32_t value);
+       void (*write_uint24)(bio_writer_t *this, uint32_t value);
 
        /**
         * Append a 32-bit integer to the buffer.
         *
         * @param value         value to append
         */
-       void (*write_uint32)(bio_writer_t *this, u_int32_t value);
+       void (*write_uint32)(bio_writer_t *this, uint32_t value);
 
        /**
         * Append a 64-bit integer to the buffer.
         *
         * @param value         value to append
         */
-       void (*write_uint64)(bio_writer_t *this, u_int64_t value);
+       void (*write_uint64)(bio_writer_t *this, uint64_t value);
 
        /**
         * Append a chunk of data without a length header.
@@ -166,6 +166,6 @@ struct bio_writer_t {
  *
  * @param bufsize              initially allocated buffer size
  */
-bio_writer_t *bio_writer_create(u_int32_t bufsize);
+bio_writer_t *bio_writer_create(uint32_t bufsize);
 
 #endif /** BIO_WRITER_H_ @}*/
index a45a68aafeb3a35659e070bbd69dd5cee3b498ab..69e7df99e808782a90e9044df89084ce6b58475d 100644 (file)
  */
 struct array_t {
        /** number of elements currently in array (not counting head/tail) */
-       u_int32_t count;
+       uint32_t count;
        /** size of each element, 0 for a pointer based array */
-       u_int16_t esize;
+       uint16_t esize;
        /** allocated but unused elements at array front */
-       u_int8_t head;
+       uint8_t head;
        /** allocated but unused elements at array end */
-       u_int8_t tail;
+       uint8_t tail;
        /** array elements */
        void *data;
 };
@@ -64,7 +64,7 @@ struct array_t {
 /**
  * Get the actual size of a number of elements
  */
-static size_t get_size(array_t *array, u_int32_t num)
+static size_t get_size(array_t *array, uint32_t num)
 {
        if (array->esize)
        {
@@ -76,7 +76,7 @@ static size_t get_size(array_t *array, u_int32_t num)
 /**
  * Increase allocated but unused tail room to at least "room"
  */
-static void make_tail_room(array_t *array, u_int8_t room)
+static void make_tail_room(array_t *array, uint8_t room)
 {
        if (array->tail < room)
        {
@@ -89,11 +89,11 @@ static void make_tail_room(array_t *array, u_int8_t room)
 /**
  * Increase allocated but unused head room to at least "room"
  */
-static void make_head_room(array_t *array, u_int8_t room)
+static void make_head_room(array_t *array, uint8_t room)
 {
        if (array->head < room)
        {
-               u_int8_t increase = room - array->head;
+               uint8_t increase = room - array->head;
 
                array->data = realloc(array->data,
                                                get_size(array, array->count + array->tail + room));
@@ -158,7 +158,7 @@ static void remove_head(array_t *array, int idx)
        array->head++;
 }
 
-array_t *array_create(u_int esize, u_int8_t reserve)
+array_t *array_create(u_int esize, uint8_t reserve)
 {
        array_t *array;
 
@@ -186,7 +186,7 @@ void array_compress(array_t *array)
 {
        if (array)
        {
-               u_int32_t tail;
+               uint32_t tail;
 
                tail = array->tail;
                if (array->head)
index c3be1a15d611176bc4e04aff02b617a2fd29a2c5..d8a16b5df8450924d3b82990f0b4f44726a60c87 100644 (file)
@@ -68,7 +68,7 @@ typedef void (*array_callback_t)(void *data, int idx, void *user);
  * @param reserve              number of items to allocate space for
  * @return                             array instance
  */
-array_t *array_create(u_int esize, u_int8_t reserve);
+array_t *array_create(u_int esize, uint8_t reserve);
 
 /**
  * Get the number of elements currently in the array.
index 6940069de4186ebb504203f7e439c6b0025ed06d..7191dc1bc805b8ce7e586c3ebe092bcc647beee5 100644 (file)
@@ -78,7 +78,7 @@ enum auth_rule_t {
        AUTH_RULE_EAP_IDENTITY,
        /** EAP type to propose for peer authentication, eap_type_t */
        AUTH_RULE_EAP_TYPE,
-       /** EAP vendor for vendor specific type, u_int32_t */
+       /** EAP vendor for vendor specific type, uint32_t */
        AUTH_RULE_EAP_VENDOR,
        /** XAUTH backend name to use, char* */
        AUTH_RULE_XAUTH_BACKEND,
index 7b812d27de1c8c5e53bb4b9cf9cac985c7f74f64..9e7815d04d03a25d590c72b9e3c55e700a60449e 100644 (file)
@@ -42,8 +42,8 @@ static inline void copy_chunk(chunk_t dst, chunk_t src)
  */
 static void add_chunks(chunk_t a, chunk_t b)
 {
-       u_int16_t sum;
-       u_int8_t rem = 0;
+       uint16_t sum;
+       uint8_t rem = 0;
        ssize_t i, j;
 
        for (i = a.len - 1, j = b.len -1; i >= 0 && j >= 0; i--, j--)
@@ -64,12 +64,12 @@ static void add_chunks(chunk_t a, chunk_t b)
  * Do the actual key derivation with the given hasher, password and id.
  */
 static bool derive_key(hash_algorithm_t hash, chunk_t unicode, chunk_t salt,
-                                          u_int64_t iterations, char id, chunk_t result)
+                                          uint64_t iterations, char id, chunk_t result)
 {
        chunk_t out = result, D, S, P = chunk_empty, I, Ai, B, Ij;
        hasher_t *hasher;
        size_t Slen, v, u;
-       u_int64_t i;
+       uint64_t i;
        bool success = FALSE;
 
        hasher = lib->crypto->create_hasher(lib->crypto, hash);
@@ -149,7 +149,7 @@ end:
  * Described in header
  */
 bool pkcs12_derive_key(hash_algorithm_t hash, chunk_t password, chunk_t salt,
-                                          u_int64_t iterations, pkcs12_key_type_t type, chunk_t key)
+                                          uint64_t iterations, pkcs12_key_type_t type, chunk_t key)
 {
        chunk_t unicode = chunk_empty;
        bool success;
index f22ef045a42473e3291760345efc477a49caf57d..fc4fb39ce93fcc72b55b834c2374f12f10dbc542 100644 (file)
@@ -73,6 +73,6 @@ struct pkcs12_t {
  * @return                             TRUE on success
  */
 bool pkcs12_derive_key(hash_algorithm_t hash, chunk_t password, chunk_t salt,
-                                       u_int64_t iterations, pkcs12_key_type_t type, chunk_t key);
+                                       uint64_t iterations, pkcs12_key_type_t type, chunk_t key);
 
 #endif /** PKCS12_H_ @}*/
index 272502cf0c476327044c28d7ee79484e4e21842d..2d28b207d96422fdc154a44457b2ded6d4b17492 100644 (file)
@@ -90,7 +90,7 @@ struct hasher_t {
         * @return                      TRUE if hash created successfully
         */
        bool (*get_hash)(hasher_t *this, chunk_t data,
-                                        u_int8_t *hash) __attribute__((warn_unused_result));
+                                        uint8_t *hash) __attribute__((warn_unused_result));
 
        /**
         * Hash data and allocate space for the hash.
index 81b0701cec98511caee618c5fc3758caa60a2a55..292fc329f148bf4ade3d08107dd7857db2f366df 100644 (file)
@@ -38,8 +38,8 @@ struct iv_gen_t {
         * @param buffer        pointer where the generated IV will be written
         * @return                      TRUE if IV allocation was successful, FALSE otherwise
         */
-       bool (*get_iv)(iv_gen_t *this, u_int64_t seq, size_t size,
-                                  u_int8_t *buffer) __attribute__((warn_unused_result));
+       bool (*get_iv)(iv_gen_t *this, uint64_t seq, size_t size,
+                                  uint8_t *buffer) __attribute__((warn_unused_result));
 
        /**
         * Generates an IV and allocates space for it.
@@ -49,7 +49,7 @@ struct iv_gen_t {
         * @param chunk         chunk which will hold the generated IV
         * @return                      TRUE if IV allocation was successful, FALSE otherwise
         */
-       bool (*allocate_iv)(iv_gen_t *this, u_int64_t seq, size_t size,
+       bool (*allocate_iv)(iv_gen_t *this, uint64_t seq, size_t size,
                                                chunk_t *chunk) __attribute__((warn_unused_result));
 
        /**
index b13de0674f91239a43a63eef66fce16fe937c81d..3b8f93986250df5d694616205c3d8681ae345463 100644 (file)
@@ -29,13 +29,13 @@ struct private_iv_gen_t {
 };
 
 METHOD(iv_gen_t, get_iv, bool,
-       private_iv_gen_t *this, u_int64_t seq, size_t size, u_int8_t *buffer)
+       private_iv_gen_t *this, uint64_t seq, size_t size, uint8_t *buffer)
 {
        return size == 0;
 }
 
 METHOD(iv_gen_t, allocate_iv, bool,
-       private_iv_gen_t *this, u_int64_t seq, size_t size, chunk_t *chunk)
+       private_iv_gen_t *this, uint64_t seq, size_t size, chunk_t *chunk)
 {
        *chunk = chunk_empty;
        return size == 0;
index 2bed63fcce3ca3b3e2b02a5e355e01836290cadc..1474b3a12bb100c0e26efe440e8ee53f06126b6e 100644 (file)
@@ -36,7 +36,7 @@ struct private_iv_gen_t {
 };
 
 METHOD(iv_gen_t, get_iv, bool,
-       private_iv_gen_t *this, u_int64_t seq, size_t size, u_int8_t *buffer)
+       private_iv_gen_t *this, uint64_t seq, size_t size, uint8_t *buffer)
 {
        if (!this->rng)
        {
@@ -46,7 +46,7 @@ METHOD(iv_gen_t, get_iv, bool,
 }
 
 METHOD(iv_gen_t, allocate_iv, bool,
-       private_iv_gen_t *this, u_int64_t seq, size_t size, chunk_t *chunk)
+       private_iv_gen_t *this, uint64_t seq, size_t size, chunk_t *chunk)
 {
        if (!this->rng)
        {
index 9f99c51920bdf2d939d9d715f18adf092a128b8b..56620291c00ff99b470117d7b16c9de7110d7baf 100644 (file)
@@ -18,7 +18,7 @@
 /**
  * Magic value for the initial IV state
  */
-#define SEQ_IV_INIT_STATE (~(u_int64_t)0)
+#define SEQ_IV_INIT_STATE (~(uint64_t)0)
 #define SEQ_IV_HIGH_MASK (1ULL << 63)
 
 typedef struct private_iv_gen_t private_iv_gen_t;
@@ -36,30 +36,30 @@ struct private_iv_gen_t {
        /**
         * Previously passed sequence number in lower space to enforce uniqueness
         */
-       u_int64_t prevl;
+       uint64_t prevl;
 
        /**
         * Previously passed sequence number in upper space to enforce uniqueness
         */
-       u_int64_t prevh;
+       uint64_t prevh;
 
        /**
         * Salt to mask counter
         */
-       u_int8_t *salt;
+       uint8_t *salt;
 };
 
 METHOD(iv_gen_t, get_iv, bool,
-       private_iv_gen_t *this, u_int64_t seq, size_t size, u_int8_t *buffer)
+       private_iv_gen_t *this, uint64_t seq, size_t size, uint8_t *buffer)
 {
-       u_int8_t iv[sizeof(u_int64_t)];
+       uint8_t iv[sizeof(uint64_t)];
        size_t len = size;
 
        if (!this->salt)
        {
                return FALSE;
        }
-       if (size < sizeof(u_int64_t))
+       if (size < sizeof(uint64_t))
        {
                return FALSE;
        }
@@ -83,19 +83,19 @@ METHOD(iv_gen_t, get_iv, bool,
        {
                this->prevl = seq;
        }
-       if (len > sizeof(u_int64_t))
+       if (len > sizeof(uint64_t))
        {
-               len = sizeof(u_int64_t);
+               len = sizeof(uint64_t);
                memset(buffer, 0, size - len);
        }
        htoun64(iv, seq);
-       memxor(iv, this->salt, sizeof(u_int64_t));
-       memcpy(buffer + size - len, iv + sizeof(u_int64_t) - len, len);
+       memxor(iv, this->salt, sizeof(uint64_t));
+       memcpy(buffer + size - len, iv + sizeof(uint64_t) - len, len);
        return TRUE;
 }
 
 METHOD(iv_gen_t, allocate_iv, bool,
-       private_iv_gen_t *this, u_int64_t seq, size_t size, chunk_t *chunk)
+       private_iv_gen_t *this, uint64_t seq, size_t size, chunk_t *chunk)
 {
        *chunk = chunk_alloc(size);
        if (!get_iv(this, seq, chunk->len, chunk->ptr))
@@ -131,8 +131,8 @@ iv_gen_t *iv_gen_seq_create()
        rng = lib->crypto->create_rng(lib->crypto, RNG_STRONG);
        if (rng)
        {
-               this->salt = malloc(sizeof(u_int64_t));
-               if (!rng->get_bytes(rng, sizeof(u_int64_t), this->salt))
+               this->salt = malloc(sizeof(uint64_t));
+               if (!rng->get_bytes(rng, sizeof(uint64_t), this->salt))
                {
                        free(this->salt);
                        this->salt = NULL;
index f7b43ba39eea48dbf6bd0652cdc1b6723754ebf9..f23c6750ffb6e07cf5066fcdd2a168a940082591 100644 (file)
@@ -47,7 +47,7 @@ struct mac_t {
         * @return                      TRUE if mac generated successfully
         */
        bool (*get_mac)(mac_t *this, chunk_t data,
-                                       u_int8_t *out) __attribute__((warn_unused_result));
+                                       uint8_t *out) __attribute__((warn_unused_result));
 
        /**
         * Get the size of the resulting MAC.
index 4bbcd6e99204fa15c7454bcdaed3b2f9ae68ffdf..5116dfefae5e660283041bf6a21f71d3129f68c4 100644 (file)
@@ -39,7 +39,7 @@ struct private_mgf1_t {
        /**
         * Counter
         */
-       u_int32_t counter;
+       uint32_t counter;
 
        /**
         * Set if counter has reached 2^32
index 7dae4f776195e142ad8f23a3e8fe48907dc0dcdb..98d159e129d775829ecc65bf2fd54427d866f74c 100644 (file)
@@ -38,7 +38,7 @@ struct nonce_gen_t {
         * @return                      TRUE if nonce allocation was successful, FALSE otherwise
         */
        bool (*get_nonce)(nonce_gen_t *this, size_t size,
-                                         u_int8_t *buffer) __attribute__((warn_unused_result));
+                                         uint8_t *buffer) __attribute__((warn_unused_result));
 
        /**
         * Generates a nonce and allocates space for it.
index 478926f2fa9ef734b3e9f4f37c1f404531bb29de..8a145242507b43c1ee0aa25d2278c6d76afc8df7 100644 (file)
@@ -41,7 +41,7 @@ struct private_pkcs5_t {
        /**
         * Iterations for key derivation
         */
-       u_int64_t iterations;
+       uint64_t iterations;
 
        /**
         * Encryption algorithm
@@ -110,7 +110,7 @@ struct private_pkcs5_t {
  */
 static bool verify_padding(crypter_t *crypter, chunk_t *blob)
 {
-       u_int8_t padding, count;
+       uint8_t padding, count;
 
        padding = count = blob->ptr[blob->len - 1];
 
@@ -181,10 +181,10 @@ static bool pkcs12_kdf(private_pkcs5_t *this, chunk_t password, chunk_t keymat)
  * Function F of PBKDF2
  */
 static bool pbkdf2_f(chunk_t block, prf_t *prf, chunk_t seed,
-                                        u_int64_t iterations)
+                                        uint64_t iterations)
 {
        chunk_t u;
-       u_int64_t i;
+       uint64_t i;
 
        u = chunk_alloca(prf->get_block_size(prf));
        if (!prf->get_bytes(prf, seed, u.ptr))
@@ -212,7 +212,7 @@ static bool pbkdf2(private_pkcs5_t *this, chunk_t password, chunk_t key)
        prf_t *prf;
        chunk_t keymat, block, seed;
        size_t blocks;
-       u_int32_t i = 0;
+       uint32_t i = 0;
 
        prf = this->data.pbes2.prf;
 
@@ -247,7 +247,7 @@ static bool pbkdf1(private_pkcs5_t *this, chunk_t password, chunk_t key)
 {
        hasher_t *hasher;
        chunk_t hash;
-       u_int64_t i;
+       uint64_t i;
 
        hasher = this->data.pbes1.hasher;
 
index 94be1d5bf02f5e544ea8a8dcc40a0ca4538c95ad..6b7f8f85168134d975b1d7504d45446851dca128 100644 (file)
@@ -44,7 +44,7 @@ struct private_prf_plus_t {
        /**
         * Octet which will be appended to the seed, 0 if not used
         */
-       u_int8_t counter;
+       uint8_t counter;
 
        /**
         * Already given out bytes in current buffer.
@@ -58,7 +58,7 @@ struct private_prf_plus_t {
 };
 
 METHOD(prf_plus_t, get_bytes, bool,
-       private_prf_plus_t *this, size_t length, u_int8_t *buffer)
+       private_prf_plus_t *this, size_t length, uint8_t *buffer)
 {
        size_t round, written = 0;
 
index f994dce1646d947e3d3795f37108e78574f24fd9..2c4b8852d4c5591e1986605c0623a408d898b163 100644 (file)
@@ -39,7 +39,7 @@ struct prf_plus_t {
         * @return                      TRUE if bytes generated successfully
         */
        bool (*get_bytes)(prf_plus_t *this, size_t length,
-                                         u_int8_t *buffer) __attribute__((warn_unused_result));
+                                         uint8_t *buffer) __attribute__((warn_unused_result));
 
        /**
         * Allocate pseudo random bytes.
index b5f6be982b3ddcdab3bf11359e7e86bc5fad3f79..3f8eb7e5cf0409964275a4bdaef25aeb36dbe4f7 100644 (file)
@@ -36,7 +36,7 @@ struct private_prf_t {
 };
 
 METHOD(prf_t, get_bytes, bool,
-       private_prf_t *this, chunk_t seed, u_int8_t *buffer)
+       private_prf_t *this, chunk_t seed, uint8_t *buffer)
 {
        return this->mac->get_mac(this->mac, seed, buffer);
 }
index 46e23b2443a13476c8a70e595ca723dcb5599bdd..bf443e5f46577bddd186f844ab925817a10b64af 100644 (file)
@@ -80,7 +80,7 @@ struct prf_t {
         * @return                      TRUE if bytes generated successfully
         */
        bool (*get_bytes)(prf_t *this, chunk_t seed,
-                                         u_int8_t *buffer) __attribute__((warn_unused_result));
+                                         uint8_t *buffer) __attribute__((warn_unused_result));
 
        /**
         * Generates pseudo random bytes and allocate space for them.
index bbb97d0885404b3235f5aa147aecb1b8a9067213..282d40e7b2bec16e9a319db2bda8ac0dfdc5cd3c 100644 (file)
@@ -134,7 +134,7 @@ METHOD(proposal_keywords_t, get_token, const proposal_token_t*,
 
 METHOD(proposal_keywords_t, register_token, void,
        private_proposal_keywords_t *this, const char *name, transform_type_t type,
-       u_int16_t algorithm, u_int16_t keysize)
+       uint16_t algorithm, uint16_t keysize)
 {
        proposal_token_t *token;
 
index 5cdbafc516be672e773edd6adfdeb55a09d638d1..856abdce6e09da46964ea9d1e6b3f7125ffc770e 100644 (file)
@@ -69,12 +69,12 @@ struct proposal_token_t {
        /**
         * The IKE id of the algorithm.
         */
-       u_int16_t algorithm;
+       uint16_t algorithm;
 
        /**
         * The key size associated with the specific algorithm.
         */
-       u_int16_t keysize;
+       uint16_t keysize;
 };
 
 /**
@@ -100,8 +100,8 @@ struct proposal_keywords_t {
         * @param keysize       the key size associated with the specific algorithm
         */
        void (*register_token)(proposal_keywords_t *this, const char *name,
-                                                  transform_type_t type, u_int16_t algorithm,
-                                                  u_int16_t keysize);
+                                                  transform_type_t type, uint16_t algorithm,
+                                                  uint16_t keysize);
 
        /**
         * Register an algorithm name parser.
index f8fd50d3f139cc91358260a78088ded33a6bec9b..1f39dedb8d6e972155b645fe3c60ebd4f1320b73 100644 (file)
@@ -25,9 +25,9 @@ ENUM(rng_quality_names, RNG_WEAK, RNG_TRUE,
 /*
  * Described in header.
  */
-bool rng_get_bytes_not_zero(rng_t *rng, size_t len, u_int8_t *buffer, bool all)
+bool rng_get_bytes_not_zero(rng_t *rng, size_t len, uint8_t *buffer, bool all)
 {
-       u_int8_t *pos = buffer, *check = buffer + (all ? len : min(1, len));
+       uint8_t *pos = buffer, *check = buffer + (all ? len : min(1, len));
 
        if (!rng->get_bytes(rng, len, pos))
        {
index aee829d71abb82c706208b13ed875ce5dd38c18b..0ca2cb1145f21046ef3dab67c5d5111b9d972db5 100644 (file)
@@ -57,7 +57,7 @@ struct rng_t {
         * @return                      TRUE if bytes successfully written
         */
        bool (*get_bytes)(rng_t *this, size_t len,
-                                         u_int8_t *buffer) __attribute__((warn_unused_result));
+                                         uint8_t *buffer) __attribute__((warn_unused_result));
 
        /**
         * Generates random bytes and allocate space for them.
@@ -85,7 +85,7 @@ struct rng_t {
  * @param all                  TRUE if all bytes have to be non-zero, FALSE for first
  * @return                             TRUE if bytes successfully written
  */
-bool rng_get_bytes_not_zero(rng_t *rng, size_t len, u_int8_t *buffer,
+bool rng_get_bytes_not_zero(rng_t *rng, size_t len, uint8_t *buffer,
                                                        bool all) __attribute__((warn_unused_result));
 
 /**
index 1094c4473bf3f2f7a14ae93e019fbc29039a637f..4426782b410862f33bafe3b85ddb2f5689058d57 100644 (file)
@@ -41,11 +41,11 @@ struct private_signer_t {
 };
 
 METHOD(signer_t, get_signature, bool,
-       private_signer_t *this, chunk_t data, u_int8_t *buffer)
+       private_signer_t *this, chunk_t data, uint8_t *buffer)
 {
        if (buffer)
        {
-               u_int8_t mac[this->mac->get_mac_size(this->mac)];
+               uint8_t mac[this->mac->get_mac_size(this->mac)];
 
                if (!this->mac->get_mac(this->mac, data, mac))
                {
@@ -62,7 +62,7 @@ METHOD(signer_t, allocate_signature, bool,
 {
        if (chunk)
        {
-               u_int8_t mac[this->mac->get_mac_size(this->mac)];
+               uint8_t mac[this->mac->get_mac_size(this->mac)];
 
                if (!this->mac->get_mac(this->mac, data, mac))
                {
@@ -78,7 +78,7 @@ METHOD(signer_t, allocate_signature, bool,
 METHOD(signer_t, verify_signature, bool,
        private_signer_t *this, chunk_t data, chunk_t signature)
 {
-       u_int8_t mac[this->mac->get_mac_size(this->mac)];
+       uint8_t mac[this->mac->get_mac_size(this->mac)];
 
        if (signature.len != this->truncation)
        {
index e0cf7eb5acfabea744ad79e8ff74039c22184322..01b702da1899583ffccc5dcfe3eaa32cb357b8c5 100644 (file)
@@ -96,7 +96,7 @@ struct signer_t {
         * @return                      TRUE if signature created successfully
         */
        bool (*get_signature)(signer_t *this, chunk_t data,
-                                                 u_int8_t *buffer) __attribute__((warn_unused_result));
+                                                 uint8_t *buffer) __attribute__((warn_unused_result));
 
        /**
         * Generate a signature and allocate space for it.
index 08d88ba88271927cf53d0f34ccbd975314f1dff8..2d4a238cdd299b388fe173cce790f2850983d165 100644 (file)
@@ -99,18 +99,18 @@ struct eap_vendor_type_t {
        /**
         * Vendor Id
         */
-       u_int32_t vendor;
+       uint32_t vendor;
 };
 
 /**
  * EAP packet format
  */
 typedef struct __attribute__((packed)) {
-       u_int8_t code;
-       u_int8_t identifier;
-       u_int16_t length;
-       u_int8_t type;
-       u_int8_t data;
+       uint8_t code;
+       uint8_t identifier;
+       uint16_t length;
+       uint8_t type;
+       uint8_t data;
 } eap_packet_t;
 
 /**
index fa122af304d1e3081ad738df6e4d1a04289d3985..cbc0d089b2471830a5759a282cd0e81afc23c706 100644 (file)
@@ -123,22 +123,22 @@ struct ipsec_sa_cfg_t {
        /** mode of SA (tunnel, transport) */
        ipsec_mode_t mode;
        /** unique ID */
-       u_int32_t reqid;
+       uint32_t reqid;
        /** number of policies of the same kind (in/out/fwd) attached to SA */
-       u_int32_t policy_count;
+       uint32_t policy_count;
        /** details about ESP/AH */
        struct {
                /** TRUE if this protocol is used */
                bool use;
                /** SPI for ESP/AH */
-               u_int32_t spi;
+               uint32_t spi;
        } esp, ah;
        /** details about IPComp */
        struct {
                /** the IPComp transform used */
-               u_int16_t transform;
+               uint16_t transform;
                /** CPI for IPComp */
-               u_int16_t cpi;
+               uint16_t cpi;
        } ipcomp;
 };
 
@@ -150,11 +150,11 @@ struct ipsec_sa_cfg_t {
 struct lifetime_cfg_t {
        struct {
                /** Limit before the SA gets invalid. */
-               u_int64_t       life;
+               uint64_t        life;
                /** Limit before the SA gets rekeyed. */
-               u_int64_t       rekey;
+               uint64_t        rekey;
                /** The range of a random value subtracted from rekey. */
-               u_int64_t       jitter;
+               uint64_t        jitter;
        } time, bytes, packets;
 };
 
@@ -163,9 +163,9 @@ struct lifetime_cfg_t {
  */
 struct mark_t {
        /** Mark value */
-       u_int32_t value;
+       uint32_t value;
        /** Mark mask */
-       u_int32_t mask;
+       uint32_t mask;
 };
 
 /**
index 2e464b0ad9cdc397ca03c802e5a75f12c67ac463..b71d2da1668d4bbda4ef0cc0033185d0a6d76bd4 100644 (file)
@@ -79,7 +79,7 @@ METHOD(host_t, get_sockaddr_len, socklen_t*,
 METHOD(host_t, is_anyaddr, bool,
        private_host_t *this)
 {
-       static const u_int8_t zeroes[IPV6_LEN];
+       static const uint8_t zeroes[IPV6_LEN];
 
        switch (this->address.sa_family)
        {
@@ -119,7 +119,7 @@ int host_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
        else
        {
                void *address;
-               u_int16_t port;
+               uint16_t port;
                int len;
 
                address = &this->address6.sin6_addr;
@@ -191,7 +191,7 @@ METHOD(host_t, get_family, int,
        return this->address.sa_family;
 }
 
-METHOD(host_t, get_port, u_int16_t,
+METHOD(host_t, get_port, uint16_t,
        private_host_t *this)
 {
        switch (this->address.sa_family)
@@ -212,7 +212,7 @@ METHOD(host_t, get_port, u_int16_t,
 }
 
 METHOD(host_t, set_port, void,
-       private_host_t *this, u_int16_t port)
+       private_host_t *this, uint16_t port)
 {
        switch (this->address.sa_family)
        {
@@ -334,7 +334,7 @@ static private_host_t *host_create_empty(void)
 /*
  * Create a %any host with port
  */
-static host_t *host_create_any_port(int family, u_int16_t port)
+static host_t *host_create_any_port(int family, uint16_t port)
 {
        host_t *this;
 
@@ -347,7 +347,7 @@ static host_t *host_create_any_port(int family, u_int16_t port)
  * Described in header.
  */
 host_t *host_create_from_string_and_family(char *string, int family,
-                                                                                  u_int16_t port)
+                                                                                  uint16_t port)
 {
        union {
                struct sockaddr_in v4;
@@ -415,7 +415,7 @@ host_t *host_create_from_string_and_family(char *string, int family,
 /*
  * Described in header.
  */
-host_t *host_create_from_string(char *string, u_int16_t port)
+host_t *host_create_from_string(char *string, uint16_t port)
 {
        return host_create_from_string_and_family(string, AF_UNSPEC, port);
 }
@@ -455,7 +455,7 @@ host_t *host_create_from_sockaddr(sockaddr_t *sockaddr)
 /*
  * Described in header.
  */
-host_t *host_create_from_dns(char *string, int af, u_int16_t port)
+host_t *host_create_from_dns(char *string, int af, uint16_t port)
 {
        host_t *this;
 
@@ -474,7 +474,7 @@ host_t *host_create_from_dns(char *string, int af, u_int16_t port)
 /*
  * Described in header.
  */
-host_t *host_create_from_chunk(int family, chunk_t address, u_int16_t port)
+host_t *host_create_from_chunk(int family, chunk_t address, uint16_t port)
 {
        private_host_t *this;
 
@@ -646,7 +646,7 @@ host_t *host_create_netmask(int family, int netbits)
        if (bytes < len)
        {
                memset(target + bytes, 0x00, len - bytes);
-               target[bytes] = (u_int8_t)(0xff << bits);
+               target[bytes] = (uint8_t)(0xff << bits);
        }
        return &this->public;
 }
index db6f4dd499c46bddd91fca2c62d0b448e8bc4585..a777f9f97eec1262bed6aa4f409320b141353b49 100644 (file)
@@ -99,14 +99,14 @@ struct host_t {
         *
         * @return              port number
         */
-       u_int16_t (*get_port) (host_t *this);
+       uint16_t (*get_port) (host_t *this);
 
        /**
         * Set the port of this host
         *
         * @param port  port number
         */
-       void (*set_port) (host_t *this, u_int16_t port);
+       void (*set_port) (host_t *this, uint16_t port);
 
        /**
         * Compare the ips of two hosts hosts.
@@ -137,7 +137,7 @@ struct host_t {
  * @param port                 port number
  * @return                             host_t, NULL if string not an address.
  */
-host_t *host_create_from_string(char *string, u_int16_t port);
+host_t *host_create_from_string(char *string, uint16_t port);
 
 /**
  * Same as host_create_from_string(), but with the option to enforce a family.
@@ -148,7 +148,7 @@ host_t *host_create_from_string(char *string, u_int16_t port);
  * @return                             host_t, NULL if string not an address.
  */
 host_t *host_create_from_string_and_family(char *string, int family,
-                                                                                  u_int16_t port);
+                                                                                  uint16_t port);
 
 /**
  * Constructor to create a host_t from a DNS name.
@@ -158,7 +158,7 @@ host_t *host_create_from_string_and_family(char *string, int family,
  * @param port                 port number
  * @return                             host_t, NULL lookup failed
  */
-host_t *host_create_from_dns(char *string, int family, u_int16_t port);
+host_t *host_create_from_dns(char *string, int family, uint16_t port);
 
 /**
  * Constructor to create a host_t object from an address chunk.
@@ -170,7 +170,7 @@ host_t *host_create_from_dns(char *string, int family, u_int16_t port);
  * @param port                 port number
  * @return                             host_t, NULL if family not supported/chunk invalid
  */
-host_t *host_create_from_chunk(int family, chunk_t address, u_int16_t port);
+host_t *host_create_from_chunk(int family, chunk_t address, uint16_t port);
 
 /**
  * Constructor to create a host_t object from a sockaddr struct
index 4ff7fc48b812ec8d1a0e4e79401f864f84fd1ae0..f76a85a4b224d7fc0116c9b26aca894c361f802f 100644 (file)
@@ -42,7 +42,7 @@ struct private_packet_t {
        /**
         * DSCP value on packet
         */
-       u_int8_t dscp;
+       uint8_t dscp;
 
         /**
          * message data
@@ -94,13 +94,13 @@ METHOD(packet_t, set_data, void,
        this->adjusted_data = this->data = data;
 }
 
-METHOD(packet_t, get_dscp, u_int8_t,
+METHOD(packet_t, get_dscp, uint8_t,
        private_packet_t *this)
 {
        return this->dscp;
 }
 METHOD(packet_t, set_dscp, void,
-       private_packet_t *this, u_int8_t value)
+       private_packet_t *this, uint8_t value)
 {
        this->dscp = value;
 }
index 1492dd0b9f119c174f23b5ac6e8ab4654a7e2178..8699d4abe96993ba6c7edb24f307fabbb1de2292 100644 (file)
@@ -85,14 +85,14 @@ struct packet_t {
         *
         * @return                      DSCP value
         */
-       u_int8_t (*get_dscp)(packet_t *this);
+       uint8_t (*get_dscp)(packet_t *this);
 
        /**
         * Set the DiffServ Code Point to use on this packet.
         *
         * @param value         DSCP value
         */
-       void (*set_dscp)(packet_t *this, u_int8_t value);
+       void (*set_dscp)(packet_t *this, uint8_t value);
 
        /**
         * Increase the offset where the actual packet data starts.
index 81d21567778092f0e5e324ea2b5ee868e6fb01ec..de925553f0d2d3d398132c3548f8669625dff71c 100644 (file)
@@ -96,7 +96,7 @@ struct private_tun_device_t {
        /**
         * Netmask for address
         */
-       u_int8_t netmask;
+       uint8_t netmask;
 };
 
 /**
@@ -105,7 +105,7 @@ struct private_tun_device_t {
 #if __FreeBSD__ >= 10
 
 static bool set_address_and_mask(struct in_aliasreq *ifra, host_t *addr,
-                                                                u_int8_t netmask)
+                                                                uint8_t netmask)
 {
        host_t *mask;
 
@@ -132,7 +132,7 @@ static bool set_address_and_mask(struct in_aliasreq *ifra, host_t *addr,
  * on FreeBSD 10 an newer.
  */
 static bool set_address_impl(private_tun_device_t *this, host_t *addr,
-                                                        u_int8_t netmask)
+                                                        uint8_t netmask)
 {
        struct in_aliasreq ifra;
 
@@ -171,7 +171,7 @@ static bool set_address_impl(private_tun_device_t *this, host_t *addr,
  * Set the address using the classic SIOCSIFADDR etc. commands on other systems.
  */
 static bool set_address_impl(private_tun_device_t *this, host_t *addr,
-                                                        u_int8_t netmask)
+                                                        uint8_t netmask)
 {
        struct ifreq ifr;
        host_t *mask;
@@ -218,7 +218,7 @@ static bool set_address_impl(private_tun_device_t *this, host_t *addr,
 #endif /* __FreeBSD__ */
 
 METHOD(tun_device_t, set_address, bool,
-       private_tun_device_t *this, host_t *addr, u_int8_t netmask)
+       private_tun_device_t *this, host_t *addr, uint8_t netmask)
 {
        if (!set_address_impl(this, addr, netmask))
        {
@@ -231,7 +231,7 @@ METHOD(tun_device_t, set_address, bool,
 }
 
 METHOD(tun_device_t, get_address, host_t*,
-       private_tun_device_t *this, u_int8_t *netmask)
+       private_tun_device_t *this, uint8_t *netmask)
 {
        if (netmask && this->address)
        {
@@ -326,7 +326,7 @@ METHOD(tun_device_t, write_packet, bool,
 #ifdef __APPLE__
        /* UTUN's expect the packets to be prepended by a 32-bit protocol number
         * instead of parsing the packet again, we assume IPv4 for now */
-       u_int32_t proto = htonl(AF_INET);
+       uint32_t proto = htonl(AF_INET);
        packet = chunk_cata("cc", chunk_from_thing(proto), packet);
 #endif
        s = write(this->tunfd, packet.ptr, packet.len);
@@ -364,7 +364,7 @@ METHOD(tun_device_t, read_packet, bool,
        data.len = len;
 #ifdef __APPLE__
        /* UTUN's prepend packets with a 32-bit protocol number */
-       data = chunk_skip(data, sizeof(u_int32_t));
+       data = chunk_skip(data, sizeof(uint32_t));
 #endif
        *packet = chunk_clone(data);
        return TRUE;
index 880369ba71b325e47250aa9572f7eee3af771b87..4f9eacb07a8059724db11e9f74b49424db8d2a0b 100644 (file)
@@ -60,7 +60,7 @@ struct tun_device_t {
         * @param netmask               the netmask to use
         * @return                              TRUE if operation successful
         */
-       bool (*set_address)(tun_device_t *this, host_t *addr, u_int8_t netmask);
+       bool (*set_address)(tun_device_t *this, host_t *addr, uint8_t netmask);
 
        /**
         * Get the IP address previously assigned to using set_address().
@@ -68,7 +68,7 @@ struct tun_device_t {
         * @param netmask               pointer receiving the configured netmask, or NULL
         * @return                              address previously set, NULL if none
         */
-       host_t* (*get_address)(tun_device_t *this, u_int8_t *netmask);
+       host_t* (*get_address)(tun_device_t *this, uint8_t *netmask);
 
        /**
         * Bring the TUN device up
index 2c5592330cca60b770089c8d26efa19fdbaa2860..50e63f7be1c4cc1544965535c5f24ec966c9f536 100644 (file)
@@ -59,7 +59,7 @@ enum pen_t {
  */
 struct pen_type_t {
        pen_t vendor_id;
-       u_int32_t type;
+       uint32_t type;
 };
 
 /**
@@ -69,7 +69,7 @@ struct pen_type_t {
  * @param type                 type to create a pen_type_t
  * @return                             created pen_type_t
  */
-static inline pen_type_t pen_type_create(pen_t vendor_id, u_int32_t type)
+static inline pen_type_t pen_type_create(pen_t vendor_id, uint32_t type)
 {
        pen_type_t pen_type = { vendor_id, type };
        return pen_type;
@@ -96,7 +96,7 @@ static inline bool pen_type_equals(pen_type_t a, pen_type_t b)
  * @return                             TRUE if vendor_id and type matches pen_type
  */
 static inline bool pen_type_is(pen_type_t pen_type,
-                                                          pen_t vendor_id, u_int32_t type)
+                                                          pen_t vendor_id, uint32_t type)
 {
        return pen_type.vendor_id == vendor_id && pen_type.type == type;
 }
index f9775c8b832c3f95cc92ab0b4ea8ae3c4fb09c91..8829ba162eb28286e83f76c2852bfd0131dd1db2 100644 (file)
@@ -49,27 +49,27 @@ struct private_aes_crypter_t {
        /**
         * Number of words in the key input block.
         */
-       u_int32_t aes_Nkey;
+       uint32_t aes_Nkey;
 
        /**
         * The number of cipher rounds.
         */
-       u_int32_t aes_Nrnd;
+       uint32_t aes_Nrnd;
 
        /**
        * The encryption key schedule.
        */
-       u_int32_t aes_e_key[AES_KS_LENGTH];
+       uint32_t aes_e_key[AES_KS_LENGTH];
 
        /**
        * The decryption key schedule.
        */
-       u_int32_t aes_d_key[AES_KS_LENGTH];
+       uint32_t aes_d_key[AES_KS_LENGTH];
 
        /**
        * Key size of this AES cypher object.
        */
-       u_int32_t key_size;
+       uint32_t key_size;
 };
 
 /**
@@ -88,7 +88,7 @@ struct private_aes_crypter_t {
  */
 #define bval(x,n)       ((unsigned char)((x) >> 8 * (n)))
 #define bytes2word(b0, b1, b2, b3)  \
-        ((u_int32_t)(b3) << 24 | (u_int32_t)(b2) << 16 | (u_int32_t)(b1) << 8 | (b0))
+        ((uint32_t)(b3) << 24 | (uint32_t)(b2) << 16 | (uint32_t)(b1) << 8 | (b0))
 
 
 /* little endian processor without data alignment restrictions: AES_LE_OK */
@@ -105,15 +105,15 @@ struct private_aes_crypter_t {
 
 #ifdef AES_LE_OK
 /* little endian processor without data alignment restrictions */
-#define word_in(x)      *(u_int32_t*)(x)
-#define const_word_in(x)      *(const u_int32_t*)(x)
-#define word_out(x,v)   *(u_int32_t*)(x) = (v)
-#define const_word_out(x,v)   *(const u_int32_t*)(x) = (v)
+#define word_in(x)      *(uint32_t*)(x)
+#define const_word_in(x)      *(const uint32_t*)(x)
+#define word_out(x,v)   *(uint32_t*)(x) = (v)
+#define const_word_out(x,v)   *(const uint32_t*)(x) = (v)
 #else
 /* slower but generic big endian or with data alignment restrictions */
 /* some additional "const" touches to stop "gcc -Wcast-qual" complains --jjo */
-#define word_in(x)      ((u_int32_t)(((unsigned char *)(x))[0])|((u_int32_t)(((unsigned char *)(x))[1])<<8)|((u_int32_t)(((unsigned char *)(x))[2])<<16)|((u_int32_t)(((unsigned char *)(x))[3])<<24))
-#define const_word_in(x)      ((const u_int32_t)(((const unsigned char *)(x))[0])|((const u_int32_t)(((const unsigned char *)(x))[1])<<8)|((const u_int32_t)(((const unsigned char *)(x))[2])<<16)|((const u_int32_t)(((const unsigned char *)(x))[3])<<24))
+#define word_in(x)      ((uint32_t)(((unsigned char *)(x))[0])|((uint32_t)(((unsigned char *)(x))[1])<<8)|((uint32_t)(((unsigned char *)(x))[2])<<16)|((uint32_t)(((unsigned char *)(x))[3])<<24))
+#define const_word_in(x)      ((const uint32_t)(((const unsigned char *)(x))[0])|((const uint32_t)(((const unsigned char *)(x))[1])<<8)|((const uint32_t)(((const unsigned char *)(x))[2])<<16)|((const uint32_t)(((const unsigned char *)(x))[3])<<24))
 #define word_out(x,v)   ((unsigned char *)(x))[0]=(v),((unsigned char *)(x))[1]=((v)>>8),((unsigned char *)(x))[2]=((v)>>16),((unsigned char *)(x))[3]=((v)>>24)
 #define const_word_out(x,v)   ((const unsigned char *)(x))[0]=(v),((const unsigned char *)(x))[1]=((v)>>8),((const unsigned char *)(x))[2]=((v)>>16),((const unsigned char *)(x))[3]=((v)>>24)
 #endif
@@ -156,7 +156,7 @@ struct private_aes_crypter_t {
 // this table can be a table of bytes if the key schedule
 // code is adjusted accordingly
 
-static const u_int32_t rcon_tab[29] =
+static const uint32_t rcon_tab[29] =
 {
     w0(01), w0(02), w0(04), w0(08),
     w0(10), w0(20), w0(40), w0(80),
@@ -320,7 +320,7 @@ static const u_int32_t rcon_tab[29] =
 #undef  r
 #define r   r0
 
-static const u_int32_t ft_tab[4][256] =
+static const uint32_t ft_tab[4][256] =
 {   {   f_table },
 #undef  r
 #define r   r1
@@ -335,7 +335,7 @@ static const u_int32_t ft_tab[4][256] =
 
 #undef  r
 #define r   r0
-static const u_int32_t it_tab[4][256] =
+static const uint32_t it_tab[4][256] =
 {   {   i_table },
 #undef  r
 #define r   r1
@@ -386,7 +386,7 @@ static const u_int32_t it_tab[4][256] =
 
 #undef  r
 #define r(p,q,r,s)  w0(q)
-static const u_int32_t fl_tab[4][256] =
+static const uint32_t fl_tab[4][256] =
 {   {   f_table    },
 #undef  r
 #define r(p,q,r,s)   w1(q)
@@ -401,7 +401,7 @@ static const u_int32_t fl_tab[4][256] =
 
 #undef  w
 #define w   w0
-static const u_int32_t il_tab[4][256] =
+static const uint32_t il_tab[4][256] =
 {   {   li_table    },
 #undef  w
 #define w   w1
@@ -483,7 +483,7 @@ static const u_int32_t il_tab[4][256] =
 #undef r
 #define r   r0
 
-static const u_int32_t im_tab[4][256] =
+static const uint32_t im_tab[4][256] =
 {   {   m_table },
 #undef  r
 #define r   r1
@@ -717,8 +717,8 @@ static const u_int32_t im_tab[4][256] =
 static void encrypt_block(const private_aes_crypter_t *this,
                                                  const unsigned char in_blk[], unsigned char out_blk[])
 {
-       u_int32_t locals(b0, b1);
-       const u_int32_t *kp = this->aes_e_key;
+       uint32_t locals(b0, b1);
+       const uint32_t *kp = this->aes_e_key;
 
        state_in(b0, in_blk, kp); kp += nc;
 
@@ -754,8 +754,8 @@ static void encrypt_block(const private_aes_crypter_t *this,
 static void decrypt_block(const private_aes_crypter_t *this,
                                                  const unsigned char in_blk[], unsigned char out_blk[])
 {
-       u_int32_t locals(b0, b1);
-       const u_int32_t *kp = this->aes_d_key;
+       uint32_t locals(b0, b1);
+       const uint32_t *kp = this->aes_d_key;
 
        state_in(b0, in_blk, kp); kp += nc;
 
@@ -789,8 +789,8 @@ METHOD(crypter_t, decrypt, bool,
        private_aes_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted)
 {
        int pos;
-       const u_int32_t *iv_i;
-       u_int8_t *in, *out;
+       const uint32_t *iv_i;
+       uint8_t *in, *out;
 
        if (decrypted)
        {
@@ -811,16 +811,16 @@ METHOD(crypter_t, decrypt, bool,
                decrypt_block(this, in, out);
                if (pos==0)
                {
-                       iv_i=(const u_int32_t*) (iv.ptr);
+                       iv_i=(const uint32_t*) (iv.ptr);
                }
                else
                {
-                       iv_i=(const u_int32_t*) (in-16);
+                       iv_i=(const uint32_t*) (in-16);
                }
-               *((u_int32_t *)(&out[ 0])) ^= iv_i[0];
-               *((u_int32_t *)(&out[ 4])) ^= iv_i[1];
-               *((u_int32_t *)(&out[ 8])) ^= iv_i[2];
-               *((u_int32_t *)(&out[12])) ^= iv_i[3];
+               *((uint32_t *)(&out[ 0])) ^= iv_i[0];
+               *((uint32_t *)(&out[ 4])) ^= iv_i[1];
+               *((uint32_t *)(&out[ 8])) ^= iv_i[2];
+               *((uint32_t *)(&out[12])) ^= iv_i[3];
                in-=16;
                out-=16;
                pos-=16;
@@ -832,8 +832,8 @@ METHOD(crypter_t, encrypt, bool,
        private_aes_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted)
 {
        int pos;
-       const u_int32_t *iv_i;
-       u_int8_t *in, *out;
+       const uint32_t *iv_i;
+       uint8_t *in, *out;
 
        in = data.ptr;
        out = data.ptr;
@@ -848,16 +848,16 @@ METHOD(crypter_t, encrypt, bool,
        {
                if (pos==0)
                {
-                       iv_i=(const u_int32_t*) iv.ptr;
+                       iv_i=(const uint32_t*) iv.ptr;
                }
                else
                {
-                       iv_i=(const u_int32_t*) (out-16);
+                       iv_i=(const uint32_t*) (out-16);
                }
-               *((u_int32_t *)(&out[ 0])) = iv_i[0]^*((const u_int32_t *)(&in[ 0]));
-               *((u_int32_t *)(&out[ 4])) = iv_i[1]^*((const u_int32_t *)(&in[ 4]));
-               *((u_int32_t *)(&out[ 8])) = iv_i[2]^*((const u_int32_t *)(&in[ 8]));
-               *((u_int32_t *)(&out[12])) = iv_i[3]^*((const u_int32_t *)(&in[12]));
+               *((uint32_t *)(&out[ 0])) = iv_i[0]^*((const uint32_t *)(&in[ 0]));
+               *((uint32_t *)(&out[ 4])) = iv_i[1]^*((const uint32_t *)(&in[ 4]));
+               *((uint32_t *)(&out[ 8])) = iv_i[2]^*((const uint32_t *)(&in[ 8]));
+               *((uint32_t *)(&out[12])) = iv_i[3]^*((const uint32_t *)(&in[12]));
                encrypt_block(this, out, out);
                in+=16;
                out+=16;
@@ -887,8 +887,8 @@ METHOD(crypter_t, get_key_size, size_t,
 METHOD(crypter_t, set_key, bool,
        private_aes_crypter_t *this, chunk_t key)
 {
-       u_int32_t    *kf, *kt, rci, f = 0;
-       u_int8_t *in_key = key.ptr;
+       uint32_t    *kf, *kt, rci, f = 0;
+       uint8_t *in_key = key.ptr;
 
        this->aes_Nrnd = (this->aes_Nkey > (nc) ? this->aes_Nkey : (nc)) + 6;
 
@@ -948,7 +948,7 @@ METHOD(crypter_t, set_key, bool,
 
        if(!f)
        {
-               u_int32_t i;
+               uint32_t i;
 
                kt = this->aes_d_key + nc * this->aes_Nrnd;
                kf = this->aes_e_key;
index d523bc17a7f54e9b0b62d55515c567be0ea129f2..12074860e521f0a7455112a96ae6b0c83da6cddd 100644 (file)
@@ -83,7 +83,7 @@ struct private_aesni_ccm_t {
  * First block with control information
  */
 typedef struct __attribute__((packed)) {
-       BITFIELD4(u_int8_t,
+       BITFIELD4(uint8_t,
                /* size of p length field q, as q-1 */
                q_len: 3,
                /* size of our ICV t, as (t-2)/2 */
@@ -105,7 +105,7 @@ typedef struct __attribute__((packed)) {
  * Counter block
  */
 typedef struct __attribute__((packed)) {
-       BITFIELD3(u_int8_t,
+       BITFIELD3(uint8_t,
                /* size of p length field q, as q-1 */
                q_len: 3,
                zero: 3,
@@ -140,7 +140,7 @@ static void build_b0(private_aesni_ccm_t *this, size_t len, size_t alen,
 /**
  * Build a counter block for counter i
  */
-static void build_ctr(private_aesni_ccm_t *this, u_int32_t i, u_char *iv,
+static void build_ctr(private_aesni_ccm_t *this, uint32_t i, u_char *iv,
                                          void *out)
 {
        ctr_t *ctr = out;
@@ -157,7 +157,7 @@ static void build_ctr(private_aesni_ccm_t *this, u_int32_t i, u_char *iv,
  * Calculate the ICV for the b0 and associated data
  */
 static __m128i icv_header(private_aesni_ccm_t *this, size_t len, u_char *iv,
-                                                 u_int16_t alen, u_char *assoc)
+                                                 uint16_t alen, u_char *assoc)
 {
        __m128i *ks, b, t, c;
        u_int i, round, blocks, rem;
index d6a87e6d7dccda1803c49fcd04ecf415b6dc60cb..07580c822031157827c6c31ef55df7c2ccf11806 100644 (file)
@@ -65,7 +65,7 @@ struct private_mac_t {
 };
 
 METHOD(mac_t, get_mac, bool,
-       private_mac_t *this, chunk_t data, u_int8_t *out)
+       private_mac_t *this, chunk_t data, uint8_t *out)
 {
        __m128i *ks, t, l, *bi;
        u_int blocks, rem, i;
index 989813814826e1b9a3af830c25e809cb33ffd637..d9a555a85f2e07fa88ea9e7a6ceca5c7c2987dd1 100644 (file)
@@ -61,7 +61,7 @@ struct private_aesni_ctr_t {
        struct {
                char nonce[4];
                char iv[8];
-               u_int32_t counter;
+               uint32_t counter;
        } __attribute__((packed, aligned(sizeof(__m128i)))) state;
 };
 
index 53c0b144ede6342237a1e57b51f4355b3008184b..330dc6cd39b9e8dc0ba9c1355764554ecc511d26 100644 (file)
@@ -316,7 +316,7 @@ static __m128i icv_tailer(private_aesni_gcm_t *this, __m128i y,
        __m128i b;
 
        htoun64(&b, alen * 8);
-       htoun64((u_char*)&b + sizeof(u_int64_t), dlen * 8);
+       htoun64((u_char*)&b + sizeof(uint64_t), dlen * 8);
 
        return ghash(this->h, y, b);
 }
index 24a75cec0be021b78cd2863f042e127cca458d88..974c5fedcafe25ed326a494f034967c868038de8 100644 (file)
@@ -70,7 +70,7 @@ struct private_aesni_mac_t {
 };
 
 METHOD(mac_t, get_mac, bool,
-       private_aesni_mac_t *this, chunk_t data, u_int8_t *out)
+       private_aesni_mac_t *this, chunk_t data, uint8_t *out)
 {
        __m128i *ks, e, *bi;
        u_int blocks, rem, i;
index 6119755334179944a89049f610fb542555e58d86..62fea51cc085fcdad2e07c2e46c6f34d1db5f7da 100644 (file)
@@ -107,7 +107,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_af_alg_hasher_t *this, chunk_t chunk, u_int8_t *hash)
+       private_af_alg_hasher_t *this, chunk_t chunk, uint8_t *hash)
 {
        return this->ops->hash(this->ops, chunk, hash, this->size);
 }
index 331d1e8010aaf21f925538e48125c61a4512922b..7e129300fb72fdf6c6e54a5b6b42433b182b1309 100644 (file)
@@ -108,7 +108,7 @@ METHOD(af_alg_ops_t, hash, bool,
 }
 
 METHOD(af_alg_ops_t, crypt, bool,
-       private_af_alg_ops_t *this, u_int32_t type, chunk_t iv, chunk_t data,
+       private_af_alg_ops_t *this, uint32_t type, chunk_t iv, chunk_t data,
        char *out)
 {
        struct msghdr msg = {};
index e34f229777a63f20f216d037b1736c4aa2e9f7f3..51342d71cb6beda4d8fc50fc686feda8e53b4745 100644 (file)
@@ -64,7 +64,7 @@ struct af_alg_ops_t {
         * @param out           buffer write processed data to
         * @return                      TRUE if successful
         */
-       bool (*crypt)(af_alg_ops_t *this, u_int32_t type, chunk_t iv, chunk_t data,
+       bool (*crypt)(af_alg_ops_t *this, uint32_t type, chunk_t iv, chunk_t data,
                                  char *out);
 
        /**
index 2b7d51376a1caefdb1855b108dc6c9bad5fc0917..8c3627a22db7d6cec19d6f9d39ef255289cad9f4 100644 (file)
@@ -106,7 +106,7 @@ static size_t lookup_alg(pseudo_random_function_t algo, char **name, bool *xcbc)
 }
 
 METHOD(prf_t, get_bytes, bool,
-       private_af_alg_prf_t *this, chunk_t seed, u_int8_t *buffer)
+       private_af_alg_prf_t *this, chunk_t seed, uint8_t *buffer)
 {
        return this->ops->hash(this->ops, seed, buffer, this->block_size);
 }
index 1403144abd743d452a87efdc65144af629884b91..e54b457e7880d5116bfe4d4144e7c08383ba4be9 100644 (file)
@@ -109,7 +109,7 @@ static size_t lookup_alg(integrity_algorithm_t algo, char **name,
 }
 
 METHOD(signer_t, get_signature, bool,
-       private_af_alg_signer_t *this, chunk_t data, u_int8_t *buffer)
+       private_af_alg_signer_t *this, chunk_t data, uint8_t *buffer)
 {
        return this->ops->hash(this->ops, data, buffer, this->block_size);
 }
index c2e82a9f16ed73c356d44718a4acf7df5721b3a8..bb55c45c00b1ea42fd81854953ebc92533750c4e 100644 (file)
@@ -98,18 +98,18 @@ static u_char read_byte(chunk_t *blob)
 }
 
 /**
- * read a u_int32_t from a blob
+ * read a uint32_t from a blob
  */
-static u_int32_t read_uint32(chunk_t *blob)
+static uint32_t read_uint32(chunk_t *blob)
 {
-       u_int32_t val;
+       uint32_t val;
 
-       if (blob->len < sizeof(u_int32_t))
+       if (blob->len < sizeof(uint32_t))
        {
                return 0;
        }
-       val = ntohl(*(u_int32_t*)blob->ptr);
-       *blob = chunk_skip(*blob, sizeof(u_int32_t));
+       val = ntohl(*(uint32_t*)blob->ptr);
+       *blob = chunk_skip(*blob, sizeof(uint32_t));
        return val;
 }
 
@@ -182,7 +182,7 @@ static bool read_key(private_agent_private_key_t *this, public_key_t *pubkey)
        blob = chunk_create(buf, sizeof(buf));
        blob.len = read(this->socket, blob.ptr, blob.len);
 
-       if (blob.len < sizeof(u_int32_t) + sizeof(u_char) ||
+       if (blob.len < sizeof(uint32_t) + sizeof(u_char) ||
                read_uint32(&blob) != blob.len ||
                read_byte(&blob) != SSH_AGENT_ID_RESPONSE)
        {
@@ -236,7 +236,7 @@ METHOD(private_key_t, sign, bool,
        private_agent_private_key_t *this, signature_scheme_t scheme,
        chunk_t data, chunk_t *signature)
 {
-       u_int32_t len, flags;
+       uint32_t len, flags;
        char buf[2048];
        chunk_t blob;
 
@@ -247,7 +247,7 @@ METHOD(private_key_t, sign, bool,
                return FALSE;
        }
 
-       len = htonl(1 + sizeof(u_int32_t) * 3 + this->key.len + data.len);
+       len = htonl(1 + sizeof(uint32_t) * 3 + this->key.len + data.len);
        buf[0] = SSH_AGENT_SIGN_REQUEST;
        if (write(this->socket, &len, sizeof(len)) != sizeof(len) ||
                write(this->socket, &buf, 1) != 1)
@@ -281,7 +281,7 @@ METHOD(private_key_t, sign, bool,
 
        blob = chunk_create(buf, sizeof(buf));
        blob.len = read(this->socket, blob.ptr, blob.len);
-       if (blob.len < sizeof(u_int32_t) + sizeof(u_char) ||
+       if (blob.len < sizeof(uint32_t) + sizeof(u_char) ||
                read_uint32(&blob) != blob.len ||
                read_byte(&blob) != SSH_AGENT_SIGN_RESPONSE)
        {
index 9aa30df4b2c1718139a7b407a0cf5e6322d279e1..ad853afd80c9beec031dcaf2033f60aa9be56231 100644 (file)
@@ -98,7 +98,7 @@ extern "C" {
 #else
 #include <sys/types.h>
 #endif
-#define BF_LONG u_int32_t
+#define BF_LONG uint32_t
 #endif
 
 #define BF_ROUNDS      16
index 253f9b4a49fef17e62450a1b8298fe908402325f..1708e078d7a1a31958eb81b72e6a3eaff7fbec9d 100644 (file)
@@ -84,14 +84,14 @@ struct private_blowfish_crypter_t {
        /**
        * Key size of this Blowfish cipher object.
        */
-       u_int32_t key_size;
+       uint32_t key_size;
 };
 
 METHOD(crypter_t, decrypt, bool,
        private_blowfish_crypter_t *this, chunk_t data, chunk_t iv,
        chunk_t *decrypted)
 {
-       u_int8_t *in, *out;
+       uint8_t *in, *out;
 
        if (decrypted)
        {
@@ -116,7 +116,7 @@ METHOD(crypter_t, encrypt, bool,
        private_blowfish_crypter_t *this, chunk_t data, chunk_t iv,
        chunk_t *encrypted)
 {
-       u_int8_t *in, *out;
+       uint8_t *in, *out;
 
        if (encrypted)
        {
index 676d676815e67b50da22d84c322a749e49ad6e50..9cf9bedf54cabe41c2cb2dbfcaecc1c6d803b90e 100644 (file)
@@ -60,7 +60,7 @@ struct private_ccm_aead_t {
  * First block with control information
  */
 typedef struct __attribute__((packed)) {
-       BITFIELD4(u_int8_t,
+       BITFIELD4(uint8_t,
                /* size of p length field q, as q-1 */
                q_len: 3,
                /* size of our ICV t, as (t-2)/2 */
@@ -82,7 +82,7 @@ typedef struct __attribute__((packed)) {
  * Counter block
  */
 typedef struct __attribute__((packed)) {
-       BITFIELD3(u_int8_t,
+       BITFIELD3(uint8_t,
                /* size of p length field q, as q-1 */
                q_len: 3,
                zero: 3,
@@ -117,7 +117,7 @@ static void build_b0(private_ccm_aead_t *this, chunk_t plain, chunk_t assoc,
 /**
  * Build a counter block for counter i
  */
-static void build_ctr(private_ccm_aead_t *this, u_int32_t i, chunk_t iv,
+static void build_ctr(private_ccm_aead_t *this, uint32_t i, chunk_t iv,
                                          char *out)
 {
        ctr_t *ctr = (ctr_t*)out;
index 50ad84b218a57d54b89bfd712de49b751b812fd2..39d51e9f8d255fe13bb4ec26e2deff70dd53177a 100644 (file)
@@ -84,8 +84,8 @@ static bool poly_head(private_chapoly_aead_t *this, u_char *assoc, size_t len)
 static bool poly_tail(private_chapoly_aead_t *this, size_t alen, size_t clen)
 {
        struct {
-               u_int64_t alen;
-               u_int64_t clen;
+               uint64_t alen;
+               uint64_t clen;
        } b;
 
        b.alen = htole64(alen);
@@ -190,7 +190,7 @@ METHOD(aead_t, encrypt, bool,
 {
        u_char *out;
 
-       if (sizeof(plain.len) > sizeof(u_int32_t) && plain.len > P_MAX)
+       if (sizeof(plain.len) > sizeof(uint32_t) && plain.len > P_MAX)
        {
                return FALSE;
        }
@@ -220,7 +220,7 @@ METHOD(aead_t, decrypt, bool,
                return FALSE;
        }
        encr.len -= POLY_ICV_SIZE;
-       if (sizeof(encr.len) > sizeof(u_int32_t) && encr.len > P_MAX)
+       if (sizeof(encr.len) > sizeof(uint32_t) && encr.len > P_MAX)
        {
                return FALSE;
        }
index dfed4d53d73698b9ff7d4d5a17520bdd1465d8b2..59962b819fc861f953da045c451c5e363c2f4c7b 100644 (file)
@@ -39,30 +39,30 @@ struct private_chapoly_drv_portable_t {
        /**
         * ChaCha20 state matrix
         */
-       u_int32_t m[16];
+       uint32_t m[16];
 
        /**
         * Poly1305 update key
         */
-       u_int32_t r[5];
+       uint32_t r[5];
 
        /**
         * Poly1305 state
         */
-       u_int32_t h[5];
+       uint32_t h[5];
 
        /**
         * Poly1305 finalize key
         */
-       u_int32_t s[4];
+       uint32_t s[4];
 };
 
 /**
  * XOR a 32-bit integer into an unaligned destination
  */
-static inline void xor32u(void *p, u_int32_t x)
+static inline void xor32u(void *p, uint32_t x)
 {
-       u_int32_t y;
+       uint32_t y;
 
        memcpy(&y, p, sizeof(y));
        y ^= x;
@@ -72,7 +72,7 @@ static inline void xor32u(void *p, u_int32_t x)
 /**
  * Multiply two 64-bit words
  */
-static inline u_int64_t mlt(u_int64_t a, u_int64_t b)
+static inline uint64_t mlt(uint64_t a, uint64_t b)
 {
        return a * b;
 }
@@ -80,7 +80,7 @@ static inline u_int64_t mlt(u_int64_t a, u_int64_t b)
 /**
  * Shift a 64-bit unsigned integer v right by n bits, clamp to 32 bit
 */
-static inline u_int32_t sr(u_int64_t v, u_char n)
+static inline uint32_t sr(uint64_t v, u_char n)
 {
        return v >> n;
 }
@@ -88,13 +88,13 @@ static inline u_int32_t sr(u_int64_t v, u_char n)
 /**
  * Circular left shift by n bits
  */
-static inline u_int32_t rotl32(u_int32_t v, u_char n)
+static inline uint32_t rotl32(uint32_t v, u_char n)
 {
        return (v << n) | (v >> (sizeof(v) * 8 - n));
 }
 
 /**
- * AND two values, using a native integer size >= sizeof(u_int32_t)
+ * AND two values, using a native integer size >= sizeof(uint32_t)
  */
 static inline u_long and(u_long v, u_long mask)
 {
@@ -106,8 +106,8 @@ static inline u_long and(u_long v, u_long mask)
  */
 static void chacha_block_xor(private_chapoly_drv_portable_t *this, void *data)
 {
-       u_int32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xa, xb, xc, xd, xe, xf;
-       u_int32_t *out = data;
+       uint32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xa, xb, xc, xd, xe, xf;
+       uint32_t *out = data;
        u_int i;
 
        x0 = this->m[ 0];
@@ -246,10 +246,10 @@ METHOD(chapoly_drv_t, init, bool,
 METHOD(chapoly_drv_t, poly, bool,
        private_chapoly_drv_portable_t *this, u_char *data, u_int blocks)
 {
-       u_int32_t r0, r1, r2, r3, r4;
-       u_int32_t s1, s2, s3, s4;
-       u_int32_t h0, h1, h2, h3, h4;
-       u_int64_t d0, d1, d2, d3, d4;
+       uint32_t r0, r1, r2, r3, r4;
+       uint32_t s1, s2, s3, s4;
+       uint32_t h0, h1, h2, h3, h4;
+       uint64_t d0, d1, d2, d3, d4;
        u_int i;
 
        r0 = this->r[0];
@@ -345,10 +345,10 @@ METHOD(chapoly_drv_t, decrypt, bool,
 METHOD(chapoly_drv_t, finish, bool,
        private_chapoly_drv_portable_t *this, u_char *mac)
 {
-       u_int32_t h0, h1, h2, h3, h4;
-       u_int32_t g0, g1, g2, g3, g4;
-       u_int32_t mask;
-       u_int64_t f = 0;
+       uint32_t h0, h1, h2, h3, h4;
+       uint32_t g0, g1, g2, g3, g4;
+       uint32_t mask;
+       uint64_t f = 0;
 
        /* fully carry h */
        h0 = this->h[0];
@@ -371,7 +371,7 @@ METHOD(chapoly_drv_t, finish, bool,
        g4 = h4 + (g3 >> 26) - (1 << 26); g3 &= 0x3ffffff;
 
        /* select h if h < p, or h + -p if h >= p */
-       mask = (g4 >> ((sizeof(u_int32_t) * 8) - 1)) - 1;
+       mask = (g4 >> ((sizeof(uint32_t) * 8) - 1)) - 1;
        g0 &= mask;
        g1 &= mask;
        g2 &= mask;
index df88e7d773b26c955ffbc2b18e692c5b5dfd4372..3981ed52274a67ca761b1c56d3e001f9ef48c484 100644 (file)
@@ -45,30 +45,30 @@ struct private_chapoly_drv_ssse3_t {
        /**
         * Poly1305 update key
         */
-       u_int32_t r[5];
+       uint32_t r[5];
 
        /**
         * Poly1305 update key r^2
         */
-       u_int32_t u[5];
+       uint32_t u[5];
 
        /**
         * Poly1305 state
         */
-       u_int32_t h[5];
+       uint32_t h[5];
 
        /**
         * Poly1305 finalize key
         */
-       u_int32_t s[4];
+       uint32_t s[4];
 };
 
 /**
  * Read a 32-bit integer from an unaligned address
  */
-static inline u_int32_t ru32(void *p)
+static inline uint32_t ru32(void *p)
 {
-       u_int32_t ret;
+       uint32_t ret;
 
        memcpy(&ret, p, sizeof(ret));
        return ret;
@@ -77,7 +77,7 @@ static inline u_int32_t ru32(void *p)
 /**
  * Write a 32-bit word to an unaligned address
  */
-static inline void wu32(void *p, u_int32_t v)
+static inline void wu32(void *p, uint32_t v)
 {
        memcpy(p, &v, sizeof(v));
 }
@@ -85,13 +85,13 @@ static inline void wu32(void *p, u_int32_t v)
 /**
  * Shift a 64-bit unsigned integer v right by n bits, clamp to 32 bit
 */
-static inline u_int32_t sr(u_int64_t v, u_char n)
+static inline uint32_t sr(uint64_t v, u_char n)
 {
        return v >> n;
 }
 
 /**
- * AND two values, using a native integer size >= sizeof(u_int32_t)
+ * AND two values, using a native integer size >= sizeof(uint32_t)
  */
 static inline u_long and(u_long v, u_long mask)
 {
@@ -189,7 +189,7 @@ static void chacha_4block_xor(private_chapoly_drv_ssse3_t *this, void *data)
 {
        __m128i x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xa, xb, xc, xd, xe, xf;
        __m128i r8, r16, ctrinc, t, *out = data;
-       u_int32_t *m = (u_int32_t*)this->m;
+       uint32_t *m = (uint32_t*)this->m;
        u_int i;
 
        r8  = _mm_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3);
@@ -364,7 +364,7 @@ METHOD(chapoly_drv_t, set_key, bool,
 /**
  * r[127:64] = h[95:64] * a, r[63:0] = h[31:0] * b
  */
-static inline __m128i mul2(__m128i h, u_int32_t a, u_int32_t b)
+static inline __m128i mul2(__m128i h, uint32_t a, uint32_t b)
 {
        return _mm_mul_epu32(h, _mm_set_epi32(0, a, 0, b));
 }
@@ -374,7 +374,7 @@ static inline __m128i mul2(__m128i h, u_int32_t a, u_int32_t b)
  * z = x[127:64] + x[63:0] + y[127:64] + y[63:0]
  */
 static inline void sum2(__m128i a, __m128i b, __m128i x, __m128i y,
-                                               u_int64_t *c, u_int64_t *z)
+                                               uint64_t *c, uint64_t *z)
 {
        __m128i r, s;
 
@@ -392,10 +392,10 @@ static inline void sum2(__m128i a, __m128i b, __m128i x, __m128i y,
  * r = a[127:64] + b[127:64] + c[127:64] + d[127:64] + e[127:64]
  *   + a[63:0]   + b[63:0]   + c[63:0]   + d[63:0]   + e[63:0]
  */
-static inline u_int64_t sum5(__m128i a, __m128i b, __m128i c,
+static inline uint64_t sum5(__m128i a, __m128i b, __m128i c,
                                                         __m128i d, __m128i e)
 {
-       u_int64_t r;
+       uint64_t r;
 
        a = _mm_add_epi64(a, b);
        c = _mm_add_epi64(c, d);
@@ -414,10 +414,10 @@ static inline u_int64_t sum5(__m128i a, __m128i b, __m128i c,
 static void make_u(private_chapoly_drv_ssse3_t *this)
 {
        __m128i r01, r23, r44, x0, x1, y0, y1, z0;
-       u_int32_t r0, r1, r2, r3, r4;
-       u_int32_t u0, u1, u2, u3, u4;
-       u_int32_t s1, s2, s3, s4;
-       u_int64_t d0, d1, d2, d3, d4;
+       uint32_t r0, r1, r2, r3, r4;
+       uint32_t u0, u1, u2, u3, u4;
+       uint32_t s1, s2, s3, s4;
+       uint64_t d0, d1, d2, d3, d4;
 
        r0 = this->r[0];
        r1 = this->r[1];
@@ -513,12 +513,12 @@ METHOD(chapoly_drv_t, init, bool,
  */
 static void poly2(private_chapoly_drv_ssse3_t *this, u_char *data, u_int dblks)
 {
-       u_int32_t r0, r1, r2, r3, r4, u0, u1, u2, u3, u4;
-       u_int32_t s1, s2, s3, s4, v1, v2, v3, v4;
+       uint32_t r0, r1, r2, r3, r4, u0, u1, u2, u3, u4;
+       uint32_t s1, s2, s3, s4, v1, v2, v3, v4;
        __m128i hc0, hc1, hc2, hc3, hc4;
-       u_int32_t h0, h1, h2, h3, h4;
-       u_int32_t c0, c1, c2, c3, c4;
-       u_int64_t d0, d1, d2, d3, d4;
+       uint32_t h0, h1, h2, h3, h4;
+       uint32_t c0, c1, c2, c3, c4;
+       uint64_t d0, d1, d2, d3, d4;
        u_int i;
 
        r0 = this->r[0];
@@ -622,13 +622,13 @@ static void poly2(private_chapoly_drv_ssse3_t *this, u_char *data, u_int dblks)
  */
 static void poly1(private_chapoly_drv_ssse3_t *this, u_char *data)
 {
-       u_int32_t r0, r1, r2, r3, r4;
-       u_int32_t s1, s2, s3, s4;
-       u_int32_t h0, h1, h2, h3, h4;
-       u_int64_t d0, d1, d2, d3, d4;
+       uint32_t r0, r1, r2, r3, r4;
+       uint32_t s1, s2, s3, s4;
+       uint32_t h0, h1, h2, h3, h4;
+       uint64_t d0, d1, d2, d3, d4;
        __m128i h01, h23, h44;
        __m128i x0, x1, y0, y1, z0;
-       u_int32_t t0, t1;
+       uint32_t t0, t1;
 
        r0 = this->r[0];
        r1 = this->r[1];
@@ -764,10 +764,10 @@ METHOD(chapoly_drv_t, decrypt, bool,
 METHOD(chapoly_drv_t, finish, bool,
        private_chapoly_drv_ssse3_t *this, u_char *mac)
 {
-       u_int32_t h0, h1, h2, h3, h4;
-       u_int32_t g0, g1, g2, g3, g4;
-       u_int32_t mask;
-       u_int64_t f = 0;
+       uint32_t h0, h1, h2, h3, h4;
+       uint32_t g0, g1, g2, g3, g4;
+       uint32_t mask;
+       uint64_t f = 0;
 
        /* fully carry h */
        h0 = this->h[0];
@@ -790,7 +790,7 @@ METHOD(chapoly_drv_t, finish, bool,
        g4 = h4 + (g3 >> 26) - (1 << 26); g3 &= 0x3ffffff;
 
        /* select h if h < p, or h + -p if h >= p */
-       mask = (g4 >> ((sizeof(u_int32_t) * 8) - 1)) - 1;
+       mask = (g4 >> ((sizeof(uint32_t) * 8) - 1)) - 1;
        g0 &= mask;
        g1 &= mask;
        g2 &= mask;
index 4f222ff4e1f46b2fbeffa406475b4328c4119fa2..22f077f58fedd76005696caaff12da8b73478915 100644 (file)
@@ -39,7 +39,7 @@ struct private_mac_t {
        /**
         * Block size, in bytes
         */
-       u_int8_t b;
+       uint8_t b;
 
        /**
         * Crypter with key K
@@ -49,22 +49,22 @@ struct private_mac_t {
        /**
         * K1
         */
-       u_int8_t *k1;
+       uint8_t *k1;
 
        /**
         * K2
         */
-       u_int8_t *k2;
+       uint8_t *k2;
 
        /**
         * T
         */
-       u_int8_t *t;
+       uint8_t *t;
 
        /**
         * remaining, unprocessed bytes in append mode
         */
-       u_int8_t *remaining;
+       uint8_t *remaining;
 
        /**
         * number of bytes in remaining
@@ -127,7 +127,7 @@ static bool update(private_mac_t *this, chunk_t data)
 /**
  * process last block M_last
  */
-static bool final(private_mac_t *this, u_int8_t *out)
+static bool final(private_mac_t *this, uint8_t *out)
 {
        chunk_t iv;
 
@@ -179,7 +179,7 @@ static bool final(private_mac_t *this, u_int8_t *out)
 }
 
 METHOD(mac_t, get_mac, bool,
-       private_mac_t *this, chunk_t data, u_int8_t *out)
+       private_mac_t *this, chunk_t data, uint8_t *out)
 {
        /* update T, do not process last block */
        if (!update(this, data))
@@ -316,7 +316,7 @@ mac_t *cmac_create(encryption_algorithm_t algo, size_t key_size)
 {
        private_mac_t *this;
        crypter_t *crypter;
-       u_int8_t b;
+       uint8_t b;
 
        crypter = lib->crypto->create_crypter(lib->crypto, algo, key_size);
        if (!crypter)
index 59d201a6fbe5202bdb76ee57c41c0f46500d1754..854030b8c15c946d7bfe9dfda23dc3d061d1bfbb 100644 (file)
@@ -38,7 +38,7 @@ struct private_ctr_ipsec_crypter_t {
        struct {
                char nonce[4];
                char iv[8];
-               u_int32_t counter;
+               uint32_t counter;
        } __attribute__((packed)) state;
 };
 
index 6010f9d8b4b5ccbe87eab89be9bca9077ed9c736..d236bd42923807c6fe6e1e018774fdd736abdd22 100644 (file)
@@ -96,7 +96,7 @@ struct private_des_crypter_t {
 #define DES_ENCRYPT 1
 #define DES_DECRYPT 0
 
-#define DES_LONG u_int32_t
+#define DES_LONG uint32_t
 
 #if defined(WIN32) || defined(WIN16)
 #ifndef MSDOS
@@ -1420,7 +1420,7 @@ METHOD(crypter_t, decrypt, bool,
        private_des_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted)
 {
        des_cblock ivb;
-       u_int8_t *out;
+       uint8_t *out;
 
        out = data.ptr;
        if (decrypted)
@@ -1439,7 +1439,7 @@ METHOD(crypter_t, encrypt, bool,
        private_des_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted)
 {
        des_cblock ivb;
-       u_int8_t *out;
+       uint8_t *out;
 
        out = data.ptr;
        if (encrypted)
@@ -1456,7 +1456,7 @@ METHOD(crypter_t, encrypt, bool,
 METHOD(crypter_t, decrypt_ecb, bool,
        private_des_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted)
 {
-       u_int8_t *out;
+       uint8_t *out;
 
        out = data.ptr;
        if (decrypted)
@@ -1472,7 +1472,7 @@ METHOD(crypter_t, decrypt_ecb, bool,
 METHOD(crypter_t, encrypt_ecb, bool,
        private_des_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted)
 {
-       u_int8_t *out;
+       uint8_t *out;
 
        out = data.ptr;
        if (encrypted)
@@ -1489,7 +1489,7 @@ METHOD(crypter_t, decrypt3, bool,
        private_des_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted)
 {
        des_cblock ivb;
-       u_int8_t *out;
+       uint8_t *out;
 
        out = data.ptr;
        if (decrypted)
@@ -1508,7 +1508,7 @@ METHOD(crypter_t, encrypt3, bool,
        private_des_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted)
 {
        des_cblock ivb;
-       u_int8_t *out;
+       uint8_t *out;
 
        out = data.ptr;
        if (encrypted)
index 71040437d6e4f5e132531f342324baa6378c7a8a..fd2471a482dd447f0509f548b7722342dfa608d6 100644 (file)
@@ -26,10 +26,10 @@ typedef enum dnskey_algorithm_t dnskey_algorithm_t;
  * Header of a DNSKEY resource record
  */
 struct dnskey_rr_t {
-       u_int16_t flags;
-       u_int8_t protocol;
-       u_int8_t algorithm;
-       u_int8_t data[];
+       uint16_t flags;
+       uint8_t protocol;
+       uint8_t algorithm;
+       uint8_t data[];
 } __attribute__((__packed__));
 
 /**
index 92977909e538065a9215191a8792fb5e3e26e63e..47676b32fa34a6ce07b2621435e61f97769064e2 100644 (file)
@@ -31,7 +31,7 @@ struct private_fips_prf_t {
        /**
         * key of prf function, "b" long
         */
-       u_int8_t *key;
+       uint8_t *key;
 
        /**
         * size of "b" in bytes
@@ -46,19 +46,19 @@ struct private_fips_prf_t {
        /**
         * G function, either SHA1 or DES
         */
-       bool (*g)(private_fips_prf_t *this, chunk_t c, u_int8_t res[]);
+       bool (*g)(private_fips_prf_t *this, chunk_t c, uint8_t res[]);
 };
 
 /**
  * sum = (a + b) mod 2 ^ (length * 8)
  */
-static void add_mod(size_t length, u_int8_t a[], u_int8_t b[], u_int8_t sum[])
+static void add_mod(size_t length, uint8_t a[], uint8_t b[], uint8_t sum[])
 {
        int i, c = 0;
 
        for(i = length - 1; i >= 0; i--)
        {
-               u_int32_t tmp;
+               uint32_t tmp;
 
                tmp = a[i] + b[i] + c;
                sum[i] = 0xff & tmp;
@@ -69,7 +69,7 @@ static void add_mod(size_t length, u_int8_t a[], u_int8_t b[], u_int8_t sum[])
 /**
  * calculate "chunk mod 2^(length*8)" and save it into buffer
  */
-static void chunk_mod(size_t length, chunk_t chunk, u_int8_t buffer[])
+static void chunk_mod(size_t length, chunk_t chunk, uint8_t buffer[])
 {
        if (chunk.len < length)
        {
@@ -105,14 +105,14 @@ static void chunk_mod(size_t length, chunk_t chunk, u_int8_t buffer[])
  * 0x8e, 0x20, 0xd7, 0x37, 0xa3, 0x27, 0x51, 0x16
  */
 METHOD(prf_t, get_bytes, bool,
-       private_fips_prf_t *this, chunk_t seed, u_int8_t w[])
+       private_fips_prf_t *this, chunk_t seed, uint8_t w[])
 {
        int i;
-       u_int8_t xval[this->b];
-       u_int8_t xseed[this->b];
-       u_int8_t sum[this->b];
-       u_int8_t *xkey = this->key;
-       u_int8_t one[this->b];
+       uint8_t xval[this->b];
+       uint8_t xseed[this->b];
+       uint8_t sum[this->b];
+       uint8_t *xkey = this->key;
+       uint8_t one[this->b];
 
        if (!w)
        {
@@ -175,9 +175,9 @@ METHOD(prf_t, set_key, bool,
 /**
  * Implementation of the G() function based on SHA1
  */
-static bool g_sha1(private_fips_prf_t *this, chunk_t c, u_int8_t res[])
+static bool g_sha1(private_fips_prf_t *this, chunk_t c, uint8_t res[])
 {
-       u_int8_t buf[64];
+       uint8_t buf[64];
 
        if (c.len < sizeof(buf))
        {
index 6e1694a34f52f4c96b7e49e1422359b2b94f94a2..e9a07246170880e5fb94da6e0f303de8c9a07aa1 100644 (file)
@@ -67,11 +67,11 @@ struct private_gcm_aead_t {
 #if ULONG_MAX == 18446744073709551615UL && defined(htobe64)
 #      define htobeword htobe64
 #      define bewordtoh be64toh
-#      define SHIFT_WORD_TYPE u_int64_t
+#      define SHIFT_WORD_TYPE uint64_t
 #else
 #      define htobeword htonl
 #      define bewordtoh ntohl
-#      define SHIFT_WORD_TYPE u_int32_t
+#      define SHIFT_WORD_TYPE uint32_t
 #endif
 
 /**
index a737cb13dcc1b62482866679f6c0082875a929ec..80a8dc90de94947b399cf325375ae4cd0421aefd 100644 (file)
@@ -52,7 +52,7 @@ struct private_gcrypt_crypter_t {
        struct {
                char nonce[4];
                char iv[8];
-               u_int32_t counter;
+               uint32_t counter;
        } __attribute__((packed)) ctr;
 };
 
index af7993101b428e548b82262f7b4315f163cdc09c..199c1d6c942a5bd6e28e059ef61e2c12e32e5fea 100644 (file)
@@ -51,7 +51,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_gcrypt_hasher_t *this, chunk_t chunk, u_int8_t *hash)
+       private_gcrypt_hasher_t *this, chunk_t chunk, uint8_t *hash)
 {
        gcry_md_write(this->hd, chunk.ptr, chunk.len);
        if (hash)
index dc34a8d6622b20d4ff6c54d8bc1b7f2cafe40974..bf11758b1e1f313d4189074e53d3881e29b1ef1c 100644 (file)
@@ -36,7 +36,7 @@ struct private_gcrypt_rng_t {
 };
 
 METHOD(rng_t, get_bytes, bool,
-       private_gcrypt_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_gcrypt_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        switch (this->quality)
        {
index 052b10741d7aec6ad7e6a4877d279dc2bb288c68..e5d418ea4c1e2eb367e0452bad62e6ae827068a0 100644 (file)
@@ -142,7 +142,7 @@ chunk_t gmp_mpz_to_chunk(const mpz_t value)
 static void mpz_clear_sensitive(mpz_t z)
 {
        size_t len = mpz_size(z) * GMP_LIMB_BITS / BITS_PER_BYTE;
-       u_int8_t *zeros = alloca(len);
+       uint8_t *zeros = alloca(len);
 
        memset(zeros, 0, len);
        /* overwrite mpz_t with zero bytes before clearing it */
index 96a14aed9fab583b6bb08cf6a8f75aed23a6ac61..c777b47cd38a4d7c488884dc7580a6ef9700ec68 100644 (file)
@@ -38,7 +38,7 @@ struct private_mac_t {
        /**
         * Block size, as in RFC.
         */
-       u_int8_t b;
+       uint8_t b;
 
        /**
         * Hash function.
@@ -57,7 +57,7 @@ struct private_mac_t {
 };
 
 METHOD(mac_t, get_mac, bool,
-       private_mac_t *this, chunk_t data, u_int8_t *out)
+       private_mac_t *this, chunk_t data, uint8_t *out)
 {
        /* H(K XOR opad, H(K XOR ipad, text))
         *
@@ -66,7 +66,7 @@ METHOD(mac_t, get_mac, bool,
         *
         */
 
-       u_int8_t buffer[this->h->get_hash_size(this->h)];
+       uint8_t buffer[this->h->get_hash_size(this->h)];
        chunk_t inner;
 
        if (out == NULL)
@@ -96,7 +96,7 @@ METHOD(mac_t, set_key, bool,
        private_mac_t *this, chunk_t key)
 {
        int i;
-       u_int8_t buffer[this->b];
+       uint8_t buffer[this->b];
 
        memset(buffer, 0, this->b);
 
index 06c9ec2f8b805cd1ba6a578b0a1b8610b194c3c6..ada6c05dab38294cba6cf4191e5bf5dbbf7ebc5d 100644 (file)
@@ -39,7 +39,7 @@
 #define S33 11
 #define S34 15
 
-static u_int8_t PADDING[64] = {
+static uint8_t PADDING[64] = {
   0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -65,11 +65,11 @@ static u_int8_t PADDING[64] = {
     (a) = ROTATE_LEFT ((a), (s)); \
   }
 #define GG(a, b, c, d, x, s) { \
-    (a) += G ((b), (c), (d)) + (x) + (u_int32_t)0x5a827999; \
+    (a) += G ((b), (c), (d)) + (x) + (uint32_t)0x5a827999; \
     (a) = ROTATE_LEFT ((a), (s)); \
   }
 #define HH(a, b, c, d, x, s) { \
-    (a) += H ((b), (c), (d)) + (x) + (u_int32_t)0x6ed9eba1; \
+    (a) += H ((b), (c), (d)) + (x) + (uint32_t)0x6ed9eba1; \
     (a) = ROTATE_LEFT ((a), (s)); \
   }
 
@@ -87,40 +87,40 @@ struct private_md4_hasher_t {
        /*
         * State of the hasher.
         */
-       u_int32_t state[4];
-    u_int32_t count[2];
-    u_int8_t buffer[64];
+       uint32_t state[4];
+    uint32_t count[2];
+    uint8_t buffer[64];
 };
 
 #if BYTE_ORDER != LITTLE_ENDIAN
 
-/* Encodes input (u_int32_t) into output (u_int8_t). Assumes len is
+/* Encodes input (uint32_t) into output (uint8_t). Assumes len is
  * a multiple of 4.
  */
-static void Encode (u_int8_t *output, u_int32_t *input, size_t len)
+static void Encode (uint8_t *output, uint32_t *input, size_t len)
 {
        size_t i, j;
 
        for (i = 0, j = 0; j < len; i++, j += 4)
        {
-               output[j] = (u_int8_t)(input[i] & 0xff);
-               output[j+1] = (u_int8_t)((input[i] >> 8) & 0xff);
-               output[j+2] = (u_int8_t)((input[i] >> 16) & 0xff);
-               output[j+3] = (u_int8_t)((input[i] >> 24) & 0xff);
+               output[j] = (uint8_t)(input[i] & 0xff);
+               output[j+1] = (uint8_t)((input[i] >> 8) & 0xff);
+               output[j+2] = (uint8_t)((input[i] >> 16) & 0xff);
+               output[j+3] = (uint8_t)((input[i] >> 24) & 0xff);
        }
 }
 
-/* Decodes input (u_int8_t) into output (u_int32_t). Assumes len is
+/* Decodes input (uint8_t) into output (uint32_t). Assumes len is
  * a multiple of 4.
  */
-static void Decode(u_int32_t *output, u_int8_t *input, size_t len)
+static void Decode(uint32_t *output, uint8_t *input, size_t len)
 {
        size_t i, j;
 
        for (i = 0, j = 0; j < len; i++, j += 4)
        {
-               output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
-               (((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
+               output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
+               (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
        }
 }
 
@@ -132,9 +132,9 @@ static void Decode(u_int32_t *output, u_int8_t *input, size_t len)
 /*
  * MD4 basic transformation. Transforms state based on block.
  */
-static void MD4Transform(u_int32_t state[4], u_int8_t block[64])
+static void MD4Transform(uint32_t state[4], uint8_t block[64])
 {
-       u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+       uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 
        Decode(x, block, 64);
 
@@ -202,13 +202,13 @@ static void MD4Transform(u_int32_t state[4], u_int8_t block[64])
  * operation, processing another message block, and updating the
  * context.
  */
-static void MD4Update(private_md4_hasher_t *this, u_int8_t *input, size_t inputLen)
+static void MD4Update(private_md4_hasher_t *this, uint8_t *input, size_t inputLen)
 {
-       u_int32_t i;
+       uint32_t i;
        size_t index, partLen;
 
        /* Compute number of bytes mod 64 */
-       index = (u_int8_t)((this->count[0] >> 3) & 0x3F);
+       index = (uint8_t)((this->count[0] >> 3) & 0x3F);
 
        /* Update number of bits */
        if ((this->count[0] += (inputLen << 3)) < (inputLen << 3))
@@ -243,9 +243,9 @@ static void MD4Update(private_md4_hasher_t *this, u_int8_t *input, size_t inputL
 /* MD4 finalization. Ends an MD4 message-digest operation, writing the
  * the message digest and zeroizing the context.
  */
-static void MD4Final (private_md4_hasher_t *this, u_int8_t digest[16])
+static void MD4Final (private_md4_hasher_t *this, uint8_t digest[16])
 {
-       u_int8_t bits[8];
+       uint8_t bits[8];
        size_t index, padLen;
 
        /* Save number of bits */
@@ -280,7 +280,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_md4_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_md4_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        MD4Update(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
index 99b505e5880c00bd42b2b1f1e9d73952655e1f2f..d14c10ae56aaaa495cead24d168346f4769ad083 100644 (file)
@@ -42,7 +42,7 @@
 #define S43 15
 #define S44 21
 
-static u_int8_t PADDING[64] = {
+static uint8_t PADDING[64] = {
   0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -66,22 +66,22 @@ static u_int8_t PADDING[64] = {
 Rotation is separate from addition to prevent recomputation.
  */
 #define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += F ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
 #define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += G ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
 #define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += H ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
 #define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += I ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
@@ -102,41 +102,41 @@ struct private_md5_hasher_t {
        /*
         * State of the hasher.
         */
-       u_int32_t state[5];
-       u_int32_t count[2];
-       u_int8_t buffer[64];
+       uint32_t state[5];
+       uint32_t count[2];
+       uint8_t buffer[64];
 };
 
 
 #if BYTE_ORDER != LITTLE_ENDIAN
 
-/* Encodes input (u_int32_t) into output (u_int8_t). Assumes len is
+/* Encodes input (uint32_t) into output (uint8_t). Assumes len is
  * a multiple of 4.
  */
-static void Encode (u_int8_t *output, u_int32_t *input, size_t len)
+static void Encode (uint8_t *output, uint32_t *input, size_t len)
 {
        size_t i, j;
 
        for (i = 0, j = 0; j < len; i++, j += 4)
        {
-               output[j] = (u_int8_t)(input[i] & 0xff);
-               output[j+1] = (u_int8_t)((input[i] >> 8) & 0xff);
-               output[j+2] = (u_int8_t)((input[i] >> 16) & 0xff);
-               output[j+3] = (u_int8_t)((input[i] >> 24) & 0xff);
+               output[j] = (uint8_t)(input[i] & 0xff);
+               output[j+1] = (uint8_t)((input[i] >> 8) & 0xff);
+               output[j+2] = (uint8_t)((input[i] >> 16) & 0xff);
+               output[j+3] = (uint8_t)((input[i] >> 24) & 0xff);
        }
 }
 
-/* Decodes input (u_int8_t) into output (u_int32_t). Assumes len is
+/* Decodes input (uint8_t) into output (uint32_t). Assumes len is
  * a multiple of 4.
  */
-static void Decode(u_int32_t *output, u_int8_t *input, size_t len)
+static void Decode(uint32_t *output, uint8_t *input, size_t len)
 {
        size_t i, j;
 
        for (i = 0, j = 0; j < len; i++, j += 4)
        {
-               output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
-               (((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
+               output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
+               (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
        }
 }
 
@@ -147,9 +147,9 @@ static void Decode(u_int32_t *output, u_int8_t *input, size_t len)
 
 /* MD5 basic transformation. Transforms state based on block.
  */
-static void MD5Transform(u_int32_t state[4], u_int8_t block[64])
+static void MD5Transform(uint32_t state[4], uint8_t block[64])
 {
-       u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+       uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 
        Decode(x, block, 64);
 
@@ -235,13 +235,13 @@ static void MD5Transform(u_int32_t state[4], u_int8_t block[64])
  * operation, processing another message block, and updating the
  * context.
  */
-static void MD5Update(private_md5_hasher_t *this, u_int8_t *input, size_t inputLen)
+static void MD5Update(private_md5_hasher_t *this, uint8_t *input, size_t inputLen)
 {
-       u_int32_t i;
+       uint32_t i;
        size_t index, partLen;
 
        /* Compute number of bytes mod 64 */
-       index = (u_int8_t)((this->count[0] >> 3) & 0x3F);
+       index = (uint8_t)((this->count[0] >> 3) & 0x3F);
 
        /* Update number of bits */
        if ((this->count[0] += (inputLen << 3)) < (inputLen << 3))
@@ -276,9 +276,9 @@ static void MD5Update(private_md5_hasher_t *this, u_int8_t *input, size_t inputL
 /* MD5 finalization. Ends an MD5 message-digest operation, writing the
  * the message digest and zeroizing the context.
  */
-static void MD5Final (private_md5_hasher_t *this, u_int8_t digest[16])
+static void MD5Final (private_md5_hasher_t *this, uint8_t digest[16])
 {
-       u_int8_t bits[8];
+       uint8_t bits[8];
        size_t index, padLen;
 
        /* Save number of bits */
@@ -313,7 +313,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_md5_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_md5_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        MD5Update(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
index 64ed2e08d6fdc56b931063c9d74f99f46d95486b..22c161df6386086ba18c81216101691dae89fd57 100644 (file)
@@ -36,7 +36,7 @@ struct private_nonce_nonceg_t {
 };
 
 METHOD(nonce_gen_t, get_nonce, bool,
-       private_nonce_nonceg_t *this, size_t size, u_int8_t *buffer)
+       private_nonce_nonceg_t *this, size_t size, uint8_t *buffer)
 {
        return this->rng->get_bytes(this->rng, size, buffer);
 }
index ef0d3d9c89da65f5e1705a5435e3ba325625950b..b7a951d001389ec19b63c6f90698b1ee3e1c6753 100644 (file)
@@ -35,17 +35,17 @@ struct private_ntru_drbg_t {
        /**
         * Security strength in bits of the DRBG
         */
-       u_int32_t strength;
+       uint32_t strength;
 
        /**
         * Number of requests for pseudorandom bits
         */
-       u_int32_t reseed_counter;
+       uint32_t reseed_counter;
 
        /**
         * Maximum number of requests for pseudorandom bits
         */
-       u_int32_t max_requests;
+       uint32_t max_requests;
 
        /**
         * True entropy source
@@ -111,7 +111,7 @@ static bool update(private_ntru_drbg_t *this, chunk_t data)
        return TRUE;
 }
 
-METHOD(ntru_drbg_t, get_strength, u_int32_t,
+METHOD(ntru_drbg_t, get_strength, uint32_t,
        private_ntru_drbg_t *this)
 {
        return this->strength;
@@ -142,7 +142,7 @@ METHOD(ntru_drbg_t, reseed, bool,
 }
 
 METHOD(ntru_drbg_t, generate, bool,
-       private_ntru_drbg_t *this, u_int32_t strength, u_int32_t len, u_int8_t *out)
+       private_ntru_drbg_t *this, uint32_t strength, uint32_t len, uint8_t *out)
 {
        size_t delta;
        chunk_t output;
@@ -206,14 +206,14 @@ METHOD(ntru_drbg_t, destroy, void,
 /*
  * Described in header.
  */
-ntru_drbg_t *ntru_drbg_create(u_int32_t strength, chunk_t pers_str,
+ntru_drbg_t *ntru_drbg_create(uint32_t strength, chunk_t pers_str,
                                                          rng_t *entropy)
 {
        private_ntru_drbg_t *this;
        chunk_t seed;
        signer_t *hmac;
        size_t entropy_len;
-       u_int32_t max_requests;
+       uint32_t max_requests;
 
        if (strength > MAX_STRENGTH_BITS)
        {
index 83cef11bee60062ef6f9934ca6b30b87703301a2..3fee1800be0eb9a3f719d883c42a258e382cea06 100644 (file)
@@ -36,7 +36,7 @@ struct ntru_drbg_t {
         *
         * @return                      configured security strength in bits
         */
-       u_int32_t (*get_strength)(ntru_drbg_t *this);
+       uint32_t (*get_strength)(ntru_drbg_t *this);
 
        /**
         * Reseed the instantiated DRBG
@@ -54,8 +54,8 @@ struct ntru_drbg_t {
         * @param out           address of output buffer
         * @return                      TRUE if successful
         */
-       bool (*generate)(ntru_drbg_t *this, u_int32_t strength, u_int32_t len,
-                                                                               u_int8_t *out);
+       bool (*generate)(ntru_drbg_t *this, uint32_t strength, uint32_t len,
+                                                                               uint8_t *out);
 
        /**
         * Get a reference on an ntru_drbg_t object increasing the count by one
@@ -77,7 +77,7 @@ struct ntru_drbg_t {
  * @param pers_str             personalization string
  * @param entropy              entropy source to use
  */
-ntru_drbg_t *ntru_drbg_create(u_int32_t strength, chunk_t pers_str,
+ntru_drbg_t *ntru_drbg_create(uint32_t strength, chunk_t pers_str,
                                                          rng_t *entropy);
 
 #endif /** NTRU_DRBG_H_ @}*/
index 3b5df81d99cadba16e8d7b70950a2cb7a5ad2481..efc660bedb8b917572f7c5e0dc1e7d5adf980329 100644 (file)
@@ -66,7 +66,7 @@ struct private_ntru_ke_t {
        /**
         * Cryptographical strength in bits of the NTRU Parameter Set
         */
-       u_int32_t strength;
+       uint32_t strength;
 
        /**
         * NTRU Public Key
@@ -247,7 +247,7 @@ ntru_ke_t *ntru_ke_create(diffie_hellman_group_t group, chunk_t g, chunk_t p)
        rng_t *entropy;
        ntru_drbg_t *drbg;
        char *parameter_set;
-       u_int32_t strength;
+       uint32_t strength;
 
        parameter_set = lib->settings->get_str(lib->settings,
                                                "%s.plugins.ntru.parameter_set", "optimum", lib->ns);
index 26f4700b81e82c94e338757ed0208ab55e76e91b..a02f78a93c7ed0a753c1acb743754eb8b36cefae 100644 (file)
@@ -43,7 +43,7 @@ struct private_openssl_crypter_t {
 /**
  * Look up an OpenSSL algorithm name and validate its key size
  */
-static char* lookup_algorithm(u_int16_t ikev2_algo, size_t *key_size)
+static char* lookup_algorithm(uint16_t ikev2_algo, size_t *key_size)
 {
        struct {
                /* identifier specified in IKEv2 */
index 50b14698be93544570634faab2e9b948edf15cdf..8f7df0f8a1be821ccf268526afc4cb1661ab1d29 100644 (file)
@@ -53,7 +53,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_openssl_hasher_t *this, chunk_t chunk, u_int8_t *hash)
+       private_openssl_hasher_t *this, chunk_t chunk, uint8_t *hash)
 {
        if (EVP_DigestUpdate(this->ctx, chunk.ptr, chunk.len) != 1)
        {
index 065187a8c301bfba561251d3907693560f78e0c9..b99a0c947dc41bc3445dfc521b68c039ad9347e3 100644 (file)
@@ -94,7 +94,7 @@ METHOD(mac_t, set_key, bool,
 }
 
 METHOD(mac_t, get_mac, bool,
-       private_mac_t *this, chunk_t data, u_int8_t *out)
+       private_mac_t *this, chunk_t data, uint8_t *out)
 {
        if (!this->key_set)
        {
index c807bb6072625f4ab6617dbdbcb3bbd5e761ed93..f8e98fc0f57ec2166bf1ad4d892c98a58658b94f 100644 (file)
@@ -47,7 +47,7 @@ struct private_openssl_rng_t {
 };
 
 METHOD(rng_t, get_bytes, bool,
-       private_openssl_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_openssl_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        if (this->quality == RNG_WEAK)
        {
index 446c93e2b7c7c7595e881bbec279c43c111d4c78..f6df03f12d99905bf233a7a723d7eeaa7d63cff9 100644 (file)
@@ -40,7 +40,7 @@ struct private_openssl_sha1_prf_t {
 };
 
 METHOD(prf_t, get_bytes, bool,
-       private_openssl_sha1_prf_t *this, chunk_t seed, u_int8_t *bytes)
+       private_openssl_sha1_prf_t *this, chunk_t seed, uint8_t *bytes)
 {
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
        if (!SHA1_Update(&this->ctx, seed.ptr, seed.len))
@@ -53,7 +53,7 @@ METHOD(prf_t, get_bytes, bool,
 
        if (bytes)
        {
-               u_int32_t *hash = (u_int32_t*)bytes;
+               uint32_t *hash = (uint32_t*)bytes;
 
                hash[0] = htonl(this->ctx.h0);
                hash[1] = htonl(this->ctx.h1);
index 517914ab5c847c026923bf75098c4bc4eabab676..6b337d82c48f0d090824cb703e968a3be3d2415d 100644 (file)
@@ -81,7 +81,7 @@ METHOD(rng_t, allocate_bytes, bool,
 }
 
 METHOD(rng_t, get_bytes, bool,
-       private_padlock_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_padlock_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        chunk_t chunk;
 
index 4489b902a06e157e9a5ee73f859746b9df3b8aa7..107ade09b5ae62e9f40ad4c3edf9133e3b162fb5 100644 (file)
@@ -54,9 +54,9 @@ static void padlock_sha1(int len, u_char *in, u_char *out)
 /**
  * sha1() a buffer of data into digest
  */
-static void sha1(chunk_t data, u_int32_t *digest)
+static void sha1(chunk_t data, uint32_t *digest)
 {
-       u_int32_t hash[128] PADLOCK_ALIGN;
+       uint32_t hash[128] PADLOCK_ALIGN;
 
        hash[0] = 0x67452301;
        hash[1] = 0xefcdab89;
@@ -91,18 +91,18 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_padlock_sha1_hasher_t *this, chunk_t chunk, u_int8_t *hash)
+       private_padlock_sha1_hasher_t *this, chunk_t chunk, uint8_t *hash)
 {
        if (hash)
        {
                if (this->data.len)
                {
                        append_data(this, chunk);
-                       sha1(this->data, (u_int32_t*)hash);
+                       sha1(this->data, (uint32_t*)hash);
                }
                else
                {   /* hash directly if no previous data found */
-                       sha1(chunk, (u_int32_t*)hash);
+                       sha1(chunk, (uint32_t*)hash);
                }
                reset(this);
        }
index f0e508abf905057bd8d69afec67b4f2dec0c532e..719a2a69e002b2b1f0b68d30ed4e08e42c24528f 100644 (file)
@@ -93,7 +93,7 @@ static status_t pem_decrypt(chunk_t *blob, encryption_algorithm_t alg,
        chunk_t hash;
        chunk_t decrypted;
        chunk_t key = {alloca(key_size), key_size};
-       u_int8_t padding, *last_padding_pos, *first_padding_pos;
+       uint8_t padding, *last_padding_pos, *first_padding_pos;
 
        /* build key from passphrase and IV */
        hasher = lib->crypto->create_hasher(lib->crypto, HASH_MD5);
index 152e83aaa4f2385f446f6be9204b2645e8d156fc..fe0be45d9569fdd035827deb988a16525f53a0fd 100644 (file)
@@ -26,7 +26,7 @@
  */
 static public_key_t *parse_public_key(chunk_t blob)
 {
-       u_int32_t alg;
+       uint32_t alg;
        public_key_t *key;
 
        if (!pgp_read_scalar(&blob, 1, &alg))
@@ -74,7 +74,7 @@ static public_key_t *parse_rsa_public_key(chunk_t blob)
 static private_key_t *parse_rsa_private_key(chunk_t blob)
 {
        chunk_t mpi[6];
-       u_int32_t s2k;
+       uint32_t s2k;
        int i;
 
        for (i = 0; i < 2; i++)
@@ -143,7 +143,7 @@ static private_key_t *parse_private_key(chunk_t blob)
 {
        chunk_t packet;
        pgp_packet_tag_t tag;
-       u_int32_t version, created, days, alg;
+       uint32_t version, created, days, alg;
        private_key_t *key;
 
        if (!pgp_read_packet(&blob, &packet, &tag))
index 89d7094ade1e70c5bd4e374673eb207e1a2af472..0ffce4cfc788ef31c4c6326dbd825c5ff029ba18 100644 (file)
@@ -40,17 +40,17 @@ struct private_pgp_cert_t {
        /**
         * version of the public key
         */
-       u_int32_t version;
+       uint32_t version;
 
        /**
         * creation time
         */
-       u_int32_t created;
+       uint32_t created;
 
        /**
         * days the certificate is valid
         */
-       u_int32_t valid;
+       uint32_t valid;
 
        /**
         * userid of the certificate
@@ -349,7 +349,7 @@ static bool parse_public_key(private_pgp_cert_t *this, chunk_t packet)
  */
 static bool parse_signature(private_pgp_cert_t *this, chunk_t packet)
 {
-       u_int32_t version, len, type, created;
+       uint32_t version, len, type, created;
 
        if (!pgp_read_scalar(&packet, 1, &version))
        {
index bb15627fd3bcbd0b7f05d0c26d9c77b03d68de53..283bf8c367d85920bd6ab990fe5ada14dd2119ff 100644 (file)
@@ -73,9 +73,9 @@ ENUM_END(pgp_packet_tag_names, PGP_PKT_MOD_DETECT_CODE);
 /**
  * Read a PGP scalar of bytes length, advance blob
  */
-bool pgp_read_scalar(chunk_t *blob, size_t bytes, u_int32_t *scalar)
+bool pgp_read_scalar(chunk_t *blob, size_t bytes, uint32_t *scalar)
 {
-       u_int32_t res = 0;
+       uint32_t res = 0;
 
        if (bytes > blob->len)
        {
@@ -96,7 +96,7 @@ bool pgp_read_scalar(chunk_t *blob, size_t bytes, u_int32_t *scalar)
  */
 bool pgp_read_mpi(chunk_t *blob, chunk_t *mpi)
 {
-       u_int32_t bits, bytes;
+       uint32_t bits, bytes;
 
        if (!pgp_read_scalar(blob, 2, &bits))
        {
@@ -117,7 +117,7 @@ bool pgp_read_mpi(chunk_t *blob, chunk_t *mpi)
 /**
  * Read length of an PGP old packet length encoding
  */
-static bool pgp_old_packet_length(chunk_t *blob, u_int32_t *length)
+static bool pgp_old_packet_length(chunk_t *blob, uint32_t *length)
 {
        /* bits 0 and 1 define the packet length type */
        u_char type;
@@ -141,7 +141,7 @@ static bool pgp_old_packet_length(chunk_t *blob, u_int32_t *length)
  */
 bool pgp_read_packet(chunk_t *blob, chunk_t *data, pgp_packet_tag_t *tag)
 {
-       u_int32_t len;
+       uint32_t len;
        u_char t;
 
        if (!blob->len)
index 203a0a85dee4f18ebc7025908bdcf0c8880fcb05..180292a7aaed9549ecc9581f8331bde9c58b6b62 100644 (file)
@@ -115,7 +115,7 @@ bool pgp_read_mpi(chunk_t *blob, chunk_t *mpi);
  * @param scalar       resultin scalar
  * @return                     TRUE if scalar parsed successfully
  */
-bool pgp_read_scalar(chunk_t *blob, size_t bytes, u_int32_t *scalar);
+bool pgp_read_scalar(chunk_t *blob, size_t bytes, uint32_t *scalar);
 
 /**
  * Parse a PGP packet.
index 80079b9a9df285ae3011d6392a9cd449e9acdb2e..847f031158a19e042670ee25d4fb2476468c446f 100644 (file)
@@ -146,7 +146,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_pkcs11_hasher_t *this, chunk_t chunk, u_int8_t *hash)
+       private_pkcs11_hasher_t *this, chunk_t chunk, uint8_t *hash)
 {
        CK_RV rv;
        CK_ULONG len;
index d18028b459e651bfe8222e823316d51ea60abb78..7538351872f172eb6e8b51c29ee6d3ecfb0b6eca 100644 (file)
@@ -44,7 +44,7 @@ struct private_pkcs11_rng_t {
 };
 
 METHOD(rng_t, get_bytes, bool,
-       private_pkcs11_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_pkcs11_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        CK_RV rv;
        rv = this->lib->f->C_GenerateRandom(this->session, buffer, bytes);
index 4441b278f99b0bf6b94be07e5bbc57d01af9b8c8..82fc0c0b9427dd529e925e3c3f667517c6b383e3 100644 (file)
@@ -324,7 +324,7 @@ end:
  * Verify the given MAC with available passwords.
  */
 static bool verify_mac(hash_algorithm_t hash, chunk_t salt,
-                                          u_int64_t iterations, chunk_t data, chunk_t mac)
+                                          uint64_t iterations, chunk_t data, chunk_t mac)
 {
        integrity_algorithm_t integ;
        enumerator_t *enumerator;
@@ -450,7 +450,7 @@ static bool parse_PFX(private_pkcs12_t *this, chunk_t blob)
                        data = chunk_empty;
        hash_algorithm_t hash = HASH_UNKNOWN;
        container_t *container = NULL;
-       u_int64_t iterations = 0;
+       uint64_t iterations = 0;
        bool success = FALSE;
 
        parser = asn1_parser_create(PFXObjects, blob);
index 0ea5eeaf83ec6be6d3ff35f28575726fb6bf8fa8..4c92c412cb14effaba6bad1c9a03f0197a7444dc 100644 (file)
@@ -57,7 +57,7 @@ ENUM(plugin_feature_names, FEATURE_NONE, FEATURE_CUSTOM,
 /**
  * See header.
  */
-u_int32_t plugin_feature_hash(plugin_feature_t *feature)
+uint32_t plugin_feature_hash(plugin_feature_t *feature)
 {
        chunk_t data = chunk_empty;
 
index 03f1ba8ccd2f8943aa91b7989f30ee9280fb79df..ee7808a94e639b27ca8c7f945a5d5ed8bff1b753 100644 (file)
@@ -362,7 +362,7 @@ static inline void plugin_features_add(plugin_feature_t *features,
  * @param feature      feature to hash
  * @return                     hash value of the feature
  */
-u_int32_t plugin_feature_hash(plugin_feature_t *feature);
+uint32_t plugin_feature_hash(plugin_feature_t *feature);
 
 /**
  * Check if feature a matches to feature b.
index 177b3c2e5c620cd591ef2a55196b23924f7c26b2..3760630aba70d40ac1c158300a8dbf5c1e8ee8f3 100644 (file)
@@ -41,7 +41,7 @@ struct private_random_rng_t {
 };
 
 METHOD(rng_t, get_bytes, bool,
-       private_random_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_random_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        size_t done;
        ssize_t got;
index 256acf8171c74652d6e461b25e7e3089987c4f76..d9681e8342397247fc0680e6fe759ea16d9f5647 100644 (file)
@@ -19,11 +19,11 @@ typedef struct private_rc2_crypter_t private_rc2_crypter_t;
 
 #define RC2_BLOCK_SIZE 8
 
-#define ROL16(x, k)    ({ u_int16_t _x = (x); (_x << (k)) | (_x >> (16 - (k))); })
-#define ROR16(x, k)    ({ u_int16_t _x = (x); (_x >> (k)) | (_x << (16 - (k))); })
+#define ROL16(x, k)    ({ uint16_t _x = (x); (_x << (k)) | (_x >> (16 - (k))); })
+#define ROR16(x, k)    ({ uint16_t _x = (x); (_x >> (k)) | (_x << (16 - (k))); })
 
-#define GET16(x)       ({ u_char *_x = (x); (u_int16_t)_x[0] | ((u_int16_t)_x[1] << 8); })
-#define PUT16(x, v)    ({ u_char *_x = (x); u_int16_t _v = (v); _x[0] = _v, _x[1] = _v >> 8; })
+#define GET16(x)       ({ u_char *_x = (x); (uint16_t)_x[0] | ((uint16_t)_x[1] << 8); })
+#define PUT16(x, v)    ({ u_char *_x = (x); uint16_t _v = (v); _x[0] = _v, _x[1] = _v >> 8; })
 
 /**
  * Private data of rc2_crypter_t
@@ -38,7 +38,7 @@ struct private_rc2_crypter_t {
        /**
        * The expanded key in 16-bit words
        */
-       u_int16_t  K[64];
+       uint16_t  K[64];
 
        /**
        * Key size in bytes
@@ -95,7 +95,7 @@ static const u_char PITABLE[256] =
  */
 static void encrypt_block(private_rc2_crypter_t *this, u_char R[])
 {
-       register u_int16_t R0, R1, R2, R3, *Kj;
+       register uint16_t R0, R1, R2, R3, *Kj;
        int rounds = 3, mix = 5;
 
        R0 = GET16(R);
@@ -139,7 +139,7 @@ static void encrypt_block(private_rc2_crypter_t *this, u_char R[])
  */
 static void decrypt_block(private_rc2_crypter_t *this, u_char R[])
 {
-       register u_int16_t R0, R1, R2, R3, *Kj;
+       register uint16_t R0, R1, R2, R3, *Kj;
        int rounds = 3, mix = 5;
 
        R0 = GET16(R);
@@ -185,7 +185,7 @@ static void decrypt_block(private_rc2_crypter_t *this, u_char R[])
 METHOD(crypter_t, decrypt, bool,
        private_rc2_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted)
 {
-       u_int8_t *in, *out, *prev;
+       uint8_t *in, *out, *prev;
 
        if (data.len % RC2_BLOCK_SIZE || iv.len != RC2_BLOCK_SIZE)
        {
@@ -222,7 +222,7 @@ METHOD(crypter_t, decrypt, bool,
 METHOD(crypter_t, encrypt, bool,
        private_rc2_crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted)
 {
-       u_int8_t *in, *out, *end, *prev;
+       uint8_t *in, *out, *end, *prev;
 
        if (data.len % RC2_BLOCK_SIZE || iv.len != RC2_BLOCK_SIZE)
        {
@@ -273,7 +273,7 @@ METHOD(crypter_t, get_key_size, size_t,
 METHOD(crypter_t, set_key, bool,
        private_rc2_crypter_t *this, chunk_t key)
 {
-       u_int8_t L[128], T8, TM, idx;
+       uint8_t L[128], T8, TM, idx;
        int i;
 
        if (key.len != this->T)
index fa66f3ad78a7e236eedd865c5d42b9a8c52a9a5c..b7225b6a2d74105aa21c5fbe25a7aa4d79b3b83c 100644 (file)
@@ -54,7 +54,7 @@ struct private_rdrand_rng_t {
 /**
  * Get a two byte word using RDRAND
  */
-static bool rdrand16(u_int16_t *out)
+static bool rdrand16(uint16_t *out)
 {
        u_char res;
        int i;
@@ -76,7 +76,7 @@ static bool rdrand16(u_int16_t *out)
 /**
  * Get a four byte word using RDRAND
  */
-static bool rdrand32(u_int32_t *out)
+static bool rdrand32(uint32_t *out)
 {
        u_char res;
        int i;
@@ -99,7 +99,7 @@ static bool rdrand32(u_int32_t *out)
 /**
  * Get a eight byte word using RDRAND
  */
-static bool rdrand64(u_int64_t *out)
+static bool rdrand64(uint64_t *out)
 {
        u_char res;
        int i;
@@ -122,9 +122,9 @@ static bool rdrand64(u_int64_t *out)
 /**
  * Get a one byte word using RDRAND
  */
-static bool rdrand8(u_int8_t *out)
+static bool rdrand8(uint8_t *out)
 {
-       u_int16_t u16;
+       uint16_t u16;
 
        if (!rdrand16(&u16))
        {
@@ -141,15 +141,15 @@ static bool rdrand128(void *out)
 {
 #ifdef __x86_64__
        if (!rdrand64(out) ||
-               !rdrand64(out + sizeof(u_int64_t)))
+               !rdrand64(out + sizeof(uint64_t)))
        {
                return FALSE;
        }
 #else /* __i386__ */
        if (!rdrand32(out) ||
-               !rdrand32(out + 1 * sizeof(u_int32_t)) ||
-               !rdrand32(out + 2 * sizeof(u_int32_t)) ||
-               !rdrand32(out + 3 * sizeof(u_int32_t)))
+               !rdrand32(out + 1 * sizeof(uint32_t)) ||
+               !rdrand32(out + 2 * sizeof(uint32_t)) ||
+               !rdrand32(out + 3 * sizeof(uint32_t)))
        {
                return FALSE;
        }
@@ -165,9 +165,9 @@ static bool reseed()
        int i;
 
 #ifdef __x86_64__
-       u_int64_t tmp;
+       uint64_t tmp;
 
-       for (i = 0; i < 511 * 16 / sizeof(u_int64_t); i++)
+       for (i = 0; i < 511 * 16 / sizeof(uint64_t); i++)
        {
                if (!rdrand64(&tmp))
                {
@@ -175,9 +175,9 @@ static bool reseed()
                }
        }
 #else /* __i386__ */
-       u_int32_t tmp;
+       uint32_t tmp;
 
-       for (i = 0; i < 511 * 16 / sizeof(u_int32_t); i++)
+       for (i = 0; i < 511 * 16 / sizeof(uint32_t); i++)
        {
                if (!rdrand32(&tmp))
                {
@@ -202,48 +202,48 @@ static bool rdrand_chunk(private_rdrand_rng_t *this, chunk_t chunk)
        }
 
        /* align to 2 byte */
-       if (chunk.len >= sizeof(u_int8_t))
+       if (chunk.len >= sizeof(uint8_t))
        {
                if ((uintptr_t)chunk.ptr % 2)
                {
-                       if (!rdrand8((u_int8_t*)chunk.ptr))
+                       if (!rdrand8((uint8_t*)chunk.ptr))
                        {
                                return FALSE;
                        }
-                       chunk = chunk_skip(chunk, sizeof(u_int8_t));
+                       chunk = chunk_skip(chunk, sizeof(uint8_t));
                }
        }
 
        /* align to 4 byte */
-       if (chunk.len >= sizeof(u_int16_t))
+       if (chunk.len >= sizeof(uint16_t))
        {
                if ((uintptr_t)chunk.ptr % 4)
                {
-                       if (!rdrand16((u_int16_t*)chunk.ptr))
+                       if (!rdrand16((uint16_t*)chunk.ptr))
                        {
                                return FALSE;
                        }
-                       chunk = chunk_skip(chunk, sizeof(u_int16_t));
+                       chunk = chunk_skip(chunk, sizeof(uint16_t));
                }
        }
 
 #ifdef __x86_64__
 
        /* align to 8 byte */
-       if (chunk.len >= sizeof(u_int32_t))
+       if (chunk.len >= sizeof(uint32_t))
        {
                if ((uintptr_t)chunk.ptr % 8)
                {
-                       if (!rdrand32((u_int32_t*)chunk.ptr))
+                       if (!rdrand32((uint32_t*)chunk.ptr))
                        {
                                return FALSE;
                        }
-                       chunk = chunk_skip(chunk, sizeof(u_int32_t));
+                       chunk = chunk_skip(chunk, sizeof(uint32_t));
                }
        }
 
        /* fill with 8 byte words */
-       while (chunk.len >= sizeof(u_int64_t))
+       while (chunk.len >= sizeof(uint64_t))
        {
                if (this->quality == RNG_STRONG && chunk.len % FORCE_RESEED == 0)
                {
@@ -252,27 +252,27 @@ static bool rdrand_chunk(private_rdrand_rng_t *this, chunk_t chunk)
                                return FALSE;
                        }
                }
-               if (!rdrand64((u_int64_t*)chunk.ptr))
+               if (!rdrand64((uint64_t*)chunk.ptr))
                {
                        return FALSE;
                }
-               chunk = chunk_skip(chunk, sizeof(u_int64_t));
+               chunk = chunk_skip(chunk, sizeof(uint64_t));
        }
 
        /* append 4 byte word */
-       if (chunk.len >= sizeof(u_int32_t))
+       if (chunk.len >= sizeof(uint32_t))
        {
-               if (!rdrand32((u_int32_t*)chunk.ptr))
+               if (!rdrand32((uint32_t*)chunk.ptr))
                {
                        return FALSE;
                }
-               chunk = chunk_skip(chunk, sizeof(u_int32_t));
+               chunk = chunk_skip(chunk, sizeof(uint32_t));
        }
 
 #else /* __i386__ */
 
        /* fill with 4 byte words */
-       while (chunk.len >= sizeof(u_int32_t))
+       while (chunk.len >= sizeof(uint32_t))
        {
                if (this->quality == RNG_STRONG && chunk.len % FORCE_RESEED == 0)
                {
@@ -281,11 +281,11 @@ static bool rdrand_chunk(private_rdrand_rng_t *this, chunk_t chunk)
                                return FALSE;
                        }
                }
-               if (!rdrand32((u_int32_t*)chunk.ptr))
+               if (!rdrand32((uint32_t*)chunk.ptr))
                {
                        return FALSE;
                }
-               chunk = chunk_skip(chunk, sizeof(u_int32_t));
+               chunk = chunk_skip(chunk, sizeof(uint32_t));
        }
 
 #endif /* __x86_64__ / __i386__ */
@@ -299,23 +299,23 @@ static bool rdrand_chunk(private_rdrand_rng_t *this, chunk_t chunk)
        }
 
        /* append 2 byte word */
-       if (chunk.len >= sizeof(u_int16_t))
+       if (chunk.len >= sizeof(uint16_t))
        {
-               if (!rdrand16((u_int16_t*)chunk.ptr))
+               if (!rdrand16((uint16_t*)chunk.ptr))
                {
                        return FALSE;
                }
-               chunk = chunk_skip(chunk, sizeof(u_int16_t));
+               chunk = chunk_skip(chunk, sizeof(uint16_t));
        }
 
        /* append 1 byte word */
-       if (chunk.len >= sizeof(u_int8_t))
+       if (chunk.len >= sizeof(uint8_t))
        {
-               if (!rdrand8((u_int8_t*)chunk.ptr))
+               if (!rdrand8((uint8_t*)chunk.ptr))
                {
                        return FALSE;
                }
-               chunk = chunk_skip(chunk, sizeof(u_int8_t));
+               chunk = chunk_skip(chunk, sizeof(uint8_t));
        }
 
        return TRUE;
@@ -378,7 +378,7 @@ static bool rdrand_mixed(private_rdrand_rng_t *this, chunk_t chunk)
 }
 
 METHOD(rng_t, get_bytes, bool,
-       private_rdrand_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_rdrand_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        switch (this->quality)
        {
index b51a26152b8f05e5e6a4350aaca7285044657ecc..fca65dfa2c32213f60709c6038f5236a5a28a3ab 100644 (file)
@@ -59,20 +59,20 @@ struct private_sha1_hasher_t {
        /*
         * State of the hasher. Shared with sha1_prf.c, do not change it!!!
         */
-       u_int32_t state[5];
-       u_int32_t count[2];
-       u_int8_t buffer[64];
+       uint32_t state[5];
+       uint32_t count[2];
+       uint8_t buffer[64];
 };
 
 /*
  * Hash a single 512-bit block. This is the core of the algorithm. *
  */
-static void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64])
+static void SHA1Transform(uint32_t state[5], const unsigned char buffer[64])
 {
-       u_int32_t a, b, c, d, e;
+       uint32_t a, b, c, d, e;
        typedef union {
-               u_int8_t c[64];
-               u_int32_t l[16];
+               uint8_t c[64];
+               uint32_t l[16];
        } CHAR64LONG16;
        CHAR64LONG16 block[1];  /* use array to appear as a pointer */
        memcpy(block, buffer, 64);
@@ -118,10 +118,10 @@ static void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64])
 /**
  * Run your data through this. Also used in sha1_prf.
  */
-void SHA1Update(private_sha1_hasher_t* this, u_int8_t *data, u_int32_t len)
+void SHA1Update(private_sha1_hasher_t* this, uint8_t *data, uint32_t len)
 {
-       u_int32_t i;
-       u_int32_t j;
+       uint32_t i;
+       uint32_t j;
 
        j = this->count[0];
        if ((this->count[0] += len << 3) < j)
@@ -151,15 +151,15 @@ void SHA1Update(private_sha1_hasher_t* this, u_int8_t *data, u_int32_t len)
 /*
  * Add padding and return the message digest.
  */
-static void SHA1Final(private_sha1_hasher_t *this, u_int8_t *digest)
+static void SHA1Final(private_sha1_hasher_t *this, uint8_t *digest)
 {
-       u_int32_t i;
-       u_int8_t finalcount[8];
-       u_int8_t c;
+       uint32_t i;
+       uint8_t finalcount[8];
+       uint8_t c;
 
        for (i = 0; i < 8; i++)
        {
-               finalcount[i] = (u_int8_t)((this->count[(i >= 4 ? 0 : 1)]
+               finalcount[i] = (uint8_t)((this->count[(i >= 4 ? 0 : 1)]
                 >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
        }
        c = 0200;
@@ -172,7 +172,7 @@ static void SHA1Final(private_sha1_hasher_t *this, u_int8_t *digest)
        SHA1Update(this, finalcount, 8);  /* Should cause a SHA1Transform() */
        for (i = 0; i < 20; i++)
        {
-               digest[i] = (u_int8_t)((this->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+               digest[i] = (uint8_t)((this->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
        }
 }
 
@@ -191,7 +191,7 @@ METHOD(hasher_t, reset, bool,
 }
 
 METHOD(hasher_t, get_hash, bool,
-       private_sha1_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_sha1_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        SHA1Update(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
index cc4924a8037927b2f2f6d756d7d10842eecb4a27..464f4c9ecb51c8e07949b309eaa2d7c7dc4b7a4c 100644 (file)
@@ -33,9 +33,9 @@ struct private_sha1_hasher_t {
        /*
         * State of the hasher. From sha1_hasher.c, do not change it!
         */
-       u_int32_t state[5];
-       u_int32_t count[2];
-       u_int8_t buffer[64];
+       uint32_t state[5];
+       uint32_t count[2];
+       uint8_t buffer[64];
 };
 
 /**
@@ -57,12 +57,12 @@ struct private_sha1_prf_t {
 /**
  * From sha1_hasher.c
  */
-extern void SHA1Update(private_sha1_hasher_t* this, u_int8_t *data, u_int32_t len);
+extern void SHA1Update(private_sha1_hasher_t* this, uint8_t *data, uint32_t len);
 
 METHOD(prf_t, get_bytes, bool,
-       private_sha1_prf_t *this, chunk_t seed, u_int8_t *bytes)
+       private_sha1_prf_t *this, chunk_t seed, uint8_t *bytes)
 {
-       u_int32_t *hash = (u_int32_t*)bytes;
+       uint32_t *hash = (uint32_t*)bytes;
 
        SHA1Update(this->hasher, seed.ptr, seed.len);
 
@@ -98,14 +98,14 @@ METHOD(prf_t, set_key, bool,
        private_sha1_prf_t *this, chunk_t key)
 {
        int i, rounds;
-       u_int32_t *iv = (u_int32_t*)key.ptr;
+       uint32_t *iv = (uint32_t*)key.ptr;
 
        if (!this->hasher->public.hasher_interface.reset(
                                                                                &this->hasher->public.hasher_interface))
        {
                return FALSE;
        }
-       rounds = min(key.len/sizeof(u_int32_t), sizeof(this->hasher->state));
+       rounds = min(key.len/sizeof(uint32_t), sizeof(this->hasher->state));
        for (i = 0; i < rounds; i++)
        {
                this->hasher->state[i] ^= htonl(iv[i]);
index 1c6dd253366ab9917d6c82436eee4132cf0e1b65..89e7675e333f776ab3706044291e1034bbb2d48e 100644 (file)
@@ -33,9 +33,9 @@ struct private_sha512_hasher_t {
        sha2_hasher_t public;
 
        unsigned char   sha_out[128];   /* results are here, bytes 0..47/0..63 */
-       u_int64_t       sha_H[8];
-       u_int64_t       sha_blocks;
-       u_int64_t       sha_blocksMSB;
+       uint64_t       sha_H[8];
+       uint64_t       sha_blocks;
+       uint64_t       sha_blocksMSB;
        int             sha_bufCnt;
 };
 
@@ -52,23 +52,23 @@ struct private_sha256_hasher_t {
        sha2_hasher_t public;
 
        unsigned char   sha_out[64];    /* results are here, bytes 0...31 */
-       u_int32_t       sha_H[8];
-       u_int64_t       sha_blocks;
+       uint32_t       sha_H[8];
+       uint64_t       sha_blocks;
        int             sha_bufCnt;
 };
 
 
-static const u_int32_t sha224_hashInit[8] = {
+static const uint32_t sha224_hashInit[8] = {
        0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511,
        0x64f98fa7, 0xbefa4fa4
 };
 
-static const u_int32_t sha256_hashInit[8] = {
+static const uint32_t sha256_hashInit[8] = {
        0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c,
        0x1f83d9ab, 0x5be0cd19
 };
 
-static const u_int32_t sha256_K[64] = {
+static const uint32_t sha256_K[64] = {
        0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
        0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
        0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
@@ -82,19 +82,19 @@ static const u_int32_t sha256_K[64] = {
        0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
 };
 
-static const u_int64_t sha512_hashInit[8] = {
+static const uint64_t sha512_hashInit[8] = {
        0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL,
        0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL,
        0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL
 };
 
-static const u_int64_t sha384_hashInit[8] = {
+static const uint64_t sha384_hashInit[8] = {
        0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL,
        0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL,
        0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL
 };
 
-static const u_int64_t sha512_K[80] = {
+static const uint64_t sha512_K[80] = {
        0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL,
        0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
        0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL,
@@ -143,14 +143,14 @@ static void sha256_transform(private_sha256_hasher_t *ctx,
                                                         const unsigned char *datap)
 {
        register int    j;
-       u_int32_t       a, b, c, d, e, f, g, h;
-       u_int32_t       T1, T2, W[64], Wm2, Wm15;
+       uint32_t       a, b, c, d, e, f, g, h;
+       uint32_t       T1, T2, W[64], Wm2, Wm15;
 
        /* read the data, big endian byte order */
        j = 0;
        do {
-               W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) |
-                               (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3]));
+               W[j] = (((uint32_t)(datap[0]))<<24) | (((uint32_t)(datap[1]))<<16) |
+                               (((uint32_t)(datap[2]))<<8 ) | ((uint32_t)(datap[3]));
                datap += 4;
        } while(++j < 16);
 
@@ -229,8 +229,8 @@ static void sha256_write(private_sha256_hasher_t *ctx,
 static void sha256_final(private_sha256_hasher_t *ctx)
 {
        register int    j;
-       u_int64_t       bitLength;
-       u_int32_t       i;
+       uint64_t       bitLength;
+       uint32_t       i;
        unsigned char   padByte, *datap;
 
        bitLength = (ctx->sha_blocks << 9) | (ctx->sha_bufCnt << 3);
@@ -287,16 +287,16 @@ static void sha512_transform(private_sha512_hasher_t *ctx,
                                                         const unsigned char *datap)
 {
        register int    j;
-       u_int64_t       a, b, c, d, e, f, g, h;
-       u_int64_t       T1, T2, W[80], Wm2, Wm15;
+       uint64_t       a, b, c, d, e, f, g, h;
+       uint64_t       T1, T2, W[80], Wm2, Wm15;
 
        /* read the data, big endian byte order */
        j = 0;
        do {
-               W[j] = (((u_int64_t)(datap[0]))<<56) | (((u_int64_t)(datap[1]))<<48) |
-                               (((u_int64_t)(datap[2]))<<40) | (((u_int64_t)(datap[3]))<<32) |
-                               (((u_int64_t)(datap[4]))<<24) | (((u_int64_t)(datap[5]))<<16) |
-                               (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7]));
+               W[j] = (((uint64_t)(datap[0]))<<56) | (((uint64_t)(datap[1]))<<48) |
+                               (((uint64_t)(datap[2]))<<40) | (((uint64_t)(datap[3]))<<32) |
+                               (((uint64_t)(datap[4]))<<24) | (((uint64_t)(datap[5]))<<16) |
+                               (((uint64_t)(datap[6]))<<8 ) | ((uint64_t)(datap[7]));
                datap += 8;
        } while(++j < 16);
 
@@ -374,8 +374,8 @@ static void sha512_write(private_sha512_hasher_t *ctx,
 static void sha512_final(private_sha512_hasher_t *ctx)
 {
        register int    j;
-       u_int64_t       bitLength, bitLengthMSB;
-       u_int64_t       i;
+       uint64_t       bitLength, bitLengthMSB;
+       uint64_t       i;
        unsigned char   padByte, *datap;
 
        bitLength = (ctx->sha_blocks << 10) | (ctx->sha_bufCnt << 3);
@@ -469,7 +469,7 @@ METHOD(hasher_t, reset512, bool,
 }
 
 METHOD(hasher_t, get_hash224, bool,
-       private_sha256_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_sha256_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        sha256_write(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
@@ -482,7 +482,7 @@ METHOD(hasher_t, get_hash224, bool,
 }
 
 METHOD(hasher_t, get_hash256, bool,
-       private_sha256_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_sha256_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        sha256_write(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
@@ -495,7 +495,7 @@ METHOD(hasher_t, get_hash256, bool,
 }
 
 METHOD(hasher_t, get_hash384, bool,
-       private_sha512_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_sha512_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        sha512_write(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
@@ -508,7 +508,7 @@ METHOD(hasher_t, get_hash384, bool,
 }
 
 METHOD(hasher_t, get_hash512, bool,
-       private_sha512_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
+       private_sha512_hasher_t *this, chunk_t chunk, uint8_t *buffer)
 {
        sha512_write(this, chunk.ptr, chunk.len);
        if (buffer != NULL)
index 5f0b584799bb7cfa8e99e407487b783201d7d47a..da56954ab5f1fa0605a3eae0a28a64c932968f12 100644 (file)
@@ -120,7 +120,7 @@ static bool read_result(private_winhttp_fetcher_t *this, HINTERNET request,
 {
        DWORD received;
        char buf[1024];
-       u_int32_t code;
+       uint32_t code;
        DWORD codelen = sizeof(code);
 
        if (!WinHttpReceiveResponse(request, NULL))
index d852a2932921f9cb7e379fbdfbdd56f36f54dff8..820298e272b8a026fd15935d86af7a5d3c2b2f5c 100644 (file)
@@ -40,7 +40,7 @@ struct private_mac_t {
        /**
         * Block size, in bytes
         */
-       u_int8_t b;
+       uint8_t b;
 
        /**
         * crypter using k1
@@ -50,22 +50,22 @@ struct private_mac_t {
        /**
         * k2
         */
-       u_int8_t *k2;
+       uint8_t *k2;
 
        /**
         * k3
         */
-       u_int8_t *k3;
+       uint8_t *k3;
 
        /**
         * E
         */
-       u_int8_t *e;
+       uint8_t *e;
 
        /**
         * remaining, unprocessed bytes in append mode
         */
-       u_int8_t *remaining;
+       uint8_t *remaining;
 
        /**
         * number of bytes in remaining
@@ -138,7 +138,7 @@ static bool update(private_mac_t *this, chunk_t data)
 /**
  * run last round, data is in this->e
  */
-static bool final(private_mac_t *this, u_int8_t *out)
+static bool final(private_mac_t *this, uint8_t *out)
 {
        chunk_t iv;
 
@@ -193,7 +193,7 @@ static bool final(private_mac_t *this, u_int8_t *out)
 }
 
 METHOD(mac_t, get_mac, bool,
-       private_mac_t *this, chunk_t data, u_int8_t *out)
+       private_mac_t *this, chunk_t data, uint8_t *out)
 {
        /* update E, do not process last block */
        if (!update(this, data))
@@ -294,7 +294,7 @@ static mac_t *xcbc_create(encryption_algorithm_t algo, size_t key_size)
 {
        private_mac_t *this;
        crypter_t *crypter;
-       u_int8_t b;
+       uint8_t b;
 
        crypter = lib->crypto->create_crypter(lib->crypto, algo, key_size);
        if (!crypter)
index 64454718a6256486b356d710d9addc67f4887d92..5b3a8a30bf3bde00a710b90f7b634a42edfc23f7 100644 (file)
@@ -96,7 +96,7 @@ struct job_requeue_t {
        } schedule;
        /** Time to reschedule the job */
        union {
-               u_int32_t rel;
+               uint32_t rel;
                timeval_t abs;
        } time;
 };
index d9085256102b61a4ca81dff2960f3c0a799a80a7..374742939707662632684d3307005eb8c583b217 100644 (file)
@@ -276,7 +276,7 @@ METHOD(scheduler_t, schedule_job_tv, void,
 }
 
 METHOD(scheduler_t, schedule_job, void,
-       private_scheduler_t *this, job_t *job, u_int32_t s)
+       private_scheduler_t *this, job_t *job, uint32_t s)
 {
        timeval_t tv;
 
@@ -287,7 +287,7 @@ METHOD(scheduler_t, schedule_job, void,
 }
 
 METHOD(scheduler_t, schedule_job_ms, void,
-       private_scheduler_t *this, job_t *job, u_int32_t ms)
+       private_scheduler_t *this, job_t *job, uint32_t ms)
 {
        timeval_t tv, add;
 
index 7f91fcc59aa4ea7d22f8d1f19e09cec57cbecde4..1cd96d976920f0e53317d815255749f77a6a737a 100644 (file)
@@ -86,7 +86,7 @@ struct scheduler_t {
         * @param job                   job to schedule
         * @param time                  relative time to schedule job, in s
         */
-       void (*schedule_job) (scheduler_t *this, job_t *job, u_int32_t s);
+       void (*schedule_job) (scheduler_t *this, job_t *job, uint32_t s);
 
        /**
         * Adds a event to the queue, using a relative time offset in ms.
@@ -94,7 +94,7 @@ struct scheduler_t {
         * @param job                   job to schedule
         * @param time                  relative time to schedule job, in ms
         */
-       void (*schedule_job_ms) (scheduler_t *this, job_t *job, u_int32_t ms);
+       void (*schedule_job_ms) (scheduler_t *this, job_t *job, uint32_t ms);
 
        /**
         * Adds a event to the queue, using an absolut time.
index a6298b394801bb5d7f055847357431e128d9f053..da3ba97cf1f9e122b1de0b3a0bbdca657a5514b4 100644 (file)
@@ -52,7 +52,7 @@ struct private_traffic_selector_t {
        /**
         * IP protocol (UDP, TCP, ICMP, ...)
         */
-       u_int8_t protocol;
+       uint8_t protocol;
 
        /**
         * narrow this traffic selector to hosts external ip
@@ -63,7 +63,7 @@ struct private_traffic_selector_t {
        /**
         * subnet size in CIDR notation, 255 means a non-subnet address range
         */
-       u_int8_t netbits;
+       uint8_t netbits;
 
        /**
         * begin of address range, network order
@@ -72,9 +72,9 @@ struct private_traffic_selector_t {
                /** dummy char for common address manipulation */
                char from[0];
                /** IPv4 address */
-               u_int32_t from4[1];
+               uint32_t from4[1];
                /** IPv6 address */
-               u_int32_t from6[4];
+               uint32_t from6[4];
        };
 
        /**
@@ -84,30 +84,30 @@ struct private_traffic_selector_t {
                /** dummy char for common address manipulation */
                char to[0];
                /** IPv4 address */
-               u_int32_t to4[1];
+               uint32_t to4[1];
                /** IPv6 address */
-               u_int32_t to6[4];
+               uint32_t to6[4];
        };
 
        /**
         * begin of port range
         */
-       u_int16_t from_port;
+       uint16_t from_port;
 
        /**
         * end of port range
         */
-       u_int16_t to_port;
+       uint16_t to_port;
 };
 
 /**
  * calculate the "to"-address for the "from" address and a subnet size
  */
-static void calc_range(private_traffic_selector_t *this, u_int8_t netbits)
+static void calc_range(private_traffic_selector_t *this, uint8_t netbits)
 {
        size_t len;
        int bytes, bits;
-       u_int8_t mask;
+       uint8_t mask;
 
        this->netbits = netbits;
 
@@ -126,10 +126,10 @@ static void calc_range(private_traffic_selector_t *this, u_int8_t netbits)
 /**
  * calculate the subnet size from the "to" and "from" addresses
  */
-static u_int8_t calc_netbits(private_traffic_selector_t *this)
+static uint8_t calc_netbits(private_traffic_selector_t *this)
 {
        int byte, bit;
-       u_int8_t netbits;
+       uint8_t netbits;
        size_t size = (this->type == TS_IPV4_ADDR_RANGE) ? 4 : 16;
        bool prefix = TRUE;
 
@@ -144,7 +144,7 @@ static u_int8_t calc_netbits(private_traffic_selector_t *this)
        {
                for (bit = 7; bit >= 0; bit--)
                {
-                       u_int8_t bitmask = 1 << bit;
+                       uint8_t bitmask = 1 << bit;
 
                        if (prefix)
                        {
@@ -173,8 +173,8 @@ static u_int8_t calc_netbits(private_traffic_selector_t *this)
 /**
  * internal generic constructor
  */
-static private_traffic_selector_t *traffic_selector_create(u_int8_t protocol,
-                                               ts_type_t type, u_int16_t from_port, u_int16_t to_port);
+static private_traffic_selector_t *traffic_selector_create(uint8_t protocol,
+                                               ts_type_t type, uint16_t from_port, uint16_t to_port);
 
 /**
  * Check if TS contains "opaque" ports
@@ -195,9 +195,9 @@ static bool is_any(private_traffic_selector_t *this)
 /**
  * Print ICMP/ICMPv6 type and code
  */
-static int print_icmp(printf_hook_data_t *data, u_int16_t port)
+static int print_icmp(printf_hook_data_t *data, uint16_t port)
 {
-       u_int8_t type, code;
+       uint8_t type, code;
 
        type = traffic_selector_icmp_type(port);
        code = traffic_selector_icmp_code(port);
@@ -222,7 +222,7 @@ int traffic_selector_printf_hook(printf_hook_data_t *data,
        char *serv_proto = NULL, *sep = "";
        bool has_proto, has_ports;
        size_t written = 0;
-       u_int32_t from[4], to[4];
+       uint32_t from[4], to[4];
 
        if (this == NULL)
        {
@@ -361,9 +361,9 @@ METHOD(traffic_selector_t, get_subset, traffic_selector_t*,
        private_traffic_selector_t *this, traffic_selector_t *other_public)
 {
        private_traffic_selector_t *other, *subset;
-       u_int16_t from_port, to_port;
+       uint16_t from_port, to_port;
        u_char *from, *to;
-       u_int8_t protocol;
+       uint8_t protocol;
        size_t size;
 
        other = (private_traffic_selector_t*)other_public;
@@ -481,13 +481,13 @@ METHOD(traffic_selector_t, get_to_address, chunk_t,
        }
 }
 
-METHOD(traffic_selector_t, get_from_port, u_int16_t,
+METHOD(traffic_selector_t, get_from_port, uint16_t,
        private_traffic_selector_t *this)
 {
        return this->from_port;
 }
 
-METHOD(traffic_selector_t, get_to_port, u_int16_t,
+METHOD(traffic_selector_t, get_to_port, uint16_t,
        private_traffic_selector_t *this)
 {
        return this->to_port;
@@ -499,7 +499,7 @@ METHOD(traffic_selector_t, get_type, ts_type_t,
        return this->type;
 }
 
-METHOD(traffic_selector_t, get_protocol, u_int8_t,
+METHOD(traffic_selector_t, get_protocol, uint8_t,
        private_traffic_selector_t *this)
 {
        return this->protocol;
@@ -610,14 +610,14 @@ METHOD(traffic_selector_t, includes, bool,
 }
 
 METHOD(traffic_selector_t, to_subnet, bool,
-       private_traffic_selector_t *this, host_t **net, u_int8_t *mask)
+       private_traffic_selector_t *this, host_t **net, uint8_t *mask)
 {
        /* there is no way to do this cleanly, as the address range may
         * be anything else but a subnet. We use from_addr as subnet
         * and try to calculate a usable subnet mask.
         */
        int family, non_zero_bytes;
-       u_int16_t port = 0;
+       uint16_t port = 0;
        chunk_t net_chunk;
 
        *mask = (this->netbits == NON_SUBNET_ADDRESS_RANGE) ? calc_netbits(this)
@@ -777,10 +777,10 @@ int traffic_selector_cmp(traffic_selector_t *a_pub, traffic_selector_t *b_pub,
 /*
  * see header
  */
-traffic_selector_t *traffic_selector_create_from_bytes(u_int8_t protocol,
+traffic_selector_t *traffic_selector_create_from_bytes(uint8_t protocol,
                                                                                                ts_type_t type,
-                                                                                               chunk_t from, u_int16_t from_port,
-                                                                                               chunk_t to, u_int16_t to_port)
+                                                                                               chunk_t from, uint16_t from_port,
+                                                                                               chunk_t to, uint16_t to_port)
 {
        private_traffic_selector_t *this = traffic_selector_create(protocol, type,
                                                                                                                        from_port, to_port);
@@ -843,7 +843,7 @@ traffic_selector_t *traffic_selector_create_from_rfc3779_format(ts_type_t type,
        }
        if (to.len > 1)
        {
-               u_int8_t mask = to.ptr[0] ? (1 << to.ptr[0]) - 1 : 0;
+               uint8_t mask = to.ptr[0] ? (1 << to.ptr[0]) - 1 : 0;
 
                memcpy(this->to, to.ptr+1, to.len-1);
                this->to[to.len-2] |= mask;
@@ -856,8 +856,8 @@ traffic_selector_t *traffic_selector_create_from_rfc3779_format(ts_type_t type,
  * see header
  */
 traffic_selector_t *traffic_selector_create_from_subnet(host_t *net,
-                                                       u_int8_t netbits, u_int8_t protocol,
-                                                       u_int16_t from_port, u_int16_t to_port)
+                                                       uint8_t netbits, uint8_t protocol,
+                                                       uint16_t from_port, uint16_t to_port)
 {
        private_traffic_selector_t *this;
        chunk_t from;
@@ -890,9 +890,9 @@ traffic_selector_t *traffic_selector_create_from_subnet(host_t *net,
  * see header
  */
 traffic_selector_t *traffic_selector_create_from_string(
-                                                                               u_int8_t protocol, ts_type_t type,
-                                                                               char *from_addr, u_int16_t from_port,
-                                                                               char *to_addr, u_int16_t to_port)
+                                                                               uint8_t protocol, ts_type_t type,
+                                                                               char *from_addr, uint16_t from_port,
+                                                                               char *to_addr, uint16_t to_port)
 {
        private_traffic_selector_t *this;
        int family;
@@ -926,8 +926,8 @@ traffic_selector_t *traffic_selector_create_from_string(
  * see header
  */
 traffic_selector_t *traffic_selector_create_from_cidr(
-                                                                               char *string, u_int8_t protocol,
-                                                                               u_int16_t from_port, u_int16_t to_port)
+                                                                               char *string, uint8_t protocol,
+                                                                               uint16_t from_port, uint16_t to_port)
 {
        host_t *net;
        int bits;
@@ -944,8 +944,8 @@ traffic_selector_t *traffic_selector_create_from_cidr(
 /*
  * see header
  */
-traffic_selector_t *traffic_selector_create_dynamic(u_int8_t protocol,
-                                                                       u_int16_t from_port, u_int16_t to_port)
+traffic_selector_t *traffic_selector_create_dynamic(uint8_t protocol,
+                                                                       uint16_t from_port, uint16_t to_port)
 {
        private_traffic_selector_t *this = traffic_selector_create(
                                                        protocol, TS_IPV4_ADDR_RANGE, from_port, to_port);
@@ -961,8 +961,8 @@ traffic_selector_t *traffic_selector_create_dynamic(u_int8_t protocol,
 /*
  * see declaration
  */
-static private_traffic_selector_t *traffic_selector_create(u_int8_t protocol,
-                                               ts_type_t type, u_int16_t from_port, u_int16_t to_port)
+static private_traffic_selector_t *traffic_selector_create(uint8_t protocol,
+                                               ts_type_t type, uint16_t from_port, uint16_t to_port)
 {
        private_traffic_selector_t *this;
 
index cf9a2861bbc696ebfed18fc4f61d9e897db0c299..cc66c3453819d6dcf20b7a4dc2f1009e28d3a780 100644 (file)
@@ -122,7 +122,7 @@ struct traffic_selector_t {
         *
         * @return                      port
         */
-       u_int16_t (*get_from_port) (traffic_selector_t *this);
+       uint16_t (*get_from_port) (traffic_selector_t *this);
 
        /**
         * Get ending port of this ts.
@@ -136,7 +136,7 @@ struct traffic_selector_t {
         *
         * @return                      port
         */
-       u_int16_t (*get_to_port) (traffic_selector_t *this);
+       uint16_t (*get_to_port) (traffic_selector_t *this);
 
        /**
         * Get the type of the traffic selector.
@@ -150,7 +150,7 @@ struct traffic_selector_t {
         *
         * @return                      protocol id
         */
-       u_int8_t (*get_protocol) (traffic_selector_t *this);
+       uint8_t (*get_protocol) (traffic_selector_t *this);
 
        /**
         * Check if the traffic selector is for a single host.
@@ -218,7 +218,7 @@ struct traffic_selector_t {
         * @param mask          converted net mask
         * @return                      TRUE if traffic selector matches exactly to the subnet
         */
-       bool (*to_subnet) (traffic_selector_t *this, host_t **net, u_int8_t *mask);
+       bool (*to_subnet) (traffic_selector_t *this, host_t **net, uint8_t *mask);
 
        /**
         * Create a hash value for the traffic selector.
@@ -240,7 +240,7 @@ struct traffic_selector_t {
  * @param port                 port number in host order
  * @return                             ICMP/ICMPv6 message type
  */
-static inline u_int8_t traffic_selector_icmp_type(u_int16_t port)
+static inline uint8_t traffic_selector_icmp_type(uint16_t port)
 {
        return port >> 8;
 }
@@ -251,7 +251,7 @@ static inline u_int8_t traffic_selector_icmp_type(u_int16_t port)
  * @param port                 port number in host order
  * @return                             ICMP/ICMPv6 message code
  */
-static inline u_int8_t traffic_selector_icmp_code(u_int16_t port)
+static inline uint8_t traffic_selector_icmp_code(uint16_t port)
 {
        return port & 0xff;
 }
@@ -286,9 +286,9 @@ int traffic_selector_cmp(traffic_selector_t *a, traffic_selector_t *b,
  *                                             - NULL if invalid address strings/protocol
  */
 traffic_selector_t *traffic_selector_create_from_string(
-                                                                       u_int8_t protocol, ts_type_t type,
-                                                                       char *from_addr, u_int16_t from_port,
-                                                                       char *to_addr, u_int16_t to_port);
+                                                                       uint8_t protocol, ts_type_t type,
+                                                                       char *from_addr, uint16_t from_port,
+                                                                       char *to_addr, uint16_t to_port);
 
 
 
@@ -307,8 +307,8 @@ traffic_selector_t *traffic_selector_create_from_string(
  * @return                             traffic selector, NULL if string invalid
  */
 traffic_selector_t *traffic_selector_create_from_cidr(
-                                                                               char *string, u_int8_t protocol,
-                                                                               u_int16_t from_port, u_int16_t to_port);
+                                                                               char *string, uint8_t protocol,
+                                                                               uint16_t from_port, uint16_t to_port);
 
 /**
  * Create a new traffic selector using data read from the net.
@@ -331,9 +331,9 @@ traffic_selector_t *traffic_selector_create_from_cidr(
  * @return                             traffic_selector_t object
  */
 traffic_selector_t *traffic_selector_create_from_bytes(
-                                                               u_int8_t protocol, ts_type_t type,
-                                                               chunk_t from_address, u_int16_t from_port,
-                                                               chunk_t to_address, u_int16_t to_port);
+                                                               uint8_t protocol, ts_type_t type,
+                                                               chunk_t from_address, uint16_t from_port,
+                                                               chunk_t to_address, uint16_t to_port);
 
 /**
  * Create a new traffic selector using the RFC 3779 ASN.1 min/max address format
@@ -370,8 +370,8 @@ traffic_selector_t *traffic_selector_create_from_rfc3779_format(ts_type_t type,
  *                                             - NULL if address family of net not supported
  */
 traffic_selector_t *traffic_selector_create_from_subnet(
-                                                       host_t *net, u_int8_t netbits, u_int8_t protocol,
-                                                       u_int16_t from_port, u_int16_t to_port);
+                                                       host_t *net, uint8_t netbits, uint8_t protocol,
+                                                       uint16_t from_port, uint16_t to_port);
 
 /**
  * Create a traffic selector for host-to-host cases.
@@ -392,8 +392,8 @@ traffic_selector_t *traffic_selector_create_from_subnet(
  *                                             - traffic_selector_t object
  *                                             - NULL if type not supported
  */
-traffic_selector_t *traffic_selector_create_dynamic(u_int8_t protocol,
-                                                                       u_int16_t from_port, u_int16_t to_port);
+traffic_selector_t *traffic_selector_create_dynamic(uint8_t protocol,
+                                                                       uint16_t from_port, uint16_t to_port);
 
 /**
  * printf hook function for traffic_selector_t.
index 56cc2f19b271bbbf429ae4e5d8074a09b790baef..829e784820adb4866b0867f0aaefd1c01855ba2c 100644 (file)
@@ -540,9 +540,9 @@ METHOD(settings_t, get_int, int,
 /**
  * Described in header
  */
-inline u_int64_t settings_value_as_uint64(char *value, u_int64_t def)
+inline uint64_t settings_value_as_uint64(char *value, uint64_t def)
 {
-       u_int64_t intval;
+       uint64_t intval;
        char *end;
        int base = 10;
 
@@ -597,10 +597,10 @@ METHOD(settings_t, get_double, double,
 /**
  * Described in header
  */
-inline u_int32_t settings_value_as_time(char *value, u_int32_t def)
+inline uint32_t settings_value_as_time(char *value, uint32_t def)
 {
        char *endptr;
-       u_int32_t timeval;
+       uint32_t timeval;
        if (value)
        {
                errno = 0;
@@ -638,8 +638,8 @@ inline u_int32_t settings_value_as_time(char *value, u_int32_t def)
        return def;
 }
 
-METHOD(settings_t, get_time, u_int32_t,
-       private_settings_t *this, char *key, u_int32_t def, ...)
+METHOD(settings_t, get_time, uint32_t,
+       private_settings_t *this, char *key, uint32_t def, ...)
 {
        char *value;
        va_list args;
@@ -695,7 +695,7 @@ METHOD(settings_t, set_double, void,
 }
 
 METHOD(settings_t, set_time, void,
-       private_settings_t *this, char *key, u_int32_t value, ...)
+       private_settings_t *this, char *key, uint32_t value, ...)
 {
        char val[16];
        va_list args;
index a133a368141a79d651940edb721f09b6d7ee7952..eec5ece6c84bc4be323b00112692409e605b60a3 100644 (file)
@@ -51,13 +51,13 @@ bool settings_value_as_bool(char *value, bool def);
 int settings_value_as_int(char *value, int def);
 
 /**
- * Convert a string value returned by a key/value enumerator to an u_int64_t.
+ * Convert a string value returned by a key/value enumerator to an uint64_t.
  *
  * @see settings_t.create_key_value_enumerator()
  * @param value                        the string value
  * @param def                  the default value, if value is NULL or invalid
  */
-u_int64_t settings_value_as_uint64(char *value, u_int64_t def);
+uint64_t settings_value_as_uint64(char *value, uint64_t def);
 
 /**
  * Convert a string value returned by a key/value enumerator to a double.
@@ -77,7 +77,7 @@ double settings_value_as_double(char *value, double def);
  * @param value                        the string value
  * @param def                  the default value, if value is NULL or invalid
  */
-u_int32_t settings_value_as_time(char *value, u_int32_t def);
+uint32_t settings_value_as_time(char *value, uint32_t def);
 
 /**
  * Generic configuration options read from a config file.
@@ -203,7 +203,7 @@ struct settings_t {
         * @param ...           argument list for key
         * @return                      value of the key (in seconds)
         */
-       u_int32_t (*get_time)(settings_t *this, char *key, u_int32_t def, ...);
+       uint32_t (*get_time)(settings_t *this, char *key, uint32_t def, ...);
 
        /**
         * Set a string value.
@@ -248,7 +248,7 @@ struct settings_t {
         * @param def           value to set
         * @param ...           argument list for key
         */
-       void (*set_time)(settings_t *this, char *key, u_int32_t value, ...);
+       void (*set_time)(settings_t *this, char *key, uint32_t value, ...);
 
        /**
         * Set a default for string value.
index eda72e10a1c2c4d4c84e9176db2eca113f562b90..eed8fba56bd3cfe1b8914765f7871ecdfc38bde3 100644 (file)
@@ -512,7 +512,7 @@ END_TEST
 START_TEST(test_insert_create_value)
 {
        array_t *array = NULL;
-       u_int16_t v;
+       uint16_t v;
 
        v = 1;
        array_insert_create_value(&array, sizeof(v), ARRAY_TAIL, &v);
index ac7c5519ec3ddf20506eecdb0f753412e1325ae9..fa02df9ca2c95ac914a0512fd15db661567ebcae 100644 (file)
@@ -462,7 +462,7 @@ START_TEST(test_asn1_to_time)
 {
        typedef struct {
                time_t time;
-               u_int8_t type;
+               uint8_t type;
                char *string;
        } testdata_t;
 
@@ -525,7 +525,7 @@ START_TEST(test_asn1_from_time)
 {
        typedef struct {
                time_t time;
-               u_int8_t type;
+               uint8_t type;
                chunk_t chunk;
        } testdata_t;
 
@@ -759,7 +759,7 @@ END_TEST
 START_TEST(test_asn1_parse_integer_uint64)
 {
        typedef struct {
-               u_int64_t n;
+               uint64_t n;
                chunk_t chunk;
        } testdata_t;
 
index 6a9743d62265c4a65c38b230b7a108a4b289ad73..d3b4b4358cbd1f05ea72085dacfad94f62ffa973 100644 (file)
@@ -65,7 +65,7 @@
 START_TEST(test_read_uint8)
 {
        chunk_t data = chunk_from_chars(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07);
-       u_int8_t val;
+       uint8_t val;
 
        assert_integer_read(data, 8, val);
        assert_basic_read(8, val);
@@ -76,7 +76,7 @@ END_TEST
 START_TEST(test_read_uint16)
 {
        chunk_t data = chunk_from_chars(0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03);
-       u_int16_t val;
+       uint16_t val;
 
        assert_integer_read(data, 16, val);
        assert_basic_read(16, val);
@@ -87,7 +87,7 @@ END_TEST
 START_TEST(test_read_uint24)
 {
        chunk_t data = chunk_from_chars(0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03);
-       u_int32_t val;
+       uint32_t val;
 
        assert_integer_read(data, 24, val);
        assert_basic_read(24, val);
@@ -99,7 +99,7 @@ START_TEST(test_read_uint32)
 {
        chunk_t data = chunk_from_chars(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
                                                                        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03);
-       u_int32_t val;
+       uint32_t val;
 
        assert_integer_read(data, 32, val);
        assert_basic_read(32, val);
@@ -113,7 +113,7 @@ START_TEST(test_read_uint64)
                                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
                                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
                                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03);
-       u_int64_t val;
+       uint64_t val;
 
        assert_integer_read(data, 64, val);
        assert_basic_read(64, val);
@@ -170,7 +170,7 @@ END_TEST
 START_TEST(test_read_uint8_end)
 {
        chunk_t data = chunk_from_chars(0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00);
-       u_int8_t val;
+       uint8_t val;
 
        assert_integer_read_end(data, 8, val);
        assert_basic_read_end(8, val);
@@ -181,7 +181,7 @@ END_TEST
 START_TEST(test_read_uint16_end)
 {
        chunk_t data = chunk_from_chars(0x00, 0x03, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00);
-       u_int16_t val;
+       uint16_t val;
 
        assert_integer_read_end(data, 16, val);
        assert_basic_read_end(16, val);
@@ -192,7 +192,7 @@ END_TEST
 START_TEST(test_read_uint24_end)
 {
        chunk_t data = chunk_from_chars(0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00);
-       u_int32_t val;
+       uint32_t val;
 
        assert_integer_read_end(data, 24, val);
        assert_basic_read_end(24, val);
@@ -204,7 +204,7 @@ START_TEST(test_read_uint32_end)
 {
        chunk_t data = chunk_from_chars(0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
                                                                        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00);
-       u_int32_t val;
+       uint32_t val;
 
        assert_integer_read_end(data, 32, val);
        assert_basic_read_end(32, val);
@@ -218,7 +218,7 @@ START_TEST(test_read_uint64_end)
                                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
                                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
                                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
-       u_int64_t val;
+       uint64_t val;
 
        assert_integer_read_end(data, 64, val);
        assert_basic_read_end(64, val);
index 6272ca79565836fd6d35e158b33621e72ee9734b..7e5310c64efdedb136d1d1a001fe155705309aa3 100644 (file)
@@ -736,7 +736,7 @@ START_TEST(test_chunk_mac)
 {
        chunk_t in;
        u_char key[16];
-       u_int64_t out;
+       uint64_t out;
        int i, count;
 
        count = countof(sip_vectors);
@@ -765,7 +765,7 @@ END_TEST
 START_TEST(test_chunk_hash)
 {
        chunk_t chunk;
-       u_int32_t hash_a, hash_b, hash_c;
+       uint32_t hash_a, hash_b, hash_c;
 
        chunk = chunk_from_str("asdf");
 
@@ -787,7 +787,7 @@ END_TEST
 START_TEST(test_chunk_hash_static)
 {
        chunk_t in;
-       u_int32_t out, hash_a, hash_b, hash_inc = 0x7b891a95;
+       uint32_t out, hash_a, hash_b, hash_inc = 0x7b891a95;
        int i, count;
 
        count = countof(sip_vectors);
@@ -813,7 +813,7 @@ END_TEST
  * test for chunk_internet_checksum[_inc]()
  */
 
-static inline u_int16_t compensate_alignment(u_int16_t val)
+static inline uint16_t compensate_alignment(uint16_t val)
 {
        return ((val & 0xff) << 8) | (val >> 8);
 }
@@ -821,7 +821,7 @@ static inline u_int16_t compensate_alignment(u_int16_t val)
 START_TEST(test_chunk_internet_checksum)
 {
        chunk_t chunk;
-       u_int16_t sum;
+       uint16_t sum;
 
        chunk = chunk_from_chars(0x45,0x00,0x00,0x30,0x44,0x22,0x40,0x00,0x80,0x06,
                                                         0x00,0x00,0x8c,0x7c,0x19,0xac,0xae,0x24,0x1e,0x2b);
index 5cb8013ffad68d0b75062268fb82abd5517fad60..5d054577a9631bed149767d8e47dc6fe218b75bc 100644 (file)
@@ -46,7 +46,7 @@ static void verify_netmask(chunk_t addr, int mask)
  * host_create_any
  */
 
-static void verify_any(host_t *host, int family, u_int16_t port)
+static void verify_any(host_t *host, int family, uint16_t port)
 {
        verify_netmask(host->get_address(host), 0);
        ck_assert(host->is_anyaddr(host));
@@ -88,7 +88,7 @@ END_TEST
  * host_create_from_string
  */
 
-static void verify_address(host_t *host, chunk_t addr, int family, u_int16_t port)
+static void verify_address(host_t *host, chunk_t addr, int family, uint16_t port)
 {
        ck_assert(chunk_equals(host->get_address(host), addr));
        ck_assert(!host->is_anyaddr(host));
@@ -656,7 +656,7 @@ END_TEST
 
 static struct {
        char *addr;
-       u_int16_t port;
+       uint16_t port;
        /* results for %H, %+H, %#H (falls back to [0]) */
        char *result[3];
 } printf_data[] = {
index 4e45c8538f102eb18808c58177e3967de4b24594..8b0a14b799de83dc484fd5585a6ba6eb8970f394 100644 (file)
 START_TEST(test_iv_gen_seq)
 {
        iv_gen_t *iv_gen;
-       u_int64_t iv0, iv1_1, iv1_2;
+       uint64_t iv0, iv1_1, iv1_2;
 
        iv_gen = iv_gen_seq_create();
-       ck_assert(iv_gen->get_iv(iv_gen, 0, 8, (u_int8_t*)&iv0));
-       ck_assert(iv_gen->get_iv(iv_gen, 1, 8, (u_int8_t*)&iv1_1));
+       ck_assert(iv_gen->get_iv(iv_gen, 0, 8, (uint8_t*)&iv0));
+       ck_assert(iv_gen->get_iv(iv_gen, 1, 8, (uint8_t*)&iv1_1));
        ck_assert(iv0 != iv1_1);
        /* every sequence number may be used twice, but results in a different IV */
-       ck_assert(iv_gen->get_iv(iv_gen, 1, 8, (u_int8_t*)&iv1_2));
+       ck_assert(iv_gen->get_iv(iv_gen, 1, 8, (uint8_t*)&iv1_2));
        ck_assert(iv0 != iv1_2);
        ck_assert(iv1_1 != iv1_2);
-       ck_assert(!iv_gen->get_iv(iv_gen, 1, 8, (u_int8_t*)&iv1_2));
+       ck_assert(!iv_gen->get_iv(iv_gen, 1, 8, (uint8_t*)&iv1_2));
        iv_gen->destroy(iv_gen);
 }
 END_TEST
@@ -39,19 +39,19 @@ END_TEST
 START_TEST(test_iv_gen_seq_len)
 {
        iv_gen_t *iv_gen;
-       u_int64_t iv;
-       u_int8_t buf[9];
+       uint64_t iv;
+       uint8_t buf[9];
 
        iv_gen = iv_gen_seq_create();
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 0, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 1, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 2, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 3, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 4, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 5, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 6, (u_int8_t*)&iv));
-       ck_assert(!iv_gen->get_iv(iv_gen, 0, 7, (u_int8_t*)&iv));
-       ck_assert(iv_gen->get_iv(iv_gen, 0, 8, (u_int8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 0, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 1, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 2, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 3, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 4, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 5, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 6, (uint8_t*)&iv));
+       ck_assert(!iv_gen->get_iv(iv_gen, 0, 7, (uint8_t*)&iv));
+       ck_assert(iv_gen->get_iv(iv_gen, 0, 8, (uint8_t*)&iv));
        ck_assert(iv_gen->get_iv(iv_gen, 0, 9, buf));
        iv_gen->destroy(iv_gen);
 }
index d209fa2bc05b0eb2fd5f74150215943f719506d4..0a6d24d04191a53348e06de729a429da0eadedc0 100644 (file)
@@ -25,7 +25,7 @@
 #include <plugins/ntru/ntru_private_key.h>
 
 IMPORT_FUNCTION_FOR_TESTS(ntru, ntru_drbg_create, ntru_drbg_t*,
-                                                 u_int32_t strength, chunk_t pers_str, rng_t *entropy)
+                                                 uint32_t strength, chunk_t pers_str, rng_t *entropy)
 
 IMPORT_FUNCTION_FOR_TESTS(ntru, ntru_trits_create, ntru_trits_t*,
                                                  size_t len, hash_algorithm_t alg, chunk_t seed)
@@ -36,7 +36,7 @@ IMPORT_FUNCTION_FOR_TESTS(ntru, ntru_poly_create_from_seed, ntru_poly_t*,
                                                  uint32_t indices_len_m, bool is_product_form)
 
 IMPORT_FUNCTION_FOR_TESTS(ntru, ntru_poly_create_from_data, ntru_poly_t*,
-                                                 u_int16_t *data, uint16_t N, uint16_t q,
+                                                 uint16_t *data, uint16_t N, uint16_t q,
                                                  uint32_t indices_len_p, uint32_t indices_len_m,
                                                  bool is_product_form)
 
@@ -73,8 +73,8 @@ char *parameter_sets[] = {
 };
 
 typedef struct {
-       u_int32_t requested;
-       u_int32_t standard;
+       uint32_t requested;
+       uint32_t standard;
 }strength_t;
 
 strength_t strengths[] = {
index 9e40d1fc076c538aa21d7471ac88bbb6398f3721..377f2a767535d9c21c62084592f1898d99094a6c 100644 (file)
@@ -75,7 +75,7 @@ END_TEST
 
 START_TEST(test_printf_unsigned)
 {
-       verify("1 23 456", "%u %lu %llu", 1, (u_long)23, (u_int64_t)456);
+       verify("1 23 456", "%u %lu %llu", 1, (u_long)23, (uint64_t)456);
        verify("65535 255", "%hu %hhu", 0x1ffff, 0x1ff);
        verify("123456789", "%zu", (size_t)123456789);
        verify("   12", "%5u", 12);
@@ -99,7 +99,7 @@ END_TEST
 
 START_TEST(test_printf_hex)
 {
-       verify("1 23 456", "%x %lx %llx", 1, (u_long)0x23, (u_int64_t)0x456);
+       verify("1 23 456", "%x %lx %llx", 1, (u_long)0x23, (uint64_t)0x456);
        verify("12abcdef 12ABCDEF", "%x %X", 0x12ABCDEF, 0x12ABCDEF);
        verify("ffff ff", "%hx %hhx", 0x1ffff, 0x1ff);
        verify("23456789", "%zx", (size_t)0x23456789);
@@ -170,10 +170,10 @@ END_TEST
 
 START_TEST(test_printf_pri)
 {
-       verify("255", "%" PRIu8, (u_int8_t)0xFF);
-       verify("65535", "%" PRIu16, (u_int16_t)0xFFFF);
-       verify("4294967295", "%" PRIu32, (u_int32_t)0x1FFFFFFFFll);
-       verify("18446744073709551615", "%" PRIu64, (u_int64_t)0xFFFFFFFFFFFFFFFFll);
+       verify("255", "%" PRIu8, (uint8_t)0xFF);
+       verify("65535", "%" PRIu16, (uint16_t)0xFFFF);
+       verify("4294967295", "%" PRIu32, (uint32_t)0x1FFFFFFFFll);
+       verify("18446744073709551615", "%" PRIu64, (uint64_t)0xFFFFFFFFFFFFFFFFll);
 
        verify("-1", "%" PRId8, (int8_t)-1);
        verify("-1", "%" PRId16, (int16_t)-1);
index 5c0fb754d7a80cead8908a0d1d835eab49f10948..0d5d877ac8cafa1847c1cf8215d1818154bc6a71 100644 (file)
@@ -198,7 +198,7 @@ struct {
        char *from;
        char *to;
        char *net;
-       u_int8_t mask;
+       uint8_t mask;
        bool exact;
 } to_subnet_tests[] = {
        { TS_IPV4_ADDR_RANGE,   "10.0.0.1",     "10.0.0.1",                     "10.0.0.1",     32,     TRUE    },
@@ -218,7 +218,7 @@ START_TEST(test_to_subnet)
 {
        traffic_selector_t *ts;
        host_t *net, *exp_net;
-       u_int8_t mask;
+       uint8_t mask;
 
        ts = traffic_selector_create_from_string(0, to_subnet_tests[_i].type,
                                        to_subnet_tests[_i].from, 0, to_subnet_tests[_i].to, 0);
@@ -234,9 +234,9 @@ END_TEST
 
 struct {
        char *cidr;
-       u_int16_t from_port;
-       u_int16_t to_port;
-       u_int16_t port;
+       uint16_t from_port;
+       uint16_t to_port;
+       uint16_t port;
 } to_subnet_port_tests[] = {
        { "10.0.0.0/8",         0,              0,              0       },
        { "10.0.0.1/32",        80,             80,             80      },
@@ -252,7 +252,7 @@ START_TEST(test_to_subnet_port)
 {
        traffic_selector_t *ts;
        host_t *net, *exp_net;
-       u_int8_t mask;
+       uint8_t mask;
        int exp_mask;
 
        ts = traffic_selector_create_from_cidr(to_subnet_port_tests[_i].cidr, 0,
@@ -431,9 +431,9 @@ struct {
        bool contained;
        struct {
                char *net;
-               u_int8_t proto;
-               u_int16_t from_port;
-               u_int16_t to_port;
+               uint8_t proto;
+               uint16_t from_port;
+               uint16_t to_port;
        } a, b;
 } is_contained_in_tests[] = {
        {  TRUE,  { "10.0.0.0/16", 0, 0, 65535 },       { "10.0.0.0/16", 0, 0, 65535 }, },
@@ -555,9 +555,9 @@ struct {
        int res;
        struct {
                char *net;
-               u_int8_t proto;
-               u_int16_t from_port;
-               u_int16_t to_port;
+               uint8_t proto;
+               uint16_t from_port;
+               uint16_t to_port;
        } a, b;
 } cmp_tests[] = {
        {  0, { "10.0.0.0/8", 0, 0, 65535 },    { "10.0.0.0/8", 0, 0, 65535 },  },
@@ -706,13 +706,13 @@ START_TEST(test_hash)
 END_TEST
 
 struct {
-       u_int8_t proto;
-       u_int16_t from_port;
-       u_int16_t to_port;
-       u_int8_t from_type;
-       u_int8_t from_code;
-       u_int8_t to_type;
-       u_int8_t to_code;
+       uint8_t proto;
+       uint16_t from_port;
+       uint16_t to_port;
+       uint8_t from_type;
+       uint8_t from_code;
+       uint8_t to_type;
+       uint8_t to_code;
        char *str;
        char *str_alt;
 } icmp_tests[] = {
@@ -731,7 +731,7 @@ struct {
 START_TEST(test_icmp)
 {
        traffic_selector_t *ts;
-       u_int16_t from, to;
+       uint16_t from, to;
 
        ts = traffic_selector_create_dynamic(icmp_tests[_i].proto,
                                                        icmp_tests[_i].from_port, icmp_tests[_i].to_port);
index 104b0b2c08aa7384fcf99f95143cb27aff63617d..504562615caa900c780842416738714d1aa4d6bf 100644 (file)
@@ -121,9 +121,9 @@ END_TEST
 START_TEST(test_htoun)
 {
        chunk_t net64, expected;
-       u_int16_t host16 = 513;
-       u_int32_t net16 = 0, host32 = 67305985;
-       u_int64_t net32 = 0, host64 = 578437695752307201ULL;
+       uint16_t host16 = 513;
+       uint32_t net16 = 0, host32 = 67305985;
+       uint64_t net32 = 0, host64 = 578437695752307201ULL;
 
        net64 = chunk_alloca(16);
        memset(net64.ptr, 0, net64.len);
@@ -133,14 +133,14 @@ START_TEST(test_htoun)
        ck_assert(chunk_equals(expected, chunk_from_thing(net16)));
 
        expected = chunk_from_chars(0x00, 0x00, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00);
-       htoun32((u_int16_t*)&net32 + 1, host32);
+       htoun32((uint16_t*)&net32 + 1, host32);
        ck_assert(chunk_equals(expected, chunk_from_thing(net32)));
 
        expected = chunk_from_chars(0x00, 0x00, 0x00, 0x00,
                                                                0x08, 0x07, 0x06, 0x05,
                                                                0x04, 0x03, 0x02, 0x01,
                                                                0x00, 0x00, 0x00, 0x00);
-       htoun64((u_int32_t*)net64.ptr + 1, host64);
+       htoun64((uint32_t*)net64.ptr + 1, host64);
        ck_assert(chunk_equals(expected, net64));
 }
 END_TEST
@@ -148,9 +148,9 @@ END_TEST
 START_TEST(test_untoh)
 {
        chunk_t net;
-       u_int16_t host16;
-       u_int32_t host32;
-       u_int64_t host64;
+       uint16_t host16;
+       uint32_t host32;
+       uint64_t host64;
 
        net = chunk_from_chars(0x00, 0x02, 0x01, 0x00);
        host16 = untoh16(net.ptr + 1);
@@ -308,7 +308,7 @@ END_TEST
 
 START_TEST(test_memxor_aligned)
 {
-       u_int64_t a = 0, b = 0;
+       uint64_t a = 0, b = 0;
        chunk_t ca, cb;
        int i;
 
index 01569509bd467521fac09d58a40e25220745bbbe..2985a56e3739cea27b97d6868c84ed4b52235c8e 100644 (file)
@@ -34,7 +34,7 @@ struct private_rng_t {
 };
 
 METHOD(rng_t, get_bytes, bool,
-       private_rng_t *this, size_t bytes, u_int8_t *buffer)
+       private_rng_t *this, size_t bytes, uint8_t *buffer)
 {
        if (bytes > this->entropy.len)
        {
index c4471be707302d699c01fe531152631eed9494e7..2f824a259044b6b4fe9b198b59cf056949f8d559 100644 (file)
@@ -775,25 +775,25 @@ bool chunk_printable(chunk_t chunk, chunk_t *sane, char replace)
 /**
  * Helper functions for chunk_mac()
  */
-static inline u_int64_t sipget(u_char *in)
+static inline uint64_t sipget(u_char *in)
 {
-       u_int64_t v = 0;
+       uint64_t v = 0;
        int i;
 
        for (i = 0; i < 64; i += 8, ++in)
        {
-               v |= ((u_int64_t)*in) << i;
+               v |= ((uint64_t)*in) << i;
        }
        return v;
 }
 
-static inline u_int64_t siprotate(u_int64_t v, int shift)
+static inline uint64_t siprotate(uint64_t v, int shift)
 {
         return (v << shift) | (v >> (64 - shift));
 }
 
-static inline void sipround(u_int64_t *v0, u_int64_t *v1, u_int64_t *v2,
-                                                       u_int64_t *v3)
+static inline void sipround(uint64_t *v0, uint64_t *v1, uint64_t *v2,
+                                                       uint64_t *v3)
 {
        *v0 += *v1;
        *v1 = siprotate(*v1, 13);
@@ -814,8 +814,8 @@ static inline void sipround(u_int64_t *v0, u_int64_t *v1, u_int64_t *v2,
        *v3 ^= *v0;
 }
 
-static inline void sipcompress(u_int64_t *v0, u_int64_t *v1, u_int64_t *v2,
-                                                          u_int64_t *v3, u_int64_t m)
+static inline void sipcompress(uint64_t *v0, uint64_t *v1, uint64_t *v2,
+                                                          uint64_t *v3, uint64_t m)
 {
        *v3 ^= m;
        sipround(v0, v1, v2, v3);
@@ -823,28 +823,28 @@ static inline void sipcompress(u_int64_t *v0, u_int64_t *v1, u_int64_t *v2,
        *v0 ^= m;
 }
 
-static inline u_int64_t siplast(size_t len, u_char *pos)
+static inline uint64_t siplast(size_t len, u_char *pos)
 {
-       u_int64_t b;
+       uint64_t b;
        int rem = len & 7;
 
-       b = ((u_int64_t)len) << 56;
+       b = ((uint64_t)len) << 56;
        switch (rem)
        {
                case 7:
-                       b |= ((u_int64_t)pos[6]) << 48;
+                       b |= ((uint64_t)pos[6]) << 48;
                case 6:
-                       b |= ((u_int64_t)pos[5]) << 40;
+                       b |= ((uint64_t)pos[5]) << 40;
                case 5:
-                       b |= ((u_int64_t)pos[4]) << 32;
+                       b |= ((uint64_t)pos[4]) << 32;
                case 4:
-                       b |= ((u_int64_t)pos[3]) << 24;
+                       b |= ((uint64_t)pos[3]) << 24;
                case 3:
-                       b |= ((u_int64_t)pos[2]) << 16;
+                       b |= ((uint64_t)pos[2]) << 16;
                case 2:
-                       b |= ((u_int64_t)pos[1]) <<  8;
+                       b |= ((uint64_t)pos[1]) <<  8;
                case 1:
-                       b |= ((u_int64_t)pos[0]);
+                       b |= ((uint64_t)pos[0]);
                        break;
                case 0:
                        break;
@@ -855,9 +855,9 @@ static inline u_int64_t siplast(size_t len, u_char *pos)
 /**
  * Caculate SipHash-2-4 with an optional first block given as argument.
  */
-static u_int64_t chunk_mac_inc(chunk_t chunk, u_char *key, u_int64_t m)
+static uint64_t chunk_mac_inc(chunk_t chunk, u_char *key, uint64_t m)
 {
-       u_int64_t v0, v1, v2, v3, k0, k1;
+       uint64_t v0, v1, v2, v3, k0, k1;
        size_t len = chunk.len;
        u_char *pos = chunk.ptr, *end;
 
@@ -896,7 +896,7 @@ static u_int64_t chunk_mac_inc(chunk_t chunk, u_char *key, u_int64_t m)
 /**
  * Described in header.
  */
-u_int64_t chunk_mac(chunk_t chunk, u_char *key)
+uint64_t chunk_mac(chunk_t chunk, u_char *key)
 {
        return chunk_mac_inc(chunk, key, 0);
 }
@@ -957,16 +957,16 @@ void chunk_hash_seed()
 /**
  * Described in header.
  */
-u_int32_t chunk_hash_inc(chunk_t chunk, u_int32_t hash)
+uint32_t chunk_hash_inc(chunk_t chunk, uint32_t hash)
 {
        /* we could use a mac of the previous hash, but this is faster */
-       return chunk_mac_inc(chunk, key, ((u_int64_t)hash) << 32 | hash);
+       return chunk_mac_inc(chunk, key, ((uint64_t)hash) << 32 | hash);
 }
 
 /**
  * Described in header.
  */
-u_int32_t chunk_hash(chunk_t chunk)
+uint32_t chunk_hash(chunk_t chunk)
 {
        return chunk_mac(chunk, key);
 }
@@ -974,15 +974,15 @@ u_int32_t chunk_hash(chunk_t chunk)
 /**
  * Described in header.
  */
-u_int32_t chunk_hash_static_inc(chunk_t chunk, u_int32_t hash)
+uint32_t chunk_hash_static_inc(chunk_t chunk, uint32_t hash)
 {      /* we could use a mac of the previous hash, but this is faster */
-       return chunk_mac_inc(chunk, static_key, ((u_int64_t)hash) << 32 | hash);
+       return chunk_mac_inc(chunk, static_key, ((uint64_t)hash) << 32 | hash);
 }
 
 /**
  * Described in header.
  */
-u_int32_t chunk_hash_static(chunk_t chunk)
+uint32_t chunk_hash_static(chunk_t chunk)
 {
        return chunk_mac(chunk, static_key);
 }
@@ -990,9 +990,9 @@ u_int32_t chunk_hash_static(chunk_t chunk)
 /**
  * Described in header.
  */
-u_int16_t chunk_internet_checksum_inc(chunk_t data, u_int16_t checksum)
+uint16_t chunk_internet_checksum_inc(chunk_t data, uint16_t checksum)
 {
-       u_int32_t sum = ntohs((u_int16_t)~checksum);
+       uint32_t sum = ntohs((uint16_t)~checksum);
 
        while (data.len > 1)
        {
@@ -1001,7 +1001,7 @@ u_int16_t chunk_internet_checksum_inc(chunk_t data, u_int16_t checksum)
        }
        if (data.len)
        {
-               sum += (u_int16_t)*data.ptr << 8;
+               sum += (uint16_t)*data.ptr << 8;
        }
        while (sum >> 16)
        {
@@ -1013,7 +1013,7 @@ u_int16_t chunk_internet_checksum_inc(chunk_t data, u_int16_t checksum)
 /**
  * Described in header.
  */
-u_int16_t chunk_internet_checksum(chunk_t data)
+uint16_t chunk_internet_checksum(chunk_t data)
 {
        return chunk_internet_checksum_inc(data, 0xffff);
 }
index 2ec7f7543b5c539dbb22fb507d2331b7e21660a9..403c7f83bf1d066b68b1532b23843437d7233be8 100644 (file)
@@ -375,7 +375,7 @@ void chunk_hash_seed();
  * @param chunk                        data to hash
  * @return                             hash value
  */
-u_int32_t chunk_hash(chunk_t chunk);
+uint32_t chunk_hash(chunk_t chunk);
 
 /**
  * Incremental version of chunk_hash. Use this to hash two or more chunks.
@@ -384,7 +384,7 @@ u_int32_t chunk_hash(chunk_t chunk);
  * @param hash                 previous hash value
  * @return                             hash value
  */
-u_int32_t chunk_hash_inc(chunk_t chunk, u_int32_t hash);
+uint32_t chunk_hash_inc(chunk_t chunk, uint32_t hash);
 
 /**
  * Computes a 32 bit hash of the given chunk.
@@ -398,7 +398,7 @@ u_int32_t chunk_hash_inc(chunk_t chunk, u_int32_t hash);
  * @param chunk                        data to hash
  * @return                             hash value
  */
-u_int32_t chunk_hash_static(chunk_t chunk);
+uint32_t chunk_hash_static(chunk_t chunk);
 
 /**
  * Incremental version of chunk_hash_static(). Use this to hash two or more
@@ -408,7 +408,7 @@ u_int32_t chunk_hash_static(chunk_t chunk);
  * @param hash                 previous hash value
  * @return                             hash value
  */
-u_int32_t chunk_hash_static_inc(chunk_t chunk, u_int32_t hash);
+uint32_t chunk_hash_static_inc(chunk_t chunk, uint32_t hash);
 
 /**
  * Computes a quick MAC from the given chunk and key using SipHash.
@@ -422,7 +422,7 @@ u_int32_t chunk_hash_static_inc(chunk_t chunk, u_int32_t hash);
  * @param key                  key to use
  * @return                             MAC for given input and key
  */
-u_int64_t chunk_mac(chunk_t chunk, u_char *key);
+uint64_t chunk_mac(chunk_t chunk, u_char *key);
 
 /**
  * Calculate the Internet Checksum according to RFC 1071 for the given chunk.
@@ -434,7 +434,7 @@ u_int64_t chunk_mac(chunk_t chunk, u_char *key);
  * @param data                 data to process
  * @return                             checksum (one's complement, network order)
  */
-u_int16_t chunk_internet_checksum(chunk_t data);
+uint16_t chunk_internet_checksum(chunk_t data);
 
 /**
  * Extend the given Internet Checksum (one's complement, in network byte order)
@@ -447,7 +447,7 @@ u_int16_t chunk_internet_checksum(chunk_t data);
  * @param checksum             previous checksum (one's complement, network order)
  * @return                             checksum (one's complement, network order)
  */
-u_int16_t chunk_internet_checksum_inc(chunk_t data, u_int16_t checksum);
+uint16_t chunk_internet_checksum_inc(chunk_t data, uint16_t checksum);
 
 /**
  * printf hook function for chunk_t.
index d86ca6bd870535451554175f7e2334578fcca0db..0529701eae84c0e67d7250e237923e7326e59c1b 100644 (file)
@@ -102,7 +102,7 @@ static cpu_feature_t get_via_features()
  */
 cpu_feature_t cpu_feature_get_all()
 {
-       char vendor[3 * sizeof(u_int32_t) + 1];
+       char vendor[3 * sizeof(uint32_t) + 1];
        cpu_feature_t f = 0;
        u_int a, b, c, d;
 
index b66df02e78e7e6c94aaaabfd01d4744d9acc7edb..6f9510b3e88ffebb44499818f54f2b96495646b8 100644 (file)
@@ -56,10 +56,10 @@ struct private_integrity_checker_t {
        int checksum_count;
 };
 
-METHOD(integrity_checker_t, build_file, u_int32_t,
+METHOD(integrity_checker_t, build_file, uint32_t,
        private_integrity_checker_t *this, char *file, size_t *len)
 {
-       u_int32_t checksum;
+       uint32_t checksum;
        chunk_t *contents;
 
        contents = chunk_map(file, FALSE);
@@ -109,7 +109,7 @@ static int callback(struct dl_phdr_info *dlpi, size_t size, Dl_info *dli)
        return 0;
 }
 
-METHOD(integrity_checker_t, build_segment, u_int32_t,
+METHOD(integrity_checker_t, build_segment, uint32_t,
        private_integrity_checker_t *this, void *sym, size_t *len)
 {
        chunk_t segment;
@@ -154,7 +154,7 @@ METHOD(integrity_checker_t, check_file, bool,
        private_integrity_checker_t *this, char *name, char *file)
 {
        integrity_checksum_t *cs;
-       u_int32_t sum;
+       uint32_t sum;
        size_t len = 0;
 
        cs = find_checksum(this, name);
@@ -188,7 +188,7 @@ METHOD(integrity_checker_t, check_segment, bool,
        private_integrity_checker_t *this, char *name, void *sym)
 {
        integrity_checksum_t *cs;
-       u_int32_t sum;
+       uint32_t sum;
        size_t len = 0;
 
        cs = find_checksum(this, name);
index afaa114b3a2190f31dc4f1b62b946f124e5182a9..2ac21c60883350d1717013547a6d8166dc90436d 100644 (file)
@@ -35,11 +35,11 @@ struct integrity_checksum_t {
        /* size in bytes of the file on disk */
        size_t file_len;
        /* checksum of the file on disk */
-       u_int32_t file;
+       uint32_t file;
        /* size in bytes of executable segment in memory */
        size_t segment_len;
        /* checksum of the executable segment in memory */
-       u_int32_t segment;
+       uint32_t segment;
 };
 
 /**
@@ -66,7 +66,7 @@ struct integrity_checker_t {
         * @param len           return length in bytes of file
         * @return                      checksum, 0 on error
         */
-       u_int32_t (*build_file)(integrity_checker_t *this, char *file, size_t *len);
+       uint32_t (*build_file)(integrity_checker_t *this, char *file, size_t *len);
 
        /**
         * Check the integrity of the code segment in memory.
@@ -83,7 +83,7 @@ struct integrity_checker_t {
         * @param len           return length in bytes of code segment in memory
         * @return                      checksum, 0 on error
         */
-       u_int32_t (*build_segment)(integrity_checker_t *this, void *sym, size_t *len);
+       uint32_t (*build_segment)(integrity_checker_t *this, void *sym, size_t *len);
 
        /**
         * Check both, on disk file integrity and loaded segment.
index 99f4843ad6c61112c8207f33089afbd84ad67b98..25bd1118fe33b0dd1719be63f7704df4bacb63da 100644 (file)
@@ -120,17 +120,17 @@ struct memory_header_t {
        /**
         * Padding to make sizeof(memory_header_t) == 32
         */
-       u_int32_t padding[sizeof(void*) == sizeof(u_int32_t) ? 3 : 0];
+       uint32_t padding[sizeof(void*) == sizeof(uint32_t) ? 3 : 0];
 
        /**
         * Number of bytes following after the header
         */
-       u_int32_t bytes;
+       uint32_t bytes;
 
        /**
         * magic bytes to detect bad free or heap underflow, MEMORY_HEADER_MAGIC
         */
-       u_int32_t magic;
+       uint32_t magic;
 
 }__attribute__((__packed__));
 
@@ -142,7 +142,7 @@ struct memory_tail_t {
        /**
         * Magic bytes to detect heap overflow, MEMORY_TAIL_MAGIC
         */
-       u_int32_t magic;
+       uint32_t magic;
 
 }__attribute__((__packed__));
 
index 40cb43d907d86e44dd65ee7b2a33cc36a57e1965..4deba0fe7dd1b1626250f0ea8463d7122f2b445f 100644 (file)
@@ -33,7 +33,7 @@
 /* This is from the kernel sources.  We limit the length of directory names to
  * 256 as we only use it to enumerate FDs. */
 struct linux_dirent64 {
-       u_int64_t d_ino;
+       uint64_t d_ino;
        int64_t d_off;
        unsigned short  d_reclen;
        unsigned char d_type;
index 29f110ff12f80e02739cdf07506114edd7c4cf4d..ffdb1b5cec0620b41713437b6f706b2ca0a4a157 100644 (file)
@@ -20,9 +20,9 @@
 /**
  * Described in header.
  */
-void* malloc_align(size_t size, u_int8_t align)
+void* malloc_align(size_t size, uint8_t align)
 {
-       u_int8_t pad;
+       uint8_t pad;
        void *ptr;
 
        if (align == 0)
@@ -46,7 +46,7 @@ void* malloc_align(size_t size, u_int8_t align)
  */
 void free_align(void *ptr)
 {
-       u_int8_t pad, *pos;
+       uint8_t pad, *pos;
 
        pos = ptr - 1;
        /* verify padding to check any corruption */
index 39cde10c88186bbcd287a7af4bca4401368db130..a28dc36681d3bf6441778ec6bd761b5127f6ae06 100644 (file)
@@ -74,7 +74,7 @@ static inline size_t round_down(size_t size, size_t alignment)
  * @param align                        alignment, up to 255 bytes, usually a power of 2
  * @return                             allocated hunk, aligned to align bytes
  */
-void* malloc_align(size_t size, u_int8_t align);
+void* malloc_align(size_t size, uint8_t align);
 
 /**
  * Free a hunk allocated by malloc_align().
index 3ccbad5f15c20a1f1af03ba1b77a56aacce18737..1072a0e6e05a27268386981cdb14e704c7cf1daa 100644 (file)
@@ -26,7 +26,7 @@
  * Architecture independent bitfield definition helpers (at least with GCC).
  *
  * Defines a bitfield with a type t and a fixed size of bitfield members, e.g.:
- * BITFIELD2(u_int8_t,
+ * BITFIELD2(uint8_t,
  *     low: 4,
  *     high: 4,
  * ) flags;
@@ -80,7 +80,7 @@
  * @param host         host order 16-bit value
  * @param network      unaligned address to write network order value to
  */
-static inline void htoun16(void *network, u_int16_t host)
+static inline void htoun16(void *network, uint16_t host)
 {
        char *unaligned = (char*)network;
 
@@ -94,7 +94,7 @@ static inline void htoun16(void *network, u_int16_t host)
  * @param host         host order 32-bit value
  * @param network      unaligned address to write network order value to
  */
-static inline void htoun32(void *network, u_int32_t host)
+static inline void htoun32(void *network, uint32_t host)
 {
        char *unaligned = (char*)network;
 
@@ -108,7 +108,7 @@ static inline void htoun32(void *network, u_int32_t host)
  * @param host         host order 64-bit value
  * @param network      unaligned address to write network order value to
  */
-static inline void htoun64(void *network, u_int64_t host)
+static inline void htoun64(void *network, uint64_t host)
 {
        char *unaligned = (char*)network;
 
@@ -122,10 +122,10 @@ static inline void htoun64(void *network, u_int64_t host)
  * @param network      unaligned address to read network order value from
  * @return                     host order value
  */
-static inline u_int16_t untoh16(void *network)
+static inline uint16_t untoh16(void *network)
 {
        char *unaligned = (char*)network;
-       u_int16_t tmp;
+       uint16_t tmp;
 
        memcpy(&tmp, unaligned, sizeof(tmp));
        return ntohs(tmp);
@@ -137,10 +137,10 @@ static inline u_int16_t untoh16(void *network)
  * @param network      unaligned address to read network order value from
  * @return                     host order value
  */
-static inline u_int32_t untoh32(void *network)
+static inline uint32_t untoh32(void *network)
 {
        char *unaligned = (char*)network;
-       u_int32_t tmp;
+       uint32_t tmp;
 
        memcpy(&tmp, unaligned, sizeof(tmp));
        return ntohl(tmp);
@@ -152,10 +152,10 @@ static inline u_int32_t untoh32(void *network)
  * @param network      unaligned address to read network order value from
  * @return                     host order value
  */
-static inline u_int64_t untoh64(void *network)
+static inline uint64_t untoh64(void *network)
 {
        char *unaligned = (char*)network;
-       u_int64_t tmp;
+       uint64_t tmp;
 
        memcpy(&tmp, unaligned, sizeof(tmp));
        return be64toh(tmp);
@@ -167,9 +167,9 @@ static inline u_int64_t untoh64(void *network)
  * @param p                    unaligned address to read little endian value from
  * @return                     host order value
  */
-static inline u_int32_t uletoh32(void *p)
+static inline uint32_t uletoh32(void *p)
 {
-       u_int32_t ret;
+       uint32_t ret;
 
        memcpy(&ret, p, sizeof(ret));
        ret = le32toh(ret);
@@ -182,7 +182,7 @@ static inline u_int32_t uletoh32(void *p)
  * @param p                    host order 32-bit value
  * @param v                    unaligned address to write little endian value to
  */
-static inline void htoule32(void *p, u_int32_t v)
+static inline void htoule32(void *p, uint32_t v)
 {
        v = htole32(v);
        memcpy(p, &v, sizeof(v));
index a15371518be56236ccb6a1ea9f6a01aad9aa7b15..30c6f546c6f552db57e17f9824b0c600deb0f1e0 100644 (file)
@@ -20,7 +20,7 @@
 /**
  * Described in header.
  */
-void memxor(u_int8_t dst[], u_int8_t src[], size_t n)
+void memxor(uint8_t dst[], uint8_t src[], size_t n)
 {
        int m, i;
 
index aef318f6c082e0c5b20e9ba3bf5266f7bfb7282a..b978e7c48b4b70fb1b6ecc2dfc8715d556b2ec22 100644 (file)
@@ -80,7 +80,7 @@ static inline void *memset_noop(void *s, int c, size_t n)
 /**
  * Same as memcpy, but XORs src into dst instead of copy
  */
-void memxor(u_int8_t dest[], u_int8_t src[], size_t n);
+void memxor(uint8_t dest[], uint8_t src[], size_t n);
 
 /**
  * Safely overwrite n bytes of memory at ptr with zero, non-inlining variant.
index c67ae93f2a36757367ac0570f4a41cf4af381b6b..48e5151c0bbbb0cd01182f9279247725dc343498 100644 (file)
@@ -121,7 +121,7 @@ int time_delta_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
        char* unit = "second";
        time_t *arg1 = *((time_t**)(args[0]));
        time_t *arg2 = *((time_t**)(args[1]));
-       u_int64_t delta = llabs(*arg1 - *arg2);
+       uint64_t delta = llabs(*arg1 - *arg2);
 
        if (delta > 2 * 60 * 60 * 24)
        {
index 056c2e0c203245c49c0f19c757b59f06e81c3eaf..0aad694910f1a75f628ee19d8dd7bcdd1fab6409 100644 (file)
  */
 #if defined __sun || defined WIN32
 #include <stdint.h>
-typedef uint8_t  u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-typedef uint64_t u_int64_t;
+typedef uint8_t  uint8_t;
+typedef uint16_t uint16_t;
+typedef uint32_t uint32_t;
+typedef uint64_t uint64_t;
 #endif
 
 #ifdef HAVE_INT128
@@ -70,7 +70,7 @@ typedef unsigned __int128 u_int128_t;
 # define MAX_UINT_TYPE u_int128_t
 #else
 # define MAX_INT_TYPE int64_t
-# define MAX_UINT_TYPE u_int64_t
+# define MAX_UINT_TYPE uint64_t
 #endif
 
 /**
index 42a4607b7deadec08759fee551b2f149417ff7aa..d105dd3725971a53dccd3c6b186f97a6c9c7f688 100644 (file)
@@ -267,7 +267,7 @@ END_TEARDOWN
  */
 typedef struct {
        tls_version_t version;
-       u_int16_t port;
+       uint16_t port;
        char *addr;
        chunk_t data;
        int fd;
@@ -411,7 +411,7 @@ static void run_echo_client(echo_server_config_t *config)
 /**
  * Common test wrapper function for different test variants
  */
-static void test_tls(tls_version_t version, u_int16_t port, bool cauth, u_int i)
+static void test_tls(tls_version_t version, uint16_t port, bool cauth, u_int i)
 {
        echo_server_config_t *config;
        tls_cipher_suite_t *suites;
index 08a06f5ef2b7e19b0e760898428b5184c3b9d52f..ea39f7fd1e8fd5cabe7d73bbb37821e01d2597cf 100644 (file)
@@ -83,9 +83,9 @@ ENUM_END(tls_extension_names, TLS_EXT_RENEGOTIATION_INFO);
  * TLS record
  */
 typedef struct __attribute__((packed)) {
-       u_int8_t type;
-       u_int16_t version;
-       u_int16_t length;
+       uint8_t type;
+       uint16_t version;
+       uint16_t length;
        char data[];
 } tls_record_t;
 
index 67cfd3a755293741595806610b5cbee1657fd7da..f1daa6f45374c765bb33b69b9565cdb65bf4a6fc 100644 (file)
@@ -44,18 +44,18 @@ struct private_tls_aead_t {
  * Associated header data to create signature over
  */
 typedef struct __attribute__((__packed__)) {
-       u_int64_t seq;
-       u_int8_t type;
-       u_int16_t version;
-       u_int16_t length;
+       uint64_t seq;
+       uint8_t type;
+       uint16_t version;
+       uint16_t length;
 } sigheader_t;
 
 METHOD(tls_aead_t, encrypt, bool,
        private_tls_aead_t *this, tls_version_t version, tls_content_type_t type,
-       u_int64_t seq, chunk_t *data)
+       uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, encrypted, iv, plain;
-       u_int8_t icvlen;
+       uint8_t icvlen;
        sigheader_t hdr;
        iv_gen_t *gen;
 
@@ -92,10 +92,10 @@ METHOD(tls_aead_t, encrypt, bool,
 
 METHOD(tls_aead_t, decrypt, bool,
        private_tls_aead_t *this, tls_version_t version, tls_content_type_t type,
-       u_int64_t seq, chunk_t *data)
+       uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, iv;
-       u_int8_t icvlen;
+       uint8_t icvlen;
        sigheader_t hdr;
 
        iv.len = this->aead->get_iv_size(this->aead);
index 1d5ba92b58e84257db5d50cd8911492efe7983c4..8b5cda5a74057673e11853e55daad197c380d109 100644 (file)
@@ -50,7 +50,7 @@ struct tls_aead_t {
         * @return                              TRUE if successfully encrypted
         */
        bool (*encrypt)(tls_aead_t *this, tls_version_t version,
-                                       tls_content_type_t type, u_int64_t seq, chunk_t *data);
+                                       tls_content_type_t type, uint64_t seq, chunk_t *data);
 
        /**
         * Decrypt and verify a TLS record.
@@ -65,7 +65,7 @@ struct tls_aead_t {
         * @return                              TRUE if successfully decrypted
         */
        bool (*decrypt)(tls_aead_t *this, tls_version_t version,
-                                       tls_content_type_t type, u_int64_t seq, chunk_t *data);
+                                       tls_content_type_t type, uint64_t seq, chunk_t *data);
 
        /**
         * Get the authentication key size.
index 80b0db38c05c025f374e517faf09336e1b528036..201c9bcf89f5bd542490b9ab4c7afd096182649b 100644 (file)
@@ -49,18 +49,18 @@ struct private_tls_aead_t {
  * Associated header data to create signature over
  */
 typedef struct __attribute__((__packed__)) {
-       u_int64_t seq;
-       u_int8_t type;
-       u_int16_t version;
-       u_int16_t length;
+       uint64_t seq;
+       uint8_t type;
+       uint16_t version;
+       uint16_t length;
 } sigheader_t;
 
 METHOD(tls_aead_t, encrypt, bool,
        private_tls_aead_t *this, tls_version_t version, tls_content_type_t type,
-       u_int64_t seq, chunk_t *data)
+       uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, mac, padding, iv;
-       u_int8_t bs, padlen;
+       uint8_t bs, padlen;
        sigheader_t hdr;
 
        hdr.type = type;
@@ -100,10 +100,10 @@ METHOD(tls_aead_t, encrypt, bool,
 
 METHOD(tls_aead_t, decrypt, bool,
        private_tls_aead_t *this, tls_version_t version, tls_content_type_t type,
-       u_int64_t seq, chunk_t *data)
+       uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, mac, iv;
-       u_int8_t bs, padlen;
+       uint8_t bs, padlen;
        sigheader_t hdr;
        size_t i;
 
index d529ceba73c109243db8cd6823bcb97bcff6742e..8f83cb456f418792709d3eaf405b6470b1d89ba9 100644 (file)
@@ -47,18 +47,18 @@ struct private_tls_aead_t {
  * Associated header data to create signature over
  */
 typedef struct __attribute__((__packed__)) {
-       u_int64_t seq;
-       u_int8_t type;
-       u_int16_t version;
-       u_int16_t length;
+       uint64_t seq;
+       uint8_t type;
+       uint16_t version;
+       uint16_t length;
 } sigheader_t;
 
 METHOD(tls_aead_t, encrypt, bool,
        private_tls_aead_t *this, tls_version_t version,
-       tls_content_type_t type, u_int64_t seq, chunk_t *data)
+       tls_content_type_t type, uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, mac, padding;
-       u_int8_t bs, padlen;
+       uint8_t bs, padlen;
        sigheader_t hdr;
 
        hdr.type = type;
@@ -95,10 +95,10 @@ METHOD(tls_aead_t, encrypt, bool,
 
 METHOD(tls_aead_t, decrypt, bool,
        private_tls_aead_t *this, tls_version_t version,
-       tls_content_type_t type, u_int64_t seq, chunk_t *data)
+       tls_content_type_t type, uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, mac, iv;
-       u_int8_t bs, padlen;
+       uint8_t bs, padlen;
        sigheader_t hdr;
        size_t i;
 
index 595b6400022214f96a6bbbf47e71f7157ec2b2cd..cb4c106336d852431a9c2d6c012ba4d16eea21ed 100644 (file)
@@ -37,15 +37,15 @@ struct private_tls_aead_t {
  * Associated header data to create signature over
  */
 typedef struct __attribute__((__packed__)) {
-       u_int64_t seq;
-       u_int8_t type;
-       u_int16_t version;
-       u_int16_t length;
+       uint64_t seq;
+       uint8_t type;
+       uint16_t version;
+       uint16_t length;
 } sigheader_t;
 
 METHOD(tls_aead_t, encrypt, bool,
        private_tls_aead_t *this, tls_version_t version,
-       tls_content_type_t type, u_int64_t seq, chunk_t *data)
+       tls_content_type_t type, uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, mac;
        sigheader_t hdr;
@@ -67,7 +67,7 @@ METHOD(tls_aead_t, encrypt, bool,
 
 METHOD(tls_aead_t, decrypt, bool,
        private_tls_aead_t *this, tls_version_t version,
-       tls_content_type_t type, u_int64_t seq, chunk_t *data)
+       tls_content_type_t type, uint64_t seq, chunk_t *data)
 {
        chunk_t assoc, mac;
        sigheader_t hdr;
index 2cffeb8207a4e7165bb27f0aca16a403f1bca0fc..6bbd958737193d347daa025fd6cc5312f970996e 100644 (file)
@@ -1340,7 +1340,7 @@ METHOD(tls_crypto_t, set_protection, void,
 METHOD(tls_crypto_t, append_handshake, void,
        private_tls_crypto_t *this, tls_handshake_type_t type, chunk_t data)
 {
-       u_int32_t header;
+       uint32_t header;
 
        /* reconstruct handshake header */
        header = htonl(data.len | (type << 24));
@@ -1407,7 +1407,7 @@ METHOD(tls_crypto_t, sign, bool,
        {
                signature_scheme_t scheme;
                bio_reader_t *reader;
-               u_int8_t hash, alg;
+               uint8_t hash, alg;
                chunk_t sig;
                bool done = FALSE;
 
@@ -1487,7 +1487,7 @@ METHOD(tls_crypto_t, verify, bool,
        if (this->tls->get_version(this->tls) >= TLS_1_2)
        {
                signature_scheme_t scheme = SIGN_UNKNOWN;
-               u_int8_t hash, alg;
+               uint8_t hash, alg;
                chunk_t sig;
 
                if (!reader->read_uint8(reader, &hash) ||
index a97ca1eaaa47347e55465cdf151d0904e9697390..3607aa3cb0b35a5e1dc4857f0dd1ae53b9fe3310 100644 (file)
@@ -127,7 +127,7 @@ static bool send_close_notify(private_tls_fragmentation_t *this)
 static status_t process_alert(private_tls_fragmentation_t *this,
                                                          bio_reader_t *reader)
 {
-       u_int8_t level, description;
+       uint8_t level, description;
 
        if (!reader->read_uint8(reader, &level) ||
                !reader->read_uint8(reader, &description))
@@ -147,8 +147,8 @@ static status_t process_handshake(private_tls_fragmentation_t *this,
        while (reader->remaining(reader))
        {
                bio_reader_t *msg;
-               u_int8_t type;
-               u_int32_t len;
+               uint8_t type;
+               uint32_t len;
                status_t status;
                chunk_t data;
 
index 8087e2e2de48501a90f5c4359145c2e9d2f593db..2ba6dd2a6a35c220af5508c13ea7d19b25af3b67 100644 (file)
@@ -141,8 +141,8 @@ struct private_tls_peer_t {
 static status_t process_server_hello(private_tls_peer_t *this,
                                                                         bio_reader_t *reader)
 {
-       u_int8_t compression;
-       u_int16_t version, cipher;
+       uint8_t compression;
+       uint16_t version, cipher;
        chunk_t random, session, ext = chunk_empty;
        tls_cipher_suite_t suite = 0;
 
@@ -434,8 +434,8 @@ static status_t process_ec_key_exchange(private_tls_peer_t *this,
 {
        diffie_hellman_group_t group;
        public_key_t *public;
-       u_int8_t type;
-       u_int16_t curve;
+       uint8_t type;
+       uint16_t curve;
        chunk_t pub, chunk;
 
        chunk = reader->peek(reader);
@@ -833,7 +833,7 @@ static private_key_t *find_private_key(private_tls_peer_t *this)
        private_key_t *key = NULL;
        bio_reader_t *reader;
        key_type_t type;
-       u_int8_t cert;
+       uint8_t cert;
 
        if (!this->peer)
        {
index e73fedc5d71a7c3e61665a7afac11902a6b615ea..cea3eca149d68344812e3c2422cfdbafad1c7ae7 100644 (file)
@@ -47,12 +47,12 @@ struct private_tls_protection_t {
        /**
         * Sequence number of incoming records
         */
-       u_int64_t seq_in;
+       uint64_t seq_in;
 
        /**
         * Sequence number for outgoing records
         */
-       u_int64_t seq_out;
+       uint64_t seq_out;
 
        /**
         * AEAD transform for inbound traffic
index cfbe0203791a9c961dd6544656cc57fc71f5c398..422211afae24ac64b66be6f6686ca0f4098504df 100644 (file)
@@ -213,7 +213,7 @@ static bool select_suite_and_key(private_tls_server_t *this,
 static status_t process_client_hello(private_tls_server_t *this,
                                                                         bio_reader_t *reader)
 {
-       u_int16_t version, extension;
+       uint16_t version, extension;
        chunk_t random, session, ciphers, compression, ext = chunk_empty;
        bio_reader_t *extensions;
        tls_cipher_suite_t *suites;
@@ -304,12 +304,12 @@ static status_t process_client_hello(private_tls_server_t *this,
        }
        else
        {
-               count = ciphers.len / sizeof(u_int16_t);
+               count = ciphers.len / sizeof(uint16_t);
                suites = alloca(count * sizeof(tls_cipher_suite_t));
                DBG2(DBG_TLS, "received %d TLS cipher suites:", count);
                for (i = 0; i < count; i++)
                {
-                       suites[i] = untoh16(&ciphers.ptr[i * sizeof(u_int16_t)]);
+                       suites[i] = untoh16(&ciphers.ptr[i * sizeof(uint16_t)]);
                        DBG2(DBG_TLS, "  %N", tls_cipher_suite_names, suites[i]);
                }
                if (!select_suite_and_key(this, suites, count))
@@ -831,7 +831,7 @@ static tls_named_curve_t ec_group_to_curve(private_tls_server_t *this,
 bool peer_supports_curve(private_tls_server_t *this, tls_named_curve_t curve)
 {
        bio_reader_t *reader;
-       u_int16_t current;
+       uint16_t current;
 
        if (!this->curves_received)
        {       /* none received, assume yes */
index 67c33ee63880c4c58e29fa81c6db6f3d3cc1fa4a..5ac2c85a5ac3ba53faee6f288a6b2e9204b1d3a2 100644 (file)
@@ -87,7 +87,7 @@ struct tnccs_connection_entry_t {
        /**
         * Maximum size of a PA-TNC message
         */
-       u_int32_t max_msg_len;
+       uint32_t max_msg_len;
 
        /**
         * collection of IMV recommendations
@@ -199,7 +199,7 @@ METHOD(tnccs_manager_t, create_instance, tnccs_t*,
 METHOD(tnccs_manager_t, create_connection, TNC_ConnectionID,
        private_tnc_tnccs_manager_t *this, tnccs_type_t type, tnccs_t *tnccs,
        tnccs_send_message_t send_message, bool* request_handshake_retry,
-       u_int32_t max_msg_len, recommendations_t **recs)
+       uint32_t max_msg_len, recommendations_t **recs)
 {
        tnccs_connection_entry_t *entry;
 
@@ -414,14 +414,14 @@ static TNC_Result bool_attribute(TNC_UInt32 buffer_len,
 }
 
 /**
- * Write the value of an u_int32_t attribute into the buffer
+ * Write the value of an uint32_t attribute into the buffer
  */
 static TNC_Result uint_attribute(TNC_UInt32 buffer_len,
                                                                 TNC_BufferReference buffer,
                                                                 TNC_UInt32 *value_len,
-                                                                u_int32_t value)
+                                                                uint32_t value)
 {
-       *value_len = sizeof(u_int32_t);
+       *value_len = sizeof(uint32_t);
 
        if (buffer && buffer_len >= *value_len)
        {
@@ -465,7 +465,7 @@ static TNC_Result identity_attribute(TNC_UInt32 buffer_len,
 {
        bio_writer_t *writer;
        enumerator_t *enumerator;
-       u_int32_t count;
+       uint32_t count;
        chunk_t value;
        tncif_identity_t *tnc_id;
        TNC_Result result = TNC_RESULT_INVALID_PARAMETER;
@@ -721,7 +721,7 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
                        host_t *peer_ip;
                        tnccs_t *tnccs;
                        tncif_identity_t *tnc_id;
-                       u_int32_t id_type, subject_type;
+                       uint32_t id_type, subject_type;
                        chunk_t id_value;
                        char *id_str;
                        TNC_Result result;
index 0918a2badca4e5b3cd23b6b23a36538badd9c242..5c34d57482855b0eca67d0e6a47bf910d7d1c085 100644 (file)
@@ -79,7 +79,7 @@ struct private_tnccs_11_t {
        /**
         * Type of TNC client authentication
         */
-       u_int32_t auth_type;
+       uint32_t auth_type;
 
        /**
         * Connection ID assigned to this TNCCS connection
@@ -205,7 +205,7 @@ static void handle_message(private_tnccs_11_t *this, tnccs_msg_t *msg)
                        imc_imv_msg_t *imc_imv_msg;
                        TNC_MessageType msg_type;
                        chunk_t msg_body;
-                       u_int32_t msg_vid, msg_subtype;
+                       uint32_t msg_vid, msg_subtype;
                        enum_name_t *pa_subtype_names;
 
                        imc_imv_msg = (imc_imv_msg_t*)msg;
@@ -622,20 +622,20 @@ METHOD(tnccs_t, set_transport, void,
        this->transport = transport;
 }
 
-METHOD(tnccs_t, get_auth_type, u_int32_t,
+METHOD(tnccs_t, get_auth_type, uint32_t,
        private_tnccs_11_t *this)
 {
        return this->auth_type;
 }
 
 METHOD(tnccs_t, set_auth_type, void,
-       private_tnccs_11_t *this, u_int32_t auth_type)
+       private_tnccs_11_t *this, uint32_t auth_type)
 {
        this->auth_type = auth_type;
 }
 
 METHOD(tnccs_t, get_pdp_server, chunk_t,
-       private_tnccs_11_t *this, u_int16_t *port)
+       private_tnccs_11_t *this, uint16_t *port)
 {
        *port = 0;
 
index b239c20dc3e5d3e5440ad0c11c3c0047e925c741..2663e3985d76fc74e0f7a2ff35e25efafce9e7a4 100644 (file)
@@ -122,7 +122,7 @@ struct private_pb_tnc_batch_t {
        /**
         * Offset into encoding (used for error reporting)
         */
-       u_int32_t offset;
+       uint32_t offset;
 };
 
 METHOD(pb_tnc_batch_t, get_type, pb_tnc_batch_type_t,
@@ -179,8 +179,8 @@ METHOD(pb_tnc_batch_t, add_msg, bool,
 METHOD(pb_tnc_batch_t, build, void,
        private_pb_tnc_batch_t *this)
 {
-       u_int8_t version;
-       u_int32_t msg_len;
+       uint8_t version;
+       uint32_t msg_len;
        chunk_t msg_value;
        enumerator_t *enumerator;
        pen_type_t msg_type;
@@ -205,7 +205,7 @@ METHOD(pb_tnc_batch_t, build, void,
        enumerator = this->messages->create_enumerator(this->messages);
        while (enumerator->enumerate(enumerator, &msg))
        {
-               u_int8_t flags = PB_TNC_FLAG_NONE;
+               uint8_t flags = PB_TNC_FLAG_NONE;
 
                /* build PB-TNC message */
                msg_value = msg->get_encoding(msg);
@@ -247,8 +247,8 @@ METHOD(pb_tnc_batch_t, process_header, status_t,
        bio_reader_t *reader;
        pb_tnc_msg_t *msg;
        pb_error_msg_t *err_msg;
-       u_int8_t version, flags, reserved, type;
-       u_int32_t batch_len;
+       uint8_t version, flags, reserved, type;
+       uint32_t batch_len;
 
        if (this->encoding.len < PB_TNC_BATCH_HEADER_SIZE)
        {
@@ -324,8 +324,8 @@ static status_t process_tnc_msg(private_pb_tnc_batch_t *this)
        bio_reader_t *reader;
        pb_tnc_msg_t *pb_tnc_msg, *msg;
        pb_tnc_msg_info_t *msg_infos;
-       u_int8_t flags;
-       u_int32_t vendor_id, msg_type, msg_len, offset;
+       uint8_t flags;
+       uint32_t vendor_id, msg_type, msg_len, offset;
        chunk_t data, msg_value;
        bool noskip_flag;
        enum_name_t *msg_type_names;
index 5c4b5ae00fd8317b3e6dc8266dae23761954d156..f306540e3a045afeb481b2e9ae9d164f4c81523b 100644 (file)
@@ -57,7 +57,7 @@ struct private_pb_access_recommendation_msg_t {
        /**
         * Access recommendation code
         */
-       u_int16_t recommendation;
+       uint16_t recommendation;
 
        /**
         * Encoded message
@@ -95,10 +95,10 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_access_recommendation_msg_t *this, u_int32_t *offset)
+       private_pb_access_recommendation_msg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int16_t reserved;
+       uint16_t reserved;
 
        reader = bio_reader_create(this->encoding);
        reader->read_uint16(reader, &reserved);
@@ -124,7 +124,7 @@ METHOD(pb_tnc_msg_t, destroy, void,
        free(this);
 }
 
-METHOD(pb_access_recommendation_msg_t, get_access_recommendation, u_int16_t,
+METHOD(pb_access_recommendation_msg_t, get_access_recommendation, uint16_t,
        private_pb_access_recommendation_msg_t *this)
 {
        return this->recommendation;
@@ -158,7 +158,7 @@ pb_tnc_msg_t *pb_access_recommendation_msg_create_from_data(chunk_t data)
 /**
  * See header
  */
-pb_tnc_msg_t *pb_access_recommendation_msg_create(u_int16_t recommendation)
+pb_tnc_msg_t *pb_access_recommendation_msg_create(uint16_t recommendation)
 {
        private_pb_access_recommendation_msg_t *this;
 
index d0dc6358b2392e7d79d257d42eef589ec09aab62..84b8d1a94e1439dc45b63b0ce40b55669119661a 100644 (file)
@@ -56,7 +56,7 @@ struct pb_access_recommendation_msg_t {
         *
         * @return                      PB Access Recommendation
         */
-       u_int16_t (*get_access_recommendation)(pb_access_recommendation_msg_t *this);
+       uint16_t (*get_access_recommendation)(pb_access_recommendation_msg_t *this);
 };
 
 /**
@@ -64,7 +64,7 @@ struct pb_access_recommendation_msg_t {
  *
  * @param recommendation       Access Recommendation code
  */
-pb_tnc_msg_t* pb_access_recommendation_msg_create(u_int16_t recommendation);
+pb_tnc_msg_t* pb_access_recommendation_msg_create(uint16_t recommendation);
 
 /**
  * Create an unprocessed PB-Access-Recommendation message from raw data
index e234935691bde99028f8176c65256a47f89a148c..a4cdb7e6aaf6df5d410fd6a064581b0ab7099eee 100644 (file)
@@ -53,7 +53,7 @@ struct private_pb_assessment_result_msg_t {
        /**
         * Assessment result code
         */
-       u_int32_t assessment_result;
+       uint32_t assessment_result;
 
        /**
         * Encoded message
@@ -90,7 +90,7 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_assessment_result_msg_t *this, u_int32_t *offset)
+       private_pb_assessment_result_msg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
@@ -117,7 +117,7 @@ METHOD(pb_tnc_msg_t, destroy, void,
        free(this);
 }
 
-METHOD(pb_assessment_result_msg_t, get_assessment_result, u_int32_t,
+METHOD(pb_assessment_result_msg_t, get_assessment_result, uint32_t,
        private_pb_assessment_result_msg_t *this)
 {
        return this->assessment_result;
@@ -151,7 +151,7 @@ pb_tnc_msg_t *pb_assessment_result_msg_create_from_data(chunk_t data)
 /**
  * See header
  */
-pb_tnc_msg_t *pb_assessment_result_msg_create(u_int32_t assessment_result)
+pb_tnc_msg_t *pb_assessment_result_msg_create(uint32_t assessment_result)
 {
        private_pb_assessment_result_msg_t *this;
 
index 11cfdbef234c5fa70fa7961a6a39a69ac608d17f..25f9f9faba11bc9f13f2627da4b28ea1bab7dd6a 100644 (file)
@@ -40,7 +40,7 @@ struct pb_assessment_result_msg_t {
         *
         * @return                      PB Assessment result
         */
-       u_int32_t (*get_assessment_result)(pb_assessment_result_msg_t *this);
+       uint32_t (*get_assessment_result)(pb_assessment_result_msg_t *this);
 };
 
 /**
@@ -48,7 +48,7 @@ struct pb_assessment_result_msg_t {
  *
  * @param assessment_result            Assessment result code
  */
-pb_tnc_msg_t* pb_assessment_result_msg_create(u_int32_t assessment_result);
+pb_tnc_msg_t* pb_assessment_result_msg_create(uint32_t assessment_result);
 
 /**
  * Create an unprocessed PB-Assessment-Result message from raw data
index d9910f6604e58056d2a1e441e86124517fdabcba..05621b7cb0ffa3383a9bc4e33a1edb203edd5602 100644 (file)
@@ -75,22 +75,22 @@ struct private_pb_error_msg_t {
        /**
         * PB Error Code Vendor ID
         */
-       u_int32_t vendor_id;
+       uint32_t vendor_id;
 
        /**
         * PB Error Code
         */
-       u_int16_t error_code;
+       uint16_t error_code;
 
        /**
         * PB Error Offset
         */
-       u_int32_t error_offset;
+       uint32_t error_offset;
 
        /**
         * Bad PB-TNC version received
         */
-       u_int8_t bad_version;
+       uint8_t bad_version;
 
        /**
         * Encoded message
@@ -153,10 +153,10 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_error_msg_t *this, u_int32_t *offset)
+       private_pb_error_msg_t *this, uint32_t *offset)
 {
-       u_int8_t flags, max_version, min_version;
-       u_int16_t reserved;
+       uint8_t flags, max_version, min_version;
+       uint16_t reserved;
        bio_reader_t *reader;
 
        if (this->encoding.len < ERROR_HEADER_SIZE)
@@ -216,32 +216,32 @@ METHOD(pb_error_msg_t, get_fatal_flag, bool,
        return this->fatal;
 }
 
-METHOD(pb_error_msg_t, get_vendor_id, u_int32_t,
+METHOD(pb_error_msg_t, get_vendor_id, uint32_t,
        private_pb_error_msg_t *this)
 {
        return this->vendor_id;
 }
 
-METHOD(pb_error_msg_t, get_error_code, u_int16_t,
+METHOD(pb_error_msg_t, get_error_code, uint16_t,
        private_pb_error_msg_t *this)
 {
        return this->error_code;
 }
 
-METHOD(pb_error_msg_t, get_offset, u_int32_t,
+METHOD(pb_error_msg_t, get_offset, uint32_t,
        private_pb_error_msg_t *this)
 {
        return this->error_offset;
 }
 
-METHOD(pb_error_msg_t, get_bad_version, u_int8_t,
+METHOD(pb_error_msg_t, get_bad_version, uint8_t,
        private_pb_error_msg_t *this)
 {
        return this->bad_version;
 }
 
 METHOD(pb_error_msg_t, set_bad_version, void,
-       private_pb_error_msg_t *this, u_int8_t version)
+       private_pb_error_msg_t *this, uint8_t version)
 {
        this->bad_version = version;
 }
@@ -249,7 +249,7 @@ METHOD(pb_error_msg_t, set_bad_version, void,
 /**
  * See header
  */
-pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
+pb_tnc_msg_t* pb_error_msg_create(bool fatal, uint32_t vendor_id,
                                                                  pb_tnc_error_code_t error_code)
 {
        private_pb_error_msg_t *this;
@@ -284,9 +284,9 @@ pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
 /**
  * See header
  */
-pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, u_int32_t vendor_id,
+pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, uint32_t vendor_id,
                                                                                          pb_tnc_error_code_t error_code,
-                                                                                         u_int32_t error_offset)
+                                                                                         uint32_t error_offset)
 {
        private_pb_error_msg_t *this;
 
index 9c0ad82a66a61bb2f88a6edbc2760204da6ca4f4..34fc2088656cb89a988e72504b921009187663b8 100644 (file)
@@ -64,35 +64,35 @@ struct pb_error_msg_t {
         *
         * @return                              PB Error Code Vendor ID
         */
-       u_int32_t (*get_vendor_id)(pb_error_msg_t *this);
+       uint32_t (*get_vendor_id)(pb_error_msg_t *this);
 
        /**
         * Get PB Error Code
         *
         * @return                              PB Error Code
         */
-       u_int16_t (*get_error_code)(pb_error_msg_t *this);
+       uint16_t (*get_error_code)(pb_error_msg_t *this);
 
        /**
         * Get the PB Error Offset
         *
         * @return                              PB Error Offset
         */
-       u_int32_t (*get_offset)(pb_error_msg_t *this);
+       uint32_t (*get_offset)(pb_error_msg_t *this);
 
        /**
         * Get the PB Bad Version
         *
         * @return                              PB Bad Version
         */
-       u_int8_t (*get_bad_version)(pb_error_msg_t *this);
+       uint8_t (*get_bad_version)(pb_error_msg_t *this);
 
        /**
         * Set the PB Bad Version
         *
         * @param version               PB Bad Version
         */
-       void (*set_bad_version)(pb_error_msg_t *this, u_int8_t version);
+       void (*set_bad_version)(pb_error_msg_t *this, uint8_t version);
 };
 
 /**
@@ -102,7 +102,7 @@ struct pb_error_msg_t {
  * @param vendor_id                    Error Code Vendor ID
  * @param error_code           Error Code
  */
-pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
+pb_tnc_msg_t* pb_error_msg_create(bool fatal, uint32_t vendor_id,
                                                                  pb_tnc_error_code_t error_code);
        
 /**
@@ -113,9 +113,9 @@ pb_tnc_msg_t* pb_error_msg_create(bool fatal, u_int32_t vendor_id,
  * @param error_code           Error Code
  * @param error_offset         Error Offset
  */
-pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, u_int32_t vendor_id,
+pb_tnc_msg_t* pb_error_msg_create_with_offset(bool fatal, uint32_t vendor_id,
                                                                                          pb_tnc_error_code_t error_code,
-                                                                                         u_int32_t error_offset);
+                                                                                         uint32_t error_offset);
 
 /**
  * Create an unprocessed PB-Error message from raw data
index c6290887ce2e81a4de99c2cd7174a2447d3f2005..da834ab678c9bb94fc266cc7bfd6eda86e0fdce4 100644 (file)
@@ -57,7 +57,7 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_experimental_msg_t *this, u_int32_t *offset)
+       private_pb_experimental_msg_t *this, uint32_t *offset)
 {
        return SUCCESS;
 }
index f14f289806ed6dfe547806a89f49a58d9705d656..1a288abb5ca8efdcdf8cbac638134de86b129c70 100644 (file)
@@ -85,7 +85,7 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_language_preference_msg_t *this, u_int32_t *offset)
+       private_pb_language_preference_msg_t *this, uint32_t *offset)
 {
        chunk_t lang;
 
index 263af3224603f949140a472126dc4fc529e12de8..2c7aa89650d5079908b1464ec4f167ff3e9eb3c4 100644 (file)
@@ -75,12 +75,12 @@ struct private_pb_pa_msg_t {
        /**
         * Posture Validator Identifier
         */
-       u_int16_t collector_id;
+       uint16_t collector_id;
 
        /**
         * Posture Validator Identifier
         */
-       u_int16_t validator_id;
+       uint16_t validator_id;
 
        /**
         * PA Message Body
@@ -131,9 +131,9 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_pa_msg_t *this, u_int32_t *offset)
+       private_pb_pa_msg_t *this, uint32_t *offset)
 {
-       u_int8_t flags;
+       uint8_t flags;
        size_t msg_body_len;
        bio_reader_t *reader;
 
@@ -186,13 +186,13 @@ METHOD(pb_pa_msg_t, get_subtype, pen_type_t,
        return this->subtype;
 }
 
-METHOD(pb_pa_msg_t, get_collector_id, u_int16_t,
+METHOD(pb_pa_msg_t, get_collector_id, uint16_t,
        private_pb_pa_msg_t *this)
 {
        return this->collector_id;
 }
 
-METHOD(pb_pa_msg_t, get_validator_id, u_int16_t,
+METHOD(pb_pa_msg_t, get_validator_id, uint16_t,
        private_pb_pa_msg_t *this)
 {
        return this->validator_id;
@@ -241,8 +241,8 @@ pb_tnc_msg_t *pb_pa_msg_create_from_data(chunk_t data)
 /**
  * See header
  */
-pb_tnc_msg_t *pb_pa_msg_create(u_int32_t vendor_id, u_int32_t subtype,
-                                                          u_int16_t collector_id, u_int16_t validator_id,
+pb_tnc_msg_t *pb_pa_msg_create(uint32_t vendor_id, uint32_t subtype,
+                                                          uint16_t collector_id, uint16_t validator_id,
                                                           bool excl, chunk_t msg_body)
 {
        private_pb_pa_msg_t *this;
index f3b6b1518bed3d22d9edcc1a95cf33f1fe541ce5..f73f1162760ff388b685e5551f01c1374ed0f0f0 100644 (file)
@@ -51,14 +51,14 @@ struct pb_pa_msg_t {
         *
         * @return                              Posture Collector ID
         */
-       u_int16_t (*get_collector_id)(pb_pa_msg_t *this);
+       uint16_t (*get_collector_id)(pb_pa_msg_t *this);
 
        /**
         * Get Posture Validator ID
         *
         * @return                              Posture Validator ID
         */
-       u_int16_t (*get_validator_id)(pb_pa_msg_t *this);
+       uint16_t (*get_validator_id)(pb_pa_msg_t *this);
 
        /**
         * Get the PA Message Body
@@ -86,8 +86,8 @@ struct pb_pa_msg_t {
  * @param excl                         Exclusive Flag
  * @param msg_body                     PA Message Body
  */
-pb_tnc_msg_t *pb_pa_msg_create(u_int32_t vendor_id, u_int32_t subtype,
-                                                          u_int16_t collector_id, u_int16_t validator_id,
+pb_tnc_msg_t *pb_pa_msg_create(uint32_t vendor_id, uint32_t subtype,
+                                                          uint16_t collector_id, uint16_t validator_id,
                                                           bool excl, chunk_t msg_body);
 
 /**
index cafc4ec54b358872b76bf29d35604b87e2088216..25291d581f764f0890ccc5abe2d0cf46d4807732 100644 (file)
@@ -97,7 +97,7 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_reason_string_msg_t *this, u_int32_t *offset)
+       private_pb_reason_string_msg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
index 8dc5906573b1042de1492dacfa1027c5c8c252eb..9eae707a57493d757af761c53e01dbd8d93df389 100644 (file)
@@ -123,10 +123,10 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_remediation_parameters_msg_t *this, u_int32_t *offset)
+       private_pb_remediation_parameters_msg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t reserved;
+       uint8_t reserved;
        status_t status = SUCCESS;
        u_char *pos;
 
index 1f35cae6b2a81f149aa8a01f030b121a172b18b2..c31752019f9be825f02f8c279573bfa056d3f87d 100644 (file)
@@ -95,7 +95,7 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_mutual_capability_msg_t *this, u_int32_t *offset)
+       private_pb_mutual_capability_msg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
 
index c95222e3a996a0c09c85147141b9a13684accee3..4e8be79f28c4183e2e6001ba8e52e19e74a66213 100644 (file)
@@ -57,7 +57,7 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_noskip_test_msg_t *this, u_int32_t *offset)
+       private_pb_noskip_test_msg_t *this, uint32_t *offset)
 {
        return SUCCESS;
 }
index 395284366cbe8a5b2dd92c3095f9475301210ef3..cfa92aa74e91e658d4e95676b60ae8c628b84527 100644 (file)
@@ -82,7 +82,7 @@ extern enum_name_t *pb_tnc_ita_msg_type_names;
  * Information entry describing a PB-TNC Message Type
  */
 struct pb_tnc_msg_info_t {
-       u_int32_t min_size;
+       uint32_t min_size;
        bool exact_size;
        bool in_result_batch;
        signed char has_noskip_flag;
@@ -138,7 +138,7 @@ struct pb_tnc_msg_t {
         * @param                                       relative offset where an error occurred
         * @return                                      return processing status
         */
-       status_t (*process)(pb_tnc_msg_t *this, u_int32_t *offset);
+       status_t (*process)(pb_tnc_msg_t *this, uint32_t *offset);
 
        /**
         * Get a new reference to the message.
index 1c8538e6bed8d0f45a9af86bfc69fbe42d59a23c..7c518e8d5cf4715b94ec95744198808cd566b337 100644 (file)
@@ -117,12 +117,12 @@ struct private_pb_pdp_referral_msg_t {
        /**
         * PT protocol the PDP is using
         */
-       u_int8_t protocol;
+       uint8_t protocol;
 
        /**
         * PT port the PDP is using
         */
-       u_int16_t port;
+       uint16_t port;
 
        /**
         * Encoded message
@@ -163,10 +163,10 @@ METHOD(pb_tnc_msg_t, build, void,
 }
 
 METHOD(pb_tnc_msg_t, process, status_t,
-       private_pb_pdp_referral_msg_t *this, u_int32_t *offset)
+       private_pb_pdp_referral_msg_t *this, uint32_t *offset)
 {
        bio_reader_t *reader;
-       u_int8_t reserved;
+       uint8_t reserved;
 
        *offset = 0;
 
@@ -223,7 +223,7 @@ METHOD(pb_pdp_referral_msg_t, get_identifier, chunk_t,
 }
 
 METHOD(pb_pdp_referral_msg_t, get_fqdn, chunk_t,
-       private_pb_pdp_referral_msg_t *this, u_int8_t *protocol, u_int16_t *port)
+       private_pb_pdp_referral_msg_t *this, uint8_t *protocol, uint16_t *port)
 {
        if (protocol)
        {
@@ -267,7 +267,7 @@ pb_tnc_msg_t* pb_pdp_referral_msg_create(pen_type_t identifier_type,
 /**
  * See header
  */
-pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, u_int16_t port)
+pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, uint16_t port)
 {
        pb_tnc_msg_t *msg;
        bio_writer_t *writer;
index b225f3381557dde0daa81ee273a2bdb9661b7601..0923c8ba4c11350a29717c4403cceb930262a43e 100644 (file)
@@ -74,8 +74,8 @@ struct pb_pdp_referral_msg_t {
         * @param port                  PT port the PDP is listening on
         * @return                              Fully Qualified Domain Name of PDP
         */
-       chunk_t (*get_fqdn)(pb_pdp_referral_msg_t *this, u_int8_t *protocol,
-                                               u_int16_t *port);
+       chunk_t (*get_fqdn)(pb_pdp_referral_msg_t *this, uint8_t *protocol,
+                                               uint16_t *port);
 
 };
 
@@ -94,7 +94,7 @@ pb_tnc_msg_t* pb_pdp_referral_msg_create(pen_type_t identifier_type,
  * @param fqdn                         Fully Qualified Domain Name of PDP
  * @param port                         PT-TLS port the PDP is listening on 
  */
-pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, u_int16_t port);
+pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, uint16_t port);
 
 /**
  * Create an unprocessed PB-PDP-Referral message from raw data
index 35d297842e24e74c0dfae4a19c3a9ec7bbd5fb1e..041faa3891f8779c1a7e0c039a115f6fd4fe2061 100644 (file)
@@ -77,7 +77,7 @@ struct private_tnccs_20_t {
        /**
         * Type of TNC client authentication
         */
-       u_int32_t auth_type;
+       uint32_t auth_type;
 
        /**
         * Mutual PB-TNC protocol enabled
@@ -423,20 +423,20 @@ METHOD(tnccs_t, set_transport, void,
        this->transport = transport;
 }
 
-METHOD(tnccs_t, get_auth_type, u_int32_t,
+METHOD(tnccs_t, get_auth_type, uint32_t,
        private_tnccs_20_t *this)
 {
        return this->auth_type;
 }
 
 METHOD(tnccs_t, set_auth_type, void,
-       private_tnccs_20_t *this, u_int32_t auth_type)
+       private_tnccs_20_t *this, uint32_t auth_type)
 {
        this->auth_type = auth_type;
 }
 
 METHOD(tnccs_t, get_pdp_server, chunk_t,
-       private_tnccs_20_t *this, u_int16_t *port)
+       private_tnccs_20_t *this, uint16_t *port)
 {
        if (this->tnc_client)
        {
index 4ba8221d08fdb707ed5942aca14d1bb6bee60226..04e404225e4bd83a68f441fae74e89b0ce5e9ddb 100644 (file)
@@ -104,7 +104,7 @@ struct private_tnccs_20_client_t {
        /**
         * PDP server port
         */
-       u_int16_t pdp_port;
+       uint16_t pdp_port;
 
        /**
         * Mutual PB-TNC protocol enabled
@@ -124,8 +124,8 @@ struct private_tnccs_20_client_t {
 void tnccs_20_handle_ietf_error_msg(pb_tnc_msg_t *msg, bool *fatal_error)
 {
        pb_error_msg_t *err_msg;
-       u_int32_t vendor_id;
-       u_int16_t error_code;
+       uint32_t vendor_id;
+       uint16_t error_code;
        bool fatal;
 
        err_msg = (pb_error_msg_t*)msg;
@@ -238,7 +238,7 @@ static void handle_ietf_message(private_tnccs_20_client_t *this, pb_tnc_msg_t *m
                {
                        pb_pa_msg_t *pa_msg;
                        pen_type_t msg_subtype;
-                       u_int16_t imc_id, imv_id;
+                       uint16_t imc_id, imv_id;
                        chunk_t msg_body;
                        bool excl;
                        enum_name_t *pa_subtype_names;
@@ -274,7 +274,7 @@ static void handle_ietf_message(private_tnccs_20_client_t *this, pb_tnc_msg_t *m
                case PB_MSG_ASSESSMENT_RESULT:
                {
                        pb_assessment_result_msg_t *assess_msg;
-                       u_int32_t result;
+                       uint32_t result;
 
                        assess_msg = (pb_assessment_result_msg_t*)msg;
                        result = assess_msg->get_assessment_result(assess_msg);
@@ -375,7 +375,7 @@ static void handle_tcg_message(private_tnccs_20_client_t *this, pb_tnc_msg_t *ms
                {
                        pb_pdp_referral_msg_t *pdp_msg;
                        pen_type_t pdp_id_type;
-                       u_int8_t pdp_protocol;
+                       uint8_t pdp_protocol;
 
                        pdp_msg = (pb_pdp_referral_msg_t*)msg;
                        pdp_id_type = pdp_msg->get_identifier_type(pdp_msg);
@@ -765,7 +765,7 @@ METHOD(tnccs_20_handler_t, destroy, void,
 }
 
 METHOD(tnccs_20_client_t, get_pdp_server, chunk_t,
-       private_tnccs_20_client_t *this, u_int16_t *port)
+       private_tnccs_20_client_t *this, uint16_t *port)
 {
        *port = this->pdp_port;
 
index 7a5f33ebcbed2d896651550edbb9ebe19b67ab40..3b34638a899593169eb7cf39482f9ac18d822a7e 100644 (file)
@@ -45,7 +45,7 @@ struct tnccs_20_client_t {
         * @param port                  PT-TLS port of the PDP server
         * @return                              FQDN of PDP server
         */
-       chunk_t (*get_pdp_server)(tnccs_20_client_t *this, u_int16_t *port);
+       chunk_t (*get_pdp_server)(tnccs_20_client_t *this, uint16_t *port);
 
 };
 
index 038fc178b424be67f072983cb78cff7ef72a8e1e..86ae1c099696d263320347dd87dc3f1f13fd11ad 100644 (file)
@@ -166,7 +166,7 @@ static void handle_ietf_message(private_tnccs_20_server_t *this, pb_tnc_msg_t *m
                {
                        pb_pa_msg_t *pa_msg;
                        pen_type_t msg_subtype;
-                       u_int16_t imc_id, imv_id;
+                       uint16_t imc_id, imv_id;
                        chunk_t msg_body;
                        bool excl;
                        enum_name_t *pa_subtype_names;
@@ -531,14 +531,14 @@ METHOD(tnccs_20_handler_t, begin_handshake, void,
 {
        pb_tnc_msg_t *msg;
        identification_t *pdp_server;
-       u_int16_t *pdp_port;
+       uint16_t *pdp_port;
 
        tnc->imvs->notify_connection_change(tnc->imvs, this->connection_id,
                                                                                TNC_CONNECTION_STATE_HANDSHAKE);
 
        /* Send a PB-TNC TCG PDP Referral message if PDP is known */
        pdp_server = (identification_t*)lib->get(lib, "pt-tls-server");
-       pdp_port = (u_int16_t*)lib->get(lib, "pt-tls-port");
+       pdp_port = (uint16_t*)lib->get(lib, "pt-tls-port");
 
        if (this->eap_transport && pdp_server && pdp_port)
        {
index 44b804fb20297ae868a31ec399f29583200ce66c..c366e77abe3a2936aca56b8ed395c5a73118b906 100644 (file)
@@ -64,7 +64,7 @@ struct private_tnccs_dynamic_t {
        /**
         * Type of TNC client authentication
         */
-       u_int32_t auth_type;
+       uint32_t auth_type;
 
        /**
         * Callback function to communicate recommendation (TNC Server only)
@@ -223,20 +223,20 @@ METHOD(tnccs_t, set_transport, void,
        this->transport = transport;
 }
 
-METHOD(tnccs_t, get_auth_type, u_int32_t,
+METHOD(tnccs_t, get_auth_type, uint32_t,
        private_tnccs_dynamic_t *this)
 {
        return this->auth_type;
 }
 
 METHOD(tnccs_t, set_auth_type, void,
-       private_tnccs_dynamic_t *this, u_int32_t auth_type)
+       private_tnccs_dynamic_t *this, uint32_t auth_type)
 {
        this->auth_type = auth_type;
 }
 
 METHOD(tnccs_t, get_pdp_server, chunk_t,
-       private_tnccs_dynamic_t *this, u_int16_t *port)
+       private_tnccs_dynamic_t *this, uint16_t *port)
 {
        tnccs_t *tnccs = (tnccs_t*)this->tls;
 
index 8ff295bcc8bc6772a34cccd48bccfbfdbd3e7c3f..d367a15a739b21cfdabe5404ecd8efc954a4aa35 100644 (file)
@@ -119,14 +119,14 @@ struct tnccs_t {
         *
         * @return                              TNC Client authentication type
         */
-       u_int32_t (*get_auth_type)(tnccs_t *this);
+       uint32_t (*get_auth_type)(tnccs_t *this);
 
        /**
         * Set type of TNC Client authentication
         *
         * @param auth_type             TNC Client authentication type
         */
-       void (*set_auth_type)(tnccs_t *this, u_int32_t auth_type);
+       void (*set_auth_type)(tnccs_t *this, uint32_t auth_type);
 
        /**
         * Get PDP server name and port number
@@ -134,7 +134,7 @@ struct tnccs_t {
         * @param port          PDP port number
         * @return                      PDP server name
         */
-       chunk_t (*get_pdp_server)(tnccs_t *this, u_int16_t *port);
+       chunk_t (*get_pdp_server)(tnccs_t *this, uint16_t *port);
 
        /**
         * Get a new reference to the TNCCS object.
index b5c85f3c0a9bdd52ef993956a4f284f0edb340cd..bd1573f7b4e5b61a12df5f7569ce67886a0653f4 100644 (file)
@@ -87,7 +87,7 @@ struct tnccs_manager_t {
                                                                                  tnccs_type_t type, tnccs_t *tnccs,
                                                                                  tnccs_send_message_t send_message,
                                                                                  bool *request_handshake_retry,
-                                                                                 u_int32_t max_msg_len,
+                                                                                 uint32_t max_msg_len,
                                                                                  recommendations_t **recs);
 
        /**
index 7ee215c7796cf79dbecdf9bf4a2ac85313e66169..5eecb9cca76f3ce08f39fa7b916e8b8da600b5b3 100644 (file)
@@ -121,8 +121,8 @@ METHOD(tncif_identity_t, build, void,
 METHOD(tncif_identity_t, process, bool,
        private_tncif_identity_t *this, bio_reader_t *reader)
 {
-       u_int8_t reserved;
-       u_int32_t vendor_id, type;
+       uint8_t reserved;
+       uint32_t vendor_id, type;
        chunk_t identity_value;
 
        if (reader->remaining(reader) < TNCIF_IDENTITY_MIN_SIZE)
index f275986d2166a700e700d28971d61a0e7f399f81..a8db2f2726bd786463348d4128f5c69eccfdb32b 100644 (file)
@@ -109,7 +109,7 @@ static void initiate(private_control_controller_t *this, fast_request_t *r,
  * terminate an IKE or CHILD SA
  */
 static void terminate(private_control_controller_t *this, fast_request_t *r,
-                                         bool ike, u_int32_t id)
+                                         bool ike, uint32_t id)
 {
        gateway_t *gateway;
        enumerator_t *e;
@@ -140,7 +140,7 @@ METHOD(fast_controller_t, handle, void,
        }
        if (action)
        {
-               u_int32_t id;
+               uint32_t id;
 
                if (streq(action, "terminateike"))
                {
index 8a8fbe895ba187739ded66c147ace6d15b8a8566..58ee6ab546060f5e04526510de5a7013a4942bdb 100644 (file)
@@ -317,7 +317,7 @@ METHOD(gateway_t, initiate, enumerator_t*,
 }
 
 METHOD(gateway_t, terminate, enumerator_t*,
-       private_gateway_t *this, bool ike, u_int32_t id)
+       private_gateway_t *this, bool ike, uint32_t id)
 {
        char *str, *kind;
 
index 5792ebf028b8d7e8b1e6254b6e77d65d1fb53e40..1f62d2365746d15bf115fb62356d1154de4b2e8d 100644 (file)
@@ -61,7 +61,7 @@ struct gateway_t {
         * @param id            ID of the SA to terminate
         * @return                      enumerator over control response XML children
         */
-       enumerator_t* (*terminate)(gateway_t *this, bool ike, u_int32_t id);
+       enumerator_t* (*terminate)(gateway_t *this, bool ike, uint32_t id);
 
        /**
         * Initiate an IKE or a CHILD SA.
index 3a179af17e15a3c113f7ba42b22f5484f698c05c..b91997ddd87424e7af0e0c1108c2dab5e2a8487c 100644 (file)
@@ -50,7 +50,7 @@ static void usage(FILE *out)
 /**
  * Client routine
  */
-static int client(char *address, u_int16_t port, char *identity)
+static int client(char *address, uint16_t port, char *identity)
 {
        pt_tls_client_t *assessment;
        tls_t *tnccs;
index 897aa423e341cbbd17b2aedfec70f87825f22424..33924b065629f06c5996733fc128f6fd6eaaf1ea 100644 (file)
@@ -331,7 +331,7 @@ static void kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token,
                                                DBG1(DBG_APP, "# bad protocol: %s=%s", key, value);
                                                goto err;
                                        }
-                                       end->protocol = (u_int8_t)p;
+                                       end->protocol = (uint8_t)p;
                                }
                        }
                        if (streq(port, "%any"))
index 457327f185941ab3ceb7f7185763d34c6a786f86..45f34ce2350a12fbc926d74daa1174cc3b04b7a7 100644 (file)
@@ -106,9 +106,9 @@ struct starter_end {
                bool            hostaccess;
                bool            allow_any;
                char            *updown;
-               u_int16_t       from_port;
-               u_int16_t       to_port;
-               u_int8_t        protocol;
+               uint16_t       from_port;
+               uint16_t       to_port;
+               uint8_t        protocol;
                char            *sourceip;
                char            *dns;
 };
@@ -133,17 +133,17 @@ struct starter_conn {
                time_t          sa_ike_life_seconds;
                time_t          sa_ipsec_life_seconds;
                time_t          sa_rekey_margin;
-               u_int64_t       sa_ipsec_life_bytes;
-               u_int64_t       sa_ipsec_margin_bytes;
-               u_int64_t       sa_ipsec_life_packets;
-               u_int64_t       sa_ipsec_margin_packets;
+               uint64_t       sa_ipsec_life_bytes;
+               uint64_t       sa_ipsec_margin_bytes;
+               uint64_t       sa_ipsec_life_packets;
+               uint64_t       sa_ipsec_margin_packets;
                unsigned long   sa_keying_tries;
                unsigned long   sa_rekey_fuzz;
-               u_int32_t       reqid;
+               uint32_t       reqid;
                mark_t          mark_in;
                mark_t          mark_out;
-               u_int32_t       replay_window;
-               u_int32_t       tfc;
+               uint32_t       replay_window;
+               uint32_t       tfc;
                bool            install_policy;
                bool            aggressive;
                starter_end_t   left, right;
index 17f8a4326f2ed9dc2c7f9e36742b4f1da9d163dd..a3b911d0f9e945489a8ae388e0086d1ece79d974 100644 (file)
@@ -157,7 +157,7 @@ struct stroke_end_t {
        char *cert_policy;
        char *updown;
        char *address;
-       u_int16_t ikeport;
+       uint16_t ikeport;
        char *sourceip;
        char *dns;
        char *subnets;
@@ -165,9 +165,9 @@ struct stroke_end_t {
        int hostaccess;
        int tohost;
        int allow_any;
-       u_int8_t protocol;
-       u_int16_t from_port;
-       u_int16_t to_port;
+       uint8_t protocol;
+       uint16_t from_port;
+       uint16_t to_port;
 };
 
 typedef struct stroke_msg_t stroke_msg_t;
@@ -177,7 +177,7 @@ typedef struct stroke_msg_t stroke_msg_t;
  */
 struct stroke_msg_t {
        /* length of this message with all strings */
-       u_int16_t length;
+       uint16_t length;
 
        /* type of the message */
        enum {
@@ -263,9 +263,9 @@ struct stroke_msg_t {
                        int proxy_mode;
                        int install_policy;
                        int close_action;
-                       u_int32_t reqid;
-                       u_int32_t tfc;
-                       u_int8_t ikedscp;
+                       uint32_t reqid;
+                       uint32_t tfc;
+                       uint8_t ikedscp;
 
                        crl_policy_t crl_policy;
                        int unique;
@@ -279,10 +279,10 @@ struct stroke_msg_t {
                                time_t ipsec_lifetime;
                                time_t ike_lifetime;
                                time_t margin;
-                               u_int64_t life_bytes;
-                               u_int64_t margin_bytes;
-                               u_int64_t life_packets;
-                               u_int64_t margin_packets;
+                               uint64_t life_bytes;
+                               uint64_t margin_bytes;
+                               uint64_t life_packets;
+                               uint64_t margin_packets;
                                unsigned long tries;
                                unsigned long fuzz;
                        } rekey;
@@ -297,11 +297,11 @@ struct stroke_msg_t {
                                char *peerid;
                        } ikeme;
                        struct {
-                               u_int32_t value;
-                               u_int32_t mask;
+                               uint32_t value;
+                               uint32_t mask;
                        } mark_in, mark_out;
                        stroke_end_t me, other;
-                       u_int32_t replay_window;
+                       uint32_t replay_window;
                } add_conn;
 
                /* data for STR_ADD_CA */
@@ -369,7 +369,7 @@ struct stroke_msg_t {
                } counters;
        };
        /* length of the string buffer */
-       u_int16_t buflen;
+       uint16_t buflen;
        /* string buffer */
        char buffer[];
 };