OpenVPN
Data Fields
buffer Struct Reference

Wrapper structure for dynamically allocated memory. More...

#include <buffer.h>

Data Fields

int capacity
 Size in bytes of memory allocated by malloc().
 
int offset
 Offset in bytes of the actual content within the allocated memory.
 
int len
 Length in bytes of the actual content within the allocated memory.
 
uint8_tdata
 Pointer to the allocated memory.
 

Detailed Description

Wrapper structure for dynamically allocated memory.

The actual content stored in a buffer structure starts at the memory location buffer.data + buffer.offset, and has a length of buffer.len bytes. This, together with the space available before and after the content, is represented in the pseudocode below:

Wrapper structure for dynamically allocated memory.
Definition buffer.h:61
int capacity
Size in bytes of memory allocated by malloc().
Definition buffer.h:62
uint8_t * data
Pointer to the allocated memory.
Definition buffer.h:68
int len
Length in bytes of the actual content within the allocated memory.
Definition buffer.h:66
int offset
Offset in bytes of the actual content within the allocated memory.
Definition buffer.h:64

Definition at line 60 of file buffer.h.

Field Documentation

◆ capacity

int buffer::capacity

◆ data

uint8_t* buffer::data

◆ len

int buffer::len

Length in bytes of the actual content within the allocated memory.

Definition at line 66 of file buffer.h.

Referenced by __wrap_buffer_read_from_file(), __wrap_rand_bytes(), add_option(), addr_family_name(), alloc_buf(), alloc_buf_gc(), alloc_buf_sock_tun(), append_cipher_to_ncp_list(), auth_token_init_secret(), auth_user_pass_mgmt(), backend_x509_get_username(), bad_address_length(), bio_read(), bio_write_post(), buf_advance(), buf_assign(), buf_catrunc(), buf_clear(), buf_copy(), buf_copy_excess(), buf_copy_n(), buf_copy_range(), buf_equal(), buf_forward_capacity(), buf_inc_len(), buf_init_dowork(), buf_len(), buf_parse(), buf_prepend(), buf_printf(), buf_puts(), buf_read(), buf_read_alloc(), buf_read_u16(), buf_read_u32(), buf_reset(), buf_reset_len(), buf_rmtail(), buf_safe(), buf_safe_bidir(), buf_set_read(), buf_set_write(), buf_string_compare_advance(), buf_string_match(), buf_string_match_head(), buf_string_match_head_str(), buf_sub(), buf_substring_len(), buf_valid(), buf_write(), buf_write_alloc(), buf_write_alloc_prepend(), buf_write_prepend(), buf_write_u16(), buf_write_u32(), buf_write_u8(), buffer_list_advance(), buffer_list_aggregate_separator(), buffer_list_peek(), buffer_list_push(), buffer_list_push_data(), buffer_read_from_file(), buffer_write_file(), build_dhcp_options_string(), calculate_crypto_overhead(), ce_management_query_proxy(), ce_management_query_remote(), char_class(), char_inc_exc(), check_aead_limits(), check_ca_required(), check_connection_established(), check_file_access_chroot(), check_file_access_chroot_inline(), check_file_access_inline(), check_fragment(), check_hmac_token(), check_incoming_control_channel(), check_inline_file(), check_outgoing_ciphertext(), check_ping_send_dowork(), check_push_request(), check_session_buf_not_used(), check_session_cipher(), chomp(), cipher_get_aead_limits(), clone_buf(), connection_entry_preload_key(), construct_name_value(), crypto_pem_encode_certificate(), crypto_pem_encode_decode_loopback(), dco_do_read(), dco_handle_overlapped_success(), dco_version_string(), do_alloc_route_list(), do_data_channel_round_trip(), do_init_route_ipv6_list(), do_init_route_list(), do_init_server_poll_timeout(), do_init_timers(), do_init_traffic_shaper(), do_pre_decrypt_check(), drop_if_recursive_routing(), encrypt_one_packet(), encrypt_sign(), env_string_equal(), extract_command_buffer(), extract_x509_field_ssl(), flush_payload_buffer(), fork_dhcp_action(), fork_register_dns_action(), format_common_name(), format_hex_ex(), format_ip_addr_string(), format_route_entry(), fragment_incoming(), fragment_outgoing(), fragment_prepend_flags(), frame_print(), gc_defined(), gc_detach(), gc_init(), gc_malloc(), generate_auth_token(), generate_ephemeral_key(), get_ip_addr(), get_ipv6_addr_no_netbits(), get_key_value(), get_num_elements(), get_pa_var(), get_proxy_authenticate(), get_special_addr(), get_unspecified_device_guid(), get_user_pass_cr(), get_user_pass_http(), handle_data_channel_packet(), helper_add_route(), hostname_randomize(), ifconfig_options_string(), ifconfig_pool_read(), in_src_get(), init_epoch_keys(), init_frame_parameters(), init_key_type(), init_route(), init_ssl(), init_static_hmac(), initialization_sequence_completed(), ipset2ascii_all(), ipv6_send_icmp_unreachable(), is_route_parm_defined(), is_special_addr(), is_tun_p2p(), key_ctx_update_implicit_iv(), key_method_2_read(), key_state_check_auth_failed_message_file(), key_state_check_auth_pending_file(), key_state_rm_auth_control_files(), key_state_test_auth_control_file(), ks_auth_name(), link_socket_bad_incoming_addr(), link_socket_connection_initiated(), link_socket_get_outgoing_addr(), link_socket_read_tcp(), link_socket_verify_incoming_addr(), log_entry_free_contents(), log_entry_print(), log_index(), make_arg_array(), make_arg_copy(), make_base64_string(), make_base64_string2(), make_extended_arg_array(), make_inline_array(), man_connection_clear(), man_kill(), man_output_peer_info_env(), man_write(), management_callback_remote_entry_count(), management_callback_send_cc_message(), management_hold(), management_notify_client_needing_auth(), management_query_cert(), management_query_multiline(), management_query_multiline_flatten(), management_query_multiline_flatten_newline(), management_query_pk_sig(), management_query_user_pass(), management_would_hold(), mroute_addr_print_ex(), mroute_helper_add_iroute46(), mroute_helper_del_iroute46(), mroute_helper_free(), mroute_helper_regenerate(), mss_fixup_ipv6(), multi_get_create_instance_udp(), multi_instance_string(), multi_process_drop_outgoing_tun(), multi_process_float(), multi_process_incoming_link(), multi_process_outgoing_link(), multi_process_outgoing_tun(), multi_process_post(), mutate_ncp_cipher_list(), ncp_expanded_ciphers(), netsh_delete_address_dns(), netsh_get_id(), np(), ntlm_phase_3(), openvpn_decrypt(), openvpn_decrypt_aead(), openvpn_decrypt_v1(), openvpn_encrypt(), openvpn_encrypt_aead(), openvpn_encrypt_v1(), openvpn_execve(), openvpn_PRF(), openvpn_waitpid_check(), options_postprocess_setdefault_ncpciphers(), options_string(), options_string_compat_lzo(), options_string_extract_option(), options_warning_extract_parm1(), options_warning_safe_ml(), options_warning_safe_scan1(), options_warning_safe_scan2(), output_peer_info_env(), overlapped_io_active(), ovpn_expand_label(), p2p_iow_flags(), p2p_mode_ncp(), packet_id_net_print(), packet_id_persist_close(), packet_id_persist_init(), packet_id_persist_print(), parse_argv(), parse_auth_challenge(), parse_auth_pending_keywords(), parse_early_negotiation_tlvs(), parse_topology(), parse_windows_driver(), platform_absolute_pathname(), platform_gen_path(), platform_test_file(), plugin_mask_string(), plugin_supported_types(), pre_setup(), prepare_push_reply(), prepend_dir(), print_argv(), print_key_filename(), print_key_id(), print_link_socket_actual_ex(), print_netmask(), print_opt_route_gateway(), print_sockaddr_ex(), print_str(), print_str_int(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_push_msg(), process_incoming_push_reply(), process_incoming_tun(), process_ip_header(), process_outgoing_link(), process_outgoing_tun(), process_received_occ_msg(), proto2ascii_all(), protocol_dump(), purge_user_pass(), push_peer_info(), read_config_string(), read_control_auth(), read_incoming_link(), read_incoming_tls_ciphertext(), read_incoming_tun(), read_inline_file(), read_key_file(), read_pem_key_file(), read_wintun(), receive_auth_failed(), receive_auth_pending(), receive_cr_response(), receive_exit_message(), recv_line(), register_dns_service(), reliable_ack_print(), reliable_ack_read_packet_id(), reliable_ack_write(), reliable_get_buf(), reliable_get_buf_output_sequenced(), reliable_init(), reliable_send(), reliable_set_timeout(), remove_iroutes_from_push_route_list(), replace_default_in_ncp_ciphers_option(), reset_coarse_timers(), rm_trailing_chars(), route_string(), safe_print(), sanitize_control_message(), send_auth_failed(), send_auth_pending_messages(), send_hmac_reset_packet(), send_line_crlf(), send_push_reply(), send_push_reply_auth_token(), send_restart(), server_pushed_info(), server_pushed_signal(), session_id_hmac_init(), session_move_pre_start(), set_auth_token(), set_auth_token_user(), set_mtu_discover_type(), setenv_del(), setenv_format_indexed_name(), setenv_route(), setenv_route_addr(), setenv_route_ipv6(), setenv_routes(), setenv_routes_ipv6(), setenv_str_incr(), setenv_str_safe(), show_adapter(), skip_leading_whitespace(), socket_connection_reset(), socket_listen_event_handle(), socket_send_queue(), sockethandle_finalize(), socks_process_incoming_udp(), socks_process_outgoing_udp(), store_proxy_authenticate(), stream_buf_added(), stream_buf_close(), stream_buf_get_final(), stream_buf_get_next(), stream_buf_init(), stream_buf_read_setup_dowork(), stream_buf_reset(), stream_buf_set_next(), strerror_win32(), string_alloc(), string_alloc_buf(), string_array_len(), string_check_buf(), string_class(), string_clear(), string_mod(), string_mod_const(), string_null_terminate(), string_replace_leading(), strprefix(), swap_hmac(), system_error_message(), tap_win_getinfo(), test_buffer_chomp(), test_buffer_format_hex_ex(), test_buffer_free_gc_one(), test_buffer_free_gc_two(), test_buffer_list_aggregate_separator_emptybuffers(), test_buffer_list_aggregate_separator_two(), test_buffer_list_aggregate_separator_zerolen(), test_calc_session_id_hmac_static(), test_character_string_mod_buf(), test_crypto(), test_data_channel_known_vectors_run(), test_extract_control_message(), test_generate_reset_packet_plain(), test_generate_reset_packet_tls_auth(), test_load_certificate_and_key(), test_load_certificate_and_key_uri(), test_packet_id_write_epoch(), test_snprintf(), test_tls_decrypt_lite_auth(), test_tls_decrypt_lite_crypt(), test_tls_decrypt_lite_none(), test_translate_cipher(), test_verify_hmac_none(), test_verify_hmac_tls_auth(), tls_authentication_status(), tls_authentication_status_use_cache(), tls_crypt_fail_replay(), tls_crypt_ignore_replay(), tls_crypt_unwrap(), tls_crypt_v2_extract_client_key(), tls_crypt_v2_init_client_key(), tls_crypt_v2_init_server_key(), tls_crypt_v2_unwrap_client_key(), tls_crypt_v2_verify_metadata(), tls_crypt_v2_wrap_client_key(), tls_crypt_v2_wrap_unwrap_dst_too_small(), tls_crypt_v2_wrap_unwrap_max_metadata(), tls_crypt_v2_wrap_unwrap_no_metadata(), tls_crypt_v2_write_client_key_file(), tls_crypt_wrap(), tls_get_cipher_name_pair(), tls_item_in_cipher_list(), tls_peer_ncp_list(), tls_post_encrypt(), tls_pre_decrypt(), tls_pre_decrypt_lite(), tls_pre_encrypt(), tls_print_deferred_options_results(), tls_process(), tls_process_state(), tls_rec_payload(), tls_reset_standalone(), tls_verify_crl_missing(), tls_wrap_control(), translate_mtu_discover_type_name(), tun_show_debug(), tun_standby(), tun_standby_init(), tun_stat(), tun_try_open_device(), tun_write_queue(), tuntap_dhcp_mask(), tv_string(), tv_string_abs(), update_key_auth_status(), usage(), username_password_as_base64(), validate_peer_info_line(), verify_auth_token(), verify_callback(), verify_cert(), verify_cert_call_plugin(), verify_cert_cert_delete_env(), verify_cert_cert_export_env(), verify_cert_set_env(), vlan_decapsulate(), vlan_encapsulate(), vlan_process_outgoing_tun(), wide_cmd_line(), win32_version_string(), window_title_generate(), wipe_auth_token(), write_control_auth(), write_dhcp_search_str(), write_dhcp_str(), write_dhcp_u32_array(), write_key_file(), write_outgoing_tls_ciphertext(), write_pem_key_file(), x509_get_sha1_fingerprint(), x509_get_sha256_fingerprint(), x509_get_subject(), x509_setenv(), x509_setenv_track(), x509_verify_cert_eku(), x509_verify_cert_ku(), and x509_verify_ns_cert_type().

◆ offset

int buffer::offset

The documentation for this struct was generated from the following file: