Skip to content

Supported Cases

This page lists some of the popular test cases of XQUIC.

Run testcases

You can use ./script/case_test.sh as a test tool or dictionary, which contains almost all the casetest of XQUIC features.

Hope it can help you understand XQUIC better.

bash
sh ../scripts/case_test.sh

Support Features

XQUIC implements most of the basic functionalities of the QUIC protocol according to RFC9000/RFC9001/RFC9002/RFC9114/RFC9204, and here comes some basic features:

Transport Features

XQUIC now supports the following extentional features:

bash
# ./build
${SERVER_BIN} = ./tests/test_server
${CLIENT_BIN} = ./tests/test_client

0-RTT

XQUIC supports transport 0-RTT packets,given session ticket has been saved after the first handshake.

bash
# ./build
# start (or restart) server
${SERVER_BIN} -l i -e

# remove cached session ticket
rm -f test_session
# start client twice to enable 0-RTT
${CLIENT_BIN} -s 1024000 -l d -N -t 1 -E | grep ">>>>>>>> pass"     # normal res: ">>>>>>>> pass:1", with test_session generated
${CLIENT_BIN} -s 1024000 -l d -N -t 1 -E | grep "early_data_flag:1" # success res: "early_data_flag:1"

Parallel Transport

bash
# ./build
# start (or restart) server
${SERVER_BIN} -l d -e -x 1

# start client with -P {parallel number}
${CLIENT_BIN} -s 1 -l e -t 1 -E -P 1025 -G > ccfc.log
grep ">>>>>>>> pass:1" ccfc.log | wc -l # success res: 1024

MultiPath Transport

  • Send 1M data on multiple paths with multipath vertion 04
bash
# ./build
# start (or restart) server
${SERVER_BIN} -l d -e -M

# start client with:
# -M to enable multi-path;
# -i {interface} to set multi-path interface;
# -v {version} to set multipath version;
sudo ${CLIENT_BIN} -s 1024000 -l d -t 1 -M -i lo -i lo -E -v 4
grep "multipath version negotiation succeed on multipath 04" clog   # success res: "multipath version negotiation succeed on multipath 04"
  • Send 1M data on multiple paths with multipath vertion 05
bash
# ./build
# start (or restart) server
${SERVER_BIN} -l d -e -M

# start client with:
# -M to enable multi-path;
# -i {interface} to set multi-path interface;
# -v {version} to set multipath version;
sudo ${CLIENT_BIN} -s 1024000 -l d -t 1 -M -i lo -i lo -E -v 5
grep "multipath version negotiation succeed on multipath 05" clog   # success res: "multipath version negotiation succeed on multipath 04"

Congestion Control

bash
# ./build
# start (or restart) server
${SERVER_BIN} -l d -e -x 1

# start client with:
# -c to set congestion control algorithm;
${CLIENT_BIN} -s 10240000 -l e -E -c bbr | grep ">>>>>>>> pass" #success res: ">>>>>>>> pass:1"

${CLIENT_BIN} -s 10240000 -l e -E -c bbr+ | grep ">>>>>>>> pass" #success res: ">>>>>>>> pass:1"

${CLIENT_BIN} -s 10240000 -l e -E -c cubic | grep ">>>>>>>> pass" #success res: ">>>>>>>> pass:1"

Load Balancing

bash
# ./build
# start (or restart) server
# and set -E to enable lb-cid encryption on
${SERVER_BIN} -l d -e -S "server_id_0" -E

${CLIENT_BIN} -s 1024000 -l d -t 1
grep "|lb cid encrypted|" slog  # success res : != ""

Qlog

Based on qlog (draft-ietf-quic-qlog-main-schema, draft-ietf-quic-qlog-quic-events and draft-ietf-quic-qlog-h3-events),xquic implements quic event logging.

Activate qlog by DXQC_ENABLE_EVENT_LOG

shell
cd build
rm -rf * 
# add "-DXQC_ENABLE_EVENT_LOG=1"
cmake -DGCOV=on -DCMAKE_BUILD_TYPE=Debug -DXQC_ENABLE_TESTING=1 -DXQC_SUPPORT_SENDMMSG_BUILD=1 -DXQC_ENABLE_EVENT_LOG=1 -DXQC_ENABLE_BBR2=1 -DXQC_ENABLE_RENO=1 -DSSL_TYPE=${SSL_TYPE_STR} -DSSL_PATH=${SSL_PATH_STR} ..

make -j

Example Qlog defines three event importance levels, in decreasing order of importance and expected usage: core, base, extra. The level can be set by "--qlog_importance" argument:

shell
./tests/test_server -l e -e --qlog_importance extra

./tests/test_client -s 10240 -l e -t 1 -E --qlog_importance extra

To disable qlog, using "--qlog_disable":

shell
./tests/test_server -l e -e --qlog_disable

./tests/test_client -s 10240 -l e -t 1 -E --qlog_disable

JSON format serialization

shell
python ../scripts/qlog_parser.py --clog clog --slog slog --qlog_path demo_qlog.json

FEC

FEC is a beta feature that has not been drafted, and is designed to solve the transmission delay caused by packet loss.

Open Compiling Option

bash
# fec compile option 
cmake ... -DXQC_ENABLE_FEC=1
# fec scheme compile option
cmake ... -DXQC_ENABLE_XOR=1 -DXQC_ENABLE_RSC=1 -DXQC_ENABLE_PKM=1

Test Case

bash
# ./build
# start (or restart) server
# set -f to enable FEC
${SERVER_BIN} -e -f

# set -g to enable FEC
# set --fec_encoder and --fec_decoder to set FEC encoder and decoder (default: 11 (XOR), Option: 8 (Reed-Solomon), 11 (XOR), 12 (Packet Mask))
${CLIENT_BIN} -g --fec_encoder 11 --fec_decoder 11
grep "|client set final encoder fec scheme: " clog  # success res : "client set final encoder fec scheme: XOR
grep "|server set final encoder fec scheme: " slog  # success res : "server set final encoder fec scheme: XOR
grep "|client set final decoder fec scheme: " clog  # success res : "client set final decoder fec scheme: XOR
grep "|server set final decoder fec scheme: " slog  # success res : "server set final decoder fec scheme: XOR