|
OpenVPN
|
#include "error.h"

Go to the source code of this file.
Data Structures | |
| struct | compress_options |
Macros | |
| #define | COMP_F_SWAP (1u << 2) |
| initial command byte is swapped with last byte in buffer to preserve payload alignment | |
| #define | COMP_F_ADVERTISE_STUBS_ONLY (1u << 3) |
| tell server that we only support compression stubs | |
| #define | COMP_F_ALLOW_STUB_ONLY (1u << 4) |
| Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY we still accept other compressions to be pushed. | |
| #define | COMP_F_MIGRATE (1u << 5) |
| push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ | |
| #define | COMP_F_ALLOW_ASYM (1u << 6) |
| Compression was explicitly set to allow asymetric compression. | |
| #define | COMP_F_ALLOW_NOCOMP_ONLY (1u << 7) |
| Do not allow compression framing (breaks DCO). | |
| #define | COMP_ALG_UNDEF 0 |
| #define | COMP_ALG_STUB 1 |
| support compression command byte and framing without actual compression | |
| #define | COMP_ALG_LZO 2 |
| LZO algorithm. | |
| #define | COMP_ALG_SNAPPY 3 |
| Snappy algorithm (no longer supported). | |
| #define | COMP_ALG_LZ4 4 |
| LZ4 algorithm. | |
| #define | COMP_ALGV2_UNCOMPRESSED 10 |
| #define | COMP_ALGV2_LZ4 11 |
Functions | |
| static bool | comp_non_stub_enabled (const struct compress_options *info) |
| bool | check_compression_settings_valid (const struct compress_options *info, msglvl_t msglevel) |
| Checks if the compression settings are valid. | |
| #define COMP_ALG_LZ4 4 |
LZ4 algorithm.
Definition at line 59 of file comp.h.
Referenced by add_option(), check_compression_settings_valid(), and frame_calculate_payload_overhead().
| #define COMP_ALG_LZO 2 |
LZO algorithm.
Definition at line 57 of file comp.h.
Referenced by add_option(), check_compression_settings_valid(), frame_calculate_payload_overhead(), test_mssfix_mtu_calculation(), and test_occ_mtu_calculation().
| #define COMP_ALG_SNAPPY 3 |
| #define COMP_ALG_STUB 1 |
support compression command byte and framing without actual compression
Definition at line 56 of file comp.h.
Referenced by add_option(), comp_non_stub_enabled(), frame_calculate_payload_overhead(), and multi_client_connect_compress_migrate().
| #define COMP_ALG_UNDEF 0 |
Definition at line 54 of file comp.h.
Referenced by add_option(), check_compression_settings_valid(), comp_non_stub_enabled(), options_string(), test_mssfix_mtu_calculation(), and test_occ_mtu_calculation().
| #define COMP_ALGV2_LZ4 11 |
Definition at line 64 of file comp.h.
Referenced by add_option(), and check_compression_settings_valid().
| #define COMP_ALGV2_UNCOMPRESSED 10 |
Definition at line 63 of file comp.h.
Referenced by add_option(), check_compression_settings_valid(), and comp_non_stub_enabled().
| #define COMP_F_ADVERTISE_STUBS_ONLY (1u << 3) |
tell server that we only support compression stubs
Definition at line 42 of file comp.h.
Referenced by add_option(), and options_set_backwards_compatible_options().
| #define COMP_F_ALLOW_ASYM (1u << 6) |
Compression was explicitly set to allow asymetric compression.
Definition at line 49 of file comp.h.
Referenced by add_option().
| #define COMP_F_ALLOW_NOCOMP_ONLY (1u << 7) |
Do not allow compression framing (breaks DCO).
Definition at line 51 of file comp.h.
Referenced by check_compression_settings_valid(), options_postprocess_mutate(), and options_set_backwards_compatible_options().
| #define COMP_F_ALLOW_STUB_ONLY (1u << 4) |
Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY we still accept other compressions to be pushed.
Definition at line 45 of file comp.h.
Referenced by add_option(), check_compression_settings_valid(), and options_set_backwards_compatible_options().
| #define COMP_F_MIGRATE (1u << 5) |
push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ
Definition at line 47 of file comp.h.
Referenced by add_option(), key_method_2_read(), key_method_2_write(), and multi_client_connect_compress_migrate().
| #define COMP_F_SWAP (1u << 2) |
initial command byte is swapped with last byte in buffer to preserve payload alignment
Definition at line 40 of file comp.h.
Referenced by add_option().
| bool check_compression_settings_valid | ( | const struct compress_options * | info, |
| msglvl_t | msglevel ) |
Checks if the compression settings are valid.
Takes into account the flags of allow-compression and also the whether algorithms are compiled in
Definition at line 162 of file comp.c.
References compress_options::alg, COMP_ALG_LZ4, COMP_ALG_LZO, COMP_ALG_UNDEF, COMP_ALGV2_LZ4, COMP_ALGV2_UNCOMPRESSED, COMP_F_ALLOW_NOCOMP_ONLY, COMP_F_ALLOW_STUB_ONLY, comp_non_stub_enabled(), compress_options::flags, and msg.
Referenced by do_deferred_options(), multi_connection_established(), and options_postprocess_mutate().
|
inlinestatic |
Definition at line 81 of file comp.h.
References compress_options::alg, COMP_ALG_STUB, COMP_ALG_UNDEF, and COMP_ALGV2_UNCOMPRESSED.
Referenced by add_option(), check_compression_settings_valid(), options_set_backwards_compatible_options(), and show_compression_warning().