Skip to content

Commit

Permalink
Update FFI interfaces (#12)
Browse files Browse the repository at this point in the history
Signed-off-by: ChrisTeg <[email protected]>
Co-authored-by: chrisouyang <[email protected]>
  • Loading branch information
ChrisTeg and chrisouyang authored Oct 30, 2023
1 parent e72a642 commit 1dbdf4f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
29 changes: 18 additions & 11 deletions include/tquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,30 @@
*/
typedef enum quic_congestion_control_algorithm {
/**
* CUBIC, see https://www.rfc-editor.org/rfc/rfc8312.html
* CUBIC uses a cubic function instead of a linear window increase function
* of the current TCP standards to improve scalability and stability under
* fast and long-distance networks..
*/
QUIC_CONGESTION_CONTROL_ALGORITHM_CUBIC,
/**
* BBR congestion control,
* see https://datatracker.ietf.org/doc/html/draft-cardwell-iccrg-bbr-congestion-control-00
* BBR uses recent measurements of a transport connection's delivery rate,
* round-trip time, and packet loss rate to build an explicit model of the
* network path. The model is then used to control data transmission speed
* and the maximum volume of data allowed in flight in the network at any
* time.
*/
QUIC_CONGESTION_CONTROL_ALGORITHM_BBR,
/**
* version 2 of BBR congestion control,
* see https://datatracker.ietf.org/doc/html/draft-cardwell-iccrg-bbr-congestion-control-02
* BBRv3 is the latest version of BBR, including various fixes and
* algorithm updates that reduce packet re-transmit rate and slightly
* improve latency. (Experimental)
*/
QUIC_CONGESTION_CONTROL_ALGORITHM_BBR2,
QUIC_CONGESTION_CONTROL_ALGORITHM_BBR3,
/**
* Copa: Practical Delay-Based Congestion Control for the Internet
* see https://web.mit.edu/copa/
* or https://www.usenix.org/system/files/conference/nsdi18/nsdi18-arun.pdf
* COPA is a tunable delay-based congestion control algorithm. COPA is
* based on an objective function where the trade-off between throughput
* and delay can be configured via a user-specified parameter.
* (Experimental)
*/
QUIC_CONGESTION_CONTROL_ALGORITHM_COPA,
} quic_congestion_control_algorithm;
Expand Down Expand Up @@ -725,13 +732,13 @@ void http3_config_free(struct http3_config_t *config);
void http3_config_set_max_field_section_size(struct http3_config_t *config, uint64_t v);

/**
* Sets the `SETTINGS_QPACK_MAX_TABLE_CAPACITY` setting.
* Set the `SETTINGS_QPACK_MAX_TABLE_CAPACITY` setting.
* The default value is `0`.
*/
void http3_config_set_qpack_max_table_capacity(struct http3_config_t *config, uint64_t v);

/**
* Sets the `SETTINGS_QPACK_BLOCKED_STREAMS` setting.
* Set the `SETTINGS_QPACK_BLOCKED_STREAMS` setting.
* The default value is `0`.
*/
void http3_config_set_qpack_blocked_streams(struct http3_config_t *config, uint64_t v);
Expand Down
4 changes: 2 additions & 2 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1260,14 +1260,14 @@ pub extern "C" fn http3_config_set_max_field_section_size(config: &mut Http3Conf
config.set_max_field_section_size(v);
}

/// Sets the `SETTINGS_QPACK_MAX_TABLE_CAPACITY` setting.
/// Set the `SETTINGS_QPACK_MAX_TABLE_CAPACITY` setting.
/// The default value is `0`.
#[no_mangle]
pub extern "C" fn http3_config_set_qpack_max_table_capacity(config: &mut Http3Config, v: u64) {
config.set_qpack_max_table_capacity(v);
}

/// Sets the `SETTINGS_QPACK_BLOCKED_STREAMS` setting.
/// Set the `SETTINGS_QPACK_BLOCKED_STREAMS` setting.
/// The default value is `0`.
#[no_mangle]
pub extern "C" fn http3_config_set_qpack_blocked_streams(config: &mut Http3Config, v: u64) {
Expand Down

0 comments on commit 1dbdf4f

Please sign in to comment.