|
OpenVPN
|
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_t * | data |
| Pointer to the allocated memory. | |
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:
| int buffer::capacity |
Size in bytes of memory allocated by malloc().
Definition at line 72 of file buffer.h.
Referenced by alloc_buf(), alloc_buf_gc(), buf_catrunc(), buf_clear(), buf_copy_range(), buf_forward_capacity(), buf_forward_capacity_total(), buf_init_dowork(), buf_reset(), buf_safe(), buf_safe_bidir(), buf_set_read(), buf_set_write(), buf_sub(), clone_buf(), do_data_channel_round_trip(), encrypt_one_packet(), log_history_obj_init(), openvpn_encrypt_aead(), openvpn_encrypt_v1(), read_inline_file(), string_null_terminate(), test_crypto(), test_packet_id_write_setup(), tls_crypt_wrap(), and verify_cert().
| uint8_t* buffer::data |
Pointer to the allocated memory.
Definition at line 78 of file buffer.h.
Referenced by alloc_buf(), alloc_buf_gc(), buf_catrunc(), buf_cbptr(), buf_clear(), buf_copy_range(), buf_defined(), buf_init_dowork(), buf_reset(), buf_set_read(), buf_set_write(), buf_sub(), buf_valid(), buf_write_u16(), buf_write_u32(), buf_write_u64(), buf_write_u8(), buffer_list_push_data(), buffer_turnover(), check_keystate_buf_not_used(), check_session_buf_not_used(), clone_buf(), connection_entry_preload_key(), crypto_pem_encode(), encrypt_sign(), flush_payload_buffer(), format_hex_ex(), frame_print(), free_buf(), free_buf_gc(), get_proxy_authenticate(), management_query_multiline_flatten(), management_query_multiline_flatten_newline(), multi_process_incoming_link_data(), openvpn_decrypt_aead(), packet_id_persist_print(), process_incoming_link(), read_key_file(), store_proxy_authenticate(), system_error_message(), test_buffer_free_gc_one(), test_buffer_free_gc_two(), test_packet_id_write_epoch(), test_packet_id_write_setup(), and win32_version_string().
| int buffer::len |
Length in bytes of the actual content within the allocated memory.
Definition at line 76 of file buffer.h.
Referenced by __wrap_rand_bytes(), alloc_buf_sock_tun(), bio_read(), bio_write_post(), buf_advance(), buf_catrunc(), buf_clear(), buf_copy_excess(), buf_copy_range(), buf_forward_capacity(), buf_inc_len(), buf_init_dowork(), buf_len(), buf_prepend(), buf_printf(), buf_puts(), buf_read_alloc(), buf_reset(), buf_reset_len(), buf_rmtail(), buf_safe(), buf_safe_bidir(), buf_set_read(), buf_set_write(), buf_string_match(), buf_string_match_head(), buf_string_match_head_str(), buf_valid(), buf_write_alloc(), buffer_list_push(), buffer_list_push_data(), check_fragment(), check_incoming_control_channel(), check_keystate_buf_not_used(), check_outgoing_ciphertext(), check_ping_send_dowork(), check_session_buf_not_used(), checked_snprintf(), clone_buf(), do_data_channel_round_trip(), drop_if_recursive_routing(), encrypt_one_packet(), encrypt_sign(), extract_command_buffer(), flush_payload_buffer(), fragment_incoming(), fragment_outgoing(), fragment_prepend_flags(), fragment_ready_to_send(), generate_ephemeral_key(), handle_data_channel_packet(), in_extra_dispatch(), key_method_2_read(), link_socket_bad_incoming_addr(), link_socket_get_outgoing_addr(), link_socket_read_tcp(), link_socket_verify_incoming_addr(), make_arg_copy(), make_inline_array(), man_write(), management_callback_send_cc_message(), multi_check_dest_addr_allowed(), multi_get_create_instance_udp(), multi_get_instance_udp_data(), multi_process_drop_outgoing_tun(), multi_process_incoming_link_data(), multi_process_outgoing_tun(), multi_process_post(), openvpn_decrypt(), openvpn_decrypt_aead(), openvpn_decrypt_v1(), openvpn_encrypt(), openvpn_encrypt_aead(), openvpn_encrypt_v1(), p2p_iow_flags(), parse_auth_challenge(), parse_early_negotiation_tlvs(), prepend_dir(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_tun(), process_ip_header(), process_outgoing_link(), process_outgoing_tun(), process_received_occ_msg(), protocol_dump(), read_control_auth(), read_incoming_tls_ciphertext(), read_incoming_tun(), read_key_file(), reliable_ack_read_packet_id(), reliable_send(), rm_trailing_chars(), send_auth_failed(), send_auth_pending_messages(), send_standalone_reply(), set_auth_token_user(), socket_send_queue(), sockethandle_finalize(), socks_process_incoming_udp(), stream_buf_added(), stream_buf_get_final(), stream_buf_get_next(), stream_buf_init(), stream_buf_read_setup_dowork(), string_alloc_buf(), string_null_terminate(), swap_hmac(), tap_win_getinfo(), test_crypto(), test_data_channel_known_vectors_run(), test_extract_control_message(), test_packet_id_write_epoch(), tls_crypt_unwrap(), tls_crypt_wrap(), tls_get_cipher_name_pair(), tls_post_encrypt(), tls_pre_decrypt(), tls_pre_decrypt_lite(), tls_pre_encrypt(), tls_process(), tls_process_state(), tls_rec_payload(), tls_wrap_control(), tun_show_debug(), tun_write_queue(), tuntap_dhcp_mask(), username_password_as_base64(), vlan_decapsulate(), vlan_encapsulate(), vlan_process_outgoing_tun(), wide_cmd_line(), and write_outgoing_tls_ciphertext().
| int buffer::offset |
Offset in bytes of the actual content within the allocated memory.
Definition at line 74 of file buffer.h.
Referenced by buf_advance(), buf_assign(), buf_cbptr(), buf_clear(), buf_copy_range(), buf_forward_capacity(), buf_forward_capacity_total(), buf_init_dowork(), buf_prepend(), buf_read_alloc(), buf_reset(), buf_reset_len(), buf_reverse_capacity(), buf_safe(), buf_safe_bidir(), buf_set_read(), buf_set_write(), clone_buf(), link_socket_write_tcp(), openvpn_encrypt_aead(), openvpn_encrypt_v1(), read_control_auth(), send_standalone_reply(), stream_buf_get_next(), test_packet_id_write_long_prepend(), test_packet_id_write_short_prepend(), tls_crypt_wrap(), and tls_wrap_control().