Helium
|
Path MTU Discovery functions. More...
#include "he.h"
Go to the source code of this file.
Macros | |
#define | MAX_PROBES 3 |
#define | MIN_PLPMTU 512 |
The smallest PMTU the discovery process will attempt to use. | |
#define | MAX_PLPMTU |
The largest PMTU the discovery process will attempt to use. More... | |
#define | INITIAL_PLPMTU 1250 |
The initial PMTU the discovery process will attempt to use first. | |
#define | PMTUD_PROBE_TIMEOUT_MS 5000 |
The default timeout for waiting for an acknowledgement to a probe packet, in milliseconds. | |
#define | PMTUD_PROBE_BIG_STEP 32 |
Number of bytes to increase for the next PROBED_SIZE. | |
#define | PMTUD_PROBE_SMALL_STEP 8 |
The minimal number of bytes to increase for the next PROBED_SIZE. | |
#define | PMTUD_ERROR_RETRY_TIMEOUT_MS (60 * 1000) |
The default timeout for retrying a failed PMTUD probe. | |
#define | PMTUD_SUCCESSFUL_SEARCH_RETRY_TIMEOUT_MS (10 * 60 * 1000) |
Functions | |
he_return_code_t | he_internal_pmtud_send_probe (he_conn_t *conn, uint16_t probe_mtu) |
Send PMTUD probe message with the given probe mtu size. More... | |
he_return_code_t | he_internal_pmtud_handle_probe_ack (he_conn_t *conn, uint16_t probe_id) |
Called when the conn receives an acknowledgement of a probe message. More... | |
he_return_code_t | he_internal_pmtud_handle_probe_timeout (he_conn_t *conn) |
Called when the timer of a probe expired. More... | |
he_return_code_t | he_internal_pmtud_start_base_probing (he_conn_t *conn) |
Start PMTUD discovery and change state to BASE. More... | |
he_return_code_t | he_internal_pmtud_base_confirmed (he_conn_t *conn) |
Called when the acknowledgement of current BASE_PLPMTU probing received. More... | |
he_return_code_t | he_internal_pmtud_confirm_base_failed (he_conn_t *conn) |
Called when current state is BASE and PROBE_COUNT reaches MAX_PROBES. More... | |
he_return_code_t | he_internal_pmtud_start_searching (he_conn_t *conn) |
Called when probing for the BASE_PLPMTU completes. More... | |
he_return_code_t | he_internal_pmtud_search_completed (he_conn_t *conn) |
Called when the PROBE_COUNT reaches MAX_PROBES, a validated PTB is received that corresponds to the last successfully probed size (PL_PTB_SIZE = PLPMTU), or a probe of size MAX_PLPMTU is acknowledged (PLPMTU = MAX_PLPMTU) More... | |
he_return_code_t | he_internal_pmtud_blackhole_detected (he_conn_t *conn) |
Called when a black hole situation is detected. More... | |
he_return_code_t | he_internal_pmtud_retry_probe (he_conn_t *conn, int delay_ms) |
Called when we want to retry probing. More... | |
Path MTU Discovery functions.
Lightway Core Copyright (C) 2023 Express VPN International Ltd.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define MAX_PLPMTU |
The largest PMTU the discovery process will attempt to use.
#define MAX_PROBES 3 |
The maximum value of the PROBE_COUNT counter. MAX_PROBES represents the limit for the number of consecutive probe attempts of any size.
he_return_code_t he_internal_pmtud_base_confirmed | ( | he_conn_t * | conn | ) |
Called when the acknowledgement of current BASE_PLPMTU probing received.
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_blackhole_detected | ( | he_conn_t * | conn | ) |
Called when a black hole situation is detected.
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_confirm_base_failed | ( | he_conn_t * | conn | ) |
Called when current state is BASE and PROBE_COUNT reaches MAX_PROBES.
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_handle_probe_ack | ( | he_conn_t * | conn, |
uint16_t | probe_id | ||
) |
Called when the conn receives an acknowledgement of a probe message.
conn | A pointer to a valid connection conn |
probe_id | Id of the probe message |
he_return_code_t he_internal_pmtud_handle_probe_timeout | ( | he_conn_t * | conn | ) |
Called when the timer of a probe expired.
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_retry_probe | ( | he_conn_t * | conn, |
int | delay_ms | ||
) |
Called when we want to retry probing.
conn | A pointer to a valid connection conn |
delay_ms | Delay in milliseconds to retry probing |
he_return_code_t he_internal_pmtud_search_completed | ( | he_conn_t * | conn | ) |
Called when the PROBE_COUNT reaches MAX_PROBES, a validated PTB is received that corresponds to the last successfully probed size (PL_PTB_SIZE = PLPMTU), or a probe of size MAX_PLPMTU is acknowledged (PLPMTU = MAX_PLPMTU)
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_send_probe | ( | he_conn_t * | conn, |
uint16_t | probe_mtu | ||
) |
Send PMTUD probe message with the given probe mtu size.
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_start_base_probing | ( | he_conn_t * | conn | ) |
Start PMTUD discovery and change state to BASE.
conn | A pointer to a valid connection conn |
he_return_code_t he_internal_pmtud_start_searching | ( | he_conn_t * | conn | ) |
Called when probing for the BASE_PLPMTU completes.
conn | A pointer to a valid connection conn |