Skip to content

Commit

Permalink
fixup: update documentation about he_pmtud_state_change_cb_t
Browse files Browse the repository at this point in the history
  • Loading branch information
expressvpn-tom-l committed Oct 17, 2023
1 parent e171b3d commit b3c8916
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
9 changes: 8 additions & 1 deletion include/he.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,14 @@ typedef he_return_code_t (*he_pmtud_time_cb_t)(he_conn_t *conn, int timeout, voi
* @param context A pointer to the user defined context
* @see he_conn_set_context Sets the value of the context pointer
*
* Whenever Lightway PMTUD changes state, this function will be called.
* Whenever Lightway PMTUD changes state, this function will be called. This callback is
* mostly for informational only, there's no hard expectation for the callback to do anything.
* However, this callback may be useful for certain application logic which is triggered by the
* state changes.
*
* The host application must register this callback to enable Path MTU discovery.
*
* @see RFC 8899 for more information about PMTUD state machines.
*/
typedef he_return_code_t (*he_pmtud_state_change_cb_t)(he_conn_t *conn, he_pmtud_state_t state,
void *context);
Expand Down
11 changes: 9 additions & 2 deletions public/he.h
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,14 @@ typedef he_return_code_t (*he_pmtud_time_cb_t)(he_conn_t *conn, int timeout, voi
* @param context A pointer to the user defined context
* @see he_conn_set_context Sets the value of the context pointer
*
* Whenever Lightway PMTUD changes state, this function will be called.
* Whenever Lightway PMTUD changes state, this function will be called. This callback is
* mostly for informational only, there's no hard expectation for the callback to do anything.
* However, this callback may be useful for certain application logic which is triggered by the
* state changes.
*
* The host application must register this callback to enable Path MTU discovery.
*
* @see RFC 8899 for more information about PMTUD state machines.
*/
typedef he_return_code_t (*he_pmtud_state_change_cb_t)(he_conn_t *conn, he_pmtud_state_t state,
void *context);
Expand Down Expand Up @@ -1047,7 +1054,7 @@ void he_ssl_ctx_set_populate_network_config_ipv4_cb(
he_ssl_ctx_t *ctx, he_populate_network_config_ipv4_cb_t pop_network_cb);

/**
* @brief Sets the function that will be called when Lightway PMTUD changes state
* @brief Sets the function that will be called when Lightway PMTUD changes state.
* @param ctx A pointer to a valid SSL context
* @param pmtud_state_change_cb The function to be called when Lightway PMTUD changes state
* @note This callback function is optional if the implementation never intends to use the PMTUD
Expand Down
2 changes: 1 addition & 1 deletion src/he/ssl_ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void he_ssl_ctx_set_populate_network_config_ipv4_cb(
he_ssl_ctx_t *ctx, he_populate_network_config_ipv4_cb_t pop_network_cb);

/**
* @brief Sets the function that will be called when Lightway PMTUD changes state
* @brief Sets the function that will be called when Lightway PMTUD changes state.
* @param ctx A pointer to a valid SSL context
* @param pmtud_state_change_cb The function to be called when Lightway PMTUD changes state
* @note This callback function is optional if the implementation never intends to use the PMTUD
Expand Down

0 comments on commit b3c8916

Please sign in to comment.