diff --git a/CHANGELOG b/CHANGELOG index 2088911..9de2b0e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,9 @@ 2018-05-09 - [FEATURE] Add support for Q043. - - Q041 and Q042 are marked deprecated. They are still fully usable, - but not enabled by default. + - Support for versions Q037, Q038, and Q042 has been removed. + - Q041 is marked deprecated. It is still fully usable, but not + enabled by default. - Fix typo in debug message. - Fix code indentation. - Add /* fallthru */ comment to stop newer gcc from complaining. diff --git a/README.md b/README.md index 4efcacc..2556289 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ our own products: LiteSpeed Web Server and ADC. We think it is free of major problems. Nevertheless, do not hesitate to report bugs back to us. Even better, send us fixes and improvements! -Currently supported QUIC versions are Q035, Q037, Q038, Q039, Q041, -Q042, and Q043. Support for newer versions will be added soon after they -are released. The version(s) specified by IETF QUIC WG will be added -once the IETF version of the protocol settles down a little. +Currently supported QUIC versions are Q035, Q039, Q041, and Q043. +Support for newer versions will be added soon after they are released. +The version(s) specified by IETF QUIC WG will be added once the IETF +version of the protocol settles down a little. Documentation ------------- diff --git a/include/lsquic.h b/include/lsquic.h index 1aff4ca..039e67d 100644 --- a/include/lsquic.h +++ b/include/lsquic.h @@ -50,19 +50,23 @@ enum lsquic_version /** Q035. This is the first version to be supported by LSQUIC. */ LSQVER_035, - /** + /* * Q037. This version is like Q035, except the way packet hashes are * generated is different for clients and servers. In addition, new * option NSTP (no STOP_WAITING frames) is rumored to be supported at * some point in the future. */ - LSQVER_037, + /* Support for this version has been removed. The comment remains to + * document the changes. + */ - /** + /* * Q038. Based on Q037, supports PADDING frames in the middle of packet * and NSTP (no STOP_WAITING frames) option. */ - LSQVER_038, + /* Support for this version has been removed. The comment remains to + * document the changes. + */ /** * Q039. Switch to big endian. Do not ack acks. Send connection level @@ -76,10 +80,12 @@ enum lsquic_version */ LSQVER_041, - /** + /* * Q042. Receiving overlapping stream data is allowed. */ - LSQVER_042, + /* Support for this version has been removed. The comment remains to + * document the changes. + */ /** * Q043. Support for processing PRIORITY frames. Since this library @@ -99,8 +105,7 @@ enum lsquic_version #define LSQUIC_EXPERIMENTAL_VERSIONS 0 -#define LSQUIC_DEPRECATED_VERSIONS ((1 << LSQVER_037) | (1 << LSQVER_038) | \ - (1 << LSQVER_041) | (1 << LSQVER_042)) +#define LSQUIC_DEPRECATED_VERSIONS (1 << LSQVER_041) /** * @struct lsquic_stream_if diff --git a/src/liblsquic/lsquic_full_conn.c b/src/liblsquic/lsquic_full_conn.c index dbcf9a0..8421fcc 100644 --- a/src/liblsquic/lsquic_full_conn.c +++ b/src/liblsquic/lsquic_full_conn.c @@ -868,7 +868,7 @@ new_stream_ext (struct full_conn *conn, uint32_t stream_id, int if_idx, { struct lsquic_stream *stream; - if (conn->fc_conn.cn_version >= LSQVER_042) + if (conn->fc_conn.cn_version >= LSQVER_043) stream_ctor_flags |= SCF_ALLOW_OVERLAP; stream = lsquic_stream_new_ext(stream_id, &conn->fc_pub, @@ -1011,7 +1011,7 @@ static unsigned process_padding_frame (struct full_conn *conn, lsquic_packet_in_t *packet_in, const unsigned char *p, size_t len) { - if (conn->fc_conn.cn_version >= LSQVER_038) + if (conn->fc_conn.cn_version >= LSQVER_039) return (unsigned) count_zero_bytes(p, len); if (lsquic_is_zero(p, len)) { @@ -1901,7 +1901,7 @@ process_incoming_packet (struct full_conn *conn, lsquic_packet_in_t *packet_in) conn->fc_ver_neg.vn_tag = NULL; conn->fc_conn.cn_version = conn->fc_ver_neg.vn_ver; conn->fc_conn.cn_flags |= LSCONN_VER_SET; - if (conn->fc_conn.cn_version >= LSQVER_037) + if (conn->fc_conn.cn_version >= LSQVER_039) { assert(!(conn->fc_flags & FC_NSTP)); /* This bit off at start */ if (conn->fc_settings->es_support_nstp) diff --git a/src/liblsquic/lsquic_handshake.c b/src/liblsquic/lsquic_handshake.c index 9978bbe..846324a 100644 --- a/src/liblsquic/lsquic_handshake.c +++ b/src/liblsquic/lsquic_handshake.c @@ -1435,7 +1435,7 @@ verify_packet_hash (const lsquic_enc_session_t *enc_session, if (data_len < HS_PKT_HASH_LENGTH) return -1; - if (version >= LSQVER_037) + if (version >= LSQVER_039) { hash = fnv1a_128_3(buf, *header_len, buf + *header_len + HS_PKT_HASH_LENGTH, @@ -1600,7 +1600,7 @@ lsquic_enc_session_encrypt (lsquic_enc_session_t *enc_session, if (max_out_len < *out_len) return -1; - if (version >= LSQVER_037) + if (version >= LSQVER_039) { hash = fnv1a_128_3(header, header_len, data, data_len, (unsigned char *) "Client", 6); diff --git a/src/liblsquic/lsquic_parse.h b/src/liblsquic/lsquic_parse.h index e7fa52e..e5e7b4e 100644 --- a/src/liblsquic/lsquic_parse.h +++ b/src/liblsquic/lsquic_parse.h @@ -164,8 +164,7 @@ extern const struct parse_funcs lsquic_parse_funcs_gquic_Q039; extern const struct parse_funcs lsquic_parse_funcs_gquic_Q041; #define select_pf_by_ver(ver) ( \ - ((1 << (ver)) & ((1 << LSQVER_035) | \ - (1 << LSQVER_037) | (1 << LSQVER_038))) \ + ((1 << (ver)) & (1 << LSQVER_035)) \ ? &lsquic_parse_funcs_gquic_le : \ ((1 << (ver)) & (1 << LSQVER_041)) \ ? &lsquic_parse_funcs_gquic_Q041 \ diff --git a/src/liblsquic/lsquic_version.c b/src/liblsquic/lsquic_version.c index 4320b85..8112f20 100644 --- a/src/liblsquic/lsquic_version.c +++ b/src/liblsquic/lsquic_version.c @@ -9,11 +9,8 @@ static const unsigned char version_tags[N_LSQVER][4] = { [LSQVER_035] = { 'Q', '0', '3', '5', }, - [LSQVER_037] = { 'Q', '0', '3', '7', }, - [LSQVER_038] = { 'Q', '0', '3', '8', }, [LSQVER_039] = { 'Q', '0', '3', '9', }, [LSQVER_041] = { 'Q', '0', '4', '1', }, - [LSQVER_042] = { 'Q', '0', '4', '2', }, [LSQVER_043] = { 'Q', '0', '4', '3', }, }; @@ -60,11 +57,8 @@ lsquic_str2ver (const char *str, size_t len) const char *const lsquic_ver2str[N_LSQVER] = { [LSQVER_035] = "Q035", - [LSQVER_037] = "Q037", - [LSQVER_038] = "Q038", [LSQVER_039] = "Q039", [LSQVER_041] = "Q041", - [LSQVER_042] = "Q042", [LSQVER_043] = "Q043", }; diff --git a/test/unittests/test_ackgen_gquic_le.c b/test/unittests/test_ackgen_gquic_le.c index a8e2a96..fa7c1db 100644 --- a/test/unittests/test_ackgen_gquic_le.c +++ b/test/unittests/test_ackgen_gquic_le.c @@ -17,7 +17,7 @@ #include "lsquic_logger.h" #include "lsquic.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); static void test1 (void) /* Inverse of quic_framer_test.cc -- NewAckFrameOneAckBlock */ diff --git a/test/unittests/test_ackparse_gquic_le.c b/test/unittests/test_ackparse_gquic_le.c index a116048..a19876c 100644 --- a/test/unittests/test_ackparse_gquic_le.c +++ b/test/unittests/test_ackparse_gquic_le.c @@ -13,7 +13,7 @@ #include "lsquic_util.h" #include "lsquic.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); static lsquic_packno_t n_acked (const ack_info_t *acki) diff --git a/test/unittests/test_blocked_gquic_le.c b/test/unittests/test_blocked_gquic_le.c index 1646733..3271432 100644 --- a/test/unittests/test_blocked_gquic_le.c +++ b/test/unittests/test_blocked_gquic_le.c @@ -12,7 +12,7 @@ #include "lsquic_alarmset.h" #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); /* The test is both for generation and parsing: */ diff --git a/test/unittests/test_conn_close_gquic_le.c b/test/unittests/test_conn_close_gquic_le.c index b0616e5..f5347e1 100644 --- a/test/unittests/test_conn_close_gquic_le.c +++ b/test/unittests/test_conn_close_gquic_le.c @@ -12,7 +12,7 @@ #include "lsquic_alarmset.h" #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); struct conn_close_parse_test { diff --git a/test/unittests/test_elision.c b/test/unittests/test_elision.c index fa4c8a6..ffd4199 100644 --- a/test/unittests/test_elision.c +++ b/test/unittests/test_elision.c @@ -22,7 +22,7 @@ #include "lsquic_logger.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); static struct { char buf[0x100]; diff --git a/test/unittests/test_goaway_gquic_le.c b/test/unittests/test_goaway_gquic_le.c index 5d74e08..46f0054 100644 --- a/test/unittests/test_goaway_gquic_le.c +++ b/test/unittests/test_goaway_gquic_le.c @@ -12,7 +12,7 @@ #include "lsquic_alarmset.h" #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); struct goaway_parse_test { diff --git a/test/unittests/test_parse_packet_in.c b/test/unittests/test_parse_packet_in.c index 318bcde..8f36914 100644 --- a/test/unittests/test_parse_packet_in.c +++ b/test/unittests/test_parse_packet_in.c @@ -49,7 +49,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 1 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -72,7 +72,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 2 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -95,7 +95,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 4 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -118,7 +118,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 6 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -138,7 +138,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 0 + 4 + 1 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = 0, .ppit_conn_id = 0, @@ -157,7 +157,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 0 + 0 + 1 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = 0, .ppit_conn_id = 0, @@ -179,7 +179,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = -1, }, @@ -198,7 +198,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 32+ 2 + 7, .ppit_is_server = 0, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -223,7 +223,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 32+ 1 + 7, .ppit_is_server = 0, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -247,7 +247,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 4 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -270,7 +270,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 1 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -294,7 +294,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 4 + 6 + 7, .ppit_is_server = 1, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, @@ -315,7 +315,7 @@ static const struct parse_packet_in_test tests[] = { }, .ppit_bufsz = 1 + 8 + 8, .ppit_is_server = 0, - .ppit_pf = select_pf_by_ver(LSQVER_037), + .ppit_pf = select_pf_by_ver(LSQVER_035), .ppit_retval = 0, .ppit_pi_flags = PI_CONN_ID, .ppit_conn_id = 0x5500000000000000, diff --git a/test/unittests/test_quic_le_floats.c b/test/unittests/test_quic_le_floats.c index 1701d2e..7d856fa 100644 --- a/test/unittests/test_quic_le_floats.c +++ b/test/unittests/test_quic_le_floats.c @@ -13,7 +13,7 @@ #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); struct float_test { uint64_t long_time; diff --git a/test/unittests/test_reg_pkt_headergen.c b/test/unittests/test_reg_pkt_headergen.c index 23c1dd1..7012a88 100644 --- a/test/unittests/test_reg_pkt_headergen.c +++ b/test/unittests/test_reg_pkt_headergen.c @@ -40,7 +40,7 @@ struct test { static const struct test tests[] = { { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0x0102030405060708UL, .nonce = NULL, @@ -74,7 +74,7 @@ static const struct test tests[] = { }, { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0x0102030405060708UL, .nonce = NULL, @@ -91,7 +91,7 @@ static const struct test tests[] = { }, { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0x0102030405060708UL, .nonce = NULL, @@ -134,7 +134,7 @@ static const struct test tests[] = { #define NONCENSE_BYTES '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v' { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0x0102030405060708UL, .nonce = NONCENSE, @@ -152,7 +152,7 @@ static const struct test tests[] = { }, { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0, /* Do not set connection ID */ .nonce = NONCENSE, @@ -168,7 +168,7 @@ static const struct test tests[] = { }, { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0x0102030405060708UL, .nonce = NONCENSE, @@ -189,7 +189,7 @@ static const struct test tests[] = { }, { - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .bufsz = QUIC_MAX_PUBHDR_SZ, .cid = 0x0102030405060708UL, .nonce = NONCENSE, diff --git a/test/unittests/test_rst_stream_gquic_le.c b/test/unittests/test_rst_stream_gquic_le.c index 0155a58..208430c 100644 --- a/test/unittests/test_rst_stream_gquic_le.c +++ b/test/unittests/test_rst_stream_gquic_le.c @@ -12,7 +12,7 @@ #include "lsquic_alarmset.h" #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); /* The test is both for generation and parsing: */ diff --git a/test/unittests/test_some_packets.c b/test/unittests/test_some_packets.c index 1e576ce..0f41bc5 100644 --- a/test/unittests/test_some_packets.c +++ b/test/unittests/test_some_packets.c @@ -19,7 +19,7 @@ struct lsquic_stream_if; -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); lsquic_stream_t * lsquic_stream_new_ext (uint32_t id, diff --git a/test/unittests/test_stop_waiting_gquic_le.c b/test/unittests/test_stop_waiting_gquic_le.c index 2dd6f55..90618a0 100644 --- a/test/unittests/test_stop_waiting_gquic_le.c +++ b/test/unittests/test_stop_waiting_gquic_le.c @@ -12,7 +12,7 @@ #include "lsquic_alarmset.h" #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); struct parse_test { diff --git a/test/unittests/test_stream.c b/test/unittests/test_stream.c index 93e8963..9d21d04 100644 --- a/test/unittests/test_stream.c +++ b/test/unittests/test_stream.c @@ -38,7 +38,7 @@ #include "lsquic_ver_neg.h" #include "lsquic_packet_out.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); struct test_ctl_settings { diff --git a/test/unittests/test_streamgen.c b/test/unittests/test_streamgen.c index bf3ac57..bb4e6fb 100644 --- a/test/unittests/test_streamgen.c +++ b/test/unittests/test_streamgen.c @@ -44,7 +44,7 @@ static const struct test tests[] = { * Little-endian: */ { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 1, }, .offset = 0x0807060504030201UL, .stream_id = 0x210, @@ -65,7 +65,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 0, }, .offset = 0x0807060504030201UL, .stream_id = 0x210, @@ -86,7 +86,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 1, 0, }, .offset = 0x0807060504030201UL, .stream_id = 0x210, @@ -107,7 +107,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 1, 0, }, .offset = 0x0807060504030201UL, .stream_id = 0x21, @@ -128,7 +128,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 0, }, .offset = 0x77, .stream_id = 0x210, @@ -149,7 +149,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 0, }, .offset = 0x0, .stream_id = 0x210, @@ -170,7 +170,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 1, }, .offset = 0x0, .stream_id = 0x210, @@ -191,7 +191,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 0, }, .offset = 0xFFFFFF, .stream_id = 0x210, @@ -212,7 +212,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 0, }, .offset = 0xFFFFFF + 1, .stream_id = 0x210, @@ -233,7 +233,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 0, 0, }, .offset = 0xFFFFFF + 1, .stream_id = 0x210, @@ -253,7 +253,7 @@ static const struct test tests[] = { }, { .lineno = __LINE__, - .pf = select_pf_by_ver(LSQVER_037), + .pf = select_pf_by_ver(LSQVER_035), .fin = { 1, 0, }, .offset = 0xB4, .stream_id = 0x01, diff --git a/test/unittests/test_streamparse.c b/test/unittests/test_streamparse.c index aa15eb4..7851ee2 100644 --- a/test/unittests/test_streamparse.c +++ b/test/unittests/test_streamparse.c @@ -38,7 +38,7 @@ static const struct test tests[] = { */ { "Balls to the wall: every possible bit is set", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x40 | 0x20 | 0x1C | 0x3, @@ -58,7 +58,7 @@ static const struct test tests[] = { { "Balls to the wall #2: every possible bit is set, except FIN", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x00 | 0x20 | 0x1C | 0x3, @@ -78,7 +78,7 @@ static const struct test tests[] = { { "Data length is zero", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x40 | 0x00 | 0x1C | 0x3, @@ -98,7 +98,7 @@ static const struct test tests[] = { { "Stream ID length is 1", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x40 | 0x20 | 0x1C | 0x0, @@ -118,7 +118,7 @@ static const struct test tests[] = { { "All bits are zero save offset length", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x00 | 0x00 | 0x04 | 0x0, @@ -138,7 +138,7 @@ static const struct test tests[] = { { "Sanity check: either FIN must be set or data length is not zero #1", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x00 | 0x00 | 0x04 | 0x0, @@ -160,7 +160,7 @@ static const struct test tests[] = { { "Sanity check: either FIN must be set or data length is not zero #2", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x00 | 0x20 | 0x04 | 0x0, @@ -180,7 +180,7 @@ static const struct test tests[] = { { "Sanity check: either FIN must be set or data length is not zero #3", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x40 | 0x20 | 0x04 | 0x0, @@ -200,7 +200,7 @@ static const struct test tests[] = { { "Check data bounds #1", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x00 | 0x20 | 0x04 | 0x0, @@ -220,7 +220,7 @@ static const struct test tests[] = { { "Check data bounds #2", __LINE__, - select_pf_by_ver(LSQVER_037), + select_pf_by_ver(LSQVER_035), /* 1 f d ooo ss 1fdoooss */ /* TYPE FIN DLEN OLEN SLEN */ { 0x80 | 0x00 | 0x20 | 0x04 | 0x0, diff --git a/test/unittests/test_ver_nego.c b/test/unittests/test_ver_nego.c index a815ccd..ecdda37 100644 --- a/test/unittests/test_ver_nego.c +++ b/test/unittests/test_ver_nego.c @@ -18,7 +18,7 @@ #include "lsquic_engine_public.h" #include "lsquic_version.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); /* The struct is used to test both generation and parsing of version @@ -40,27 +40,27 @@ static const struct gen_ver_nego_test tests[] = { { .gvnt_lineno = __LINE__, .gvnt_cid = 0x0102030405060708UL, - .gvnt_versions = (1 << LSQVER_037), + .gvnt_versions = (1 << LSQVER_035), .gvnt_bufsz = 13, .gvnt_len = 13, .gvnt_buf = { PACKET_PUBLIC_FLAGS_VERSION| PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Connection ID */ - 'Q', '0', '3', '7', + 'Q', '0', '3', '5', }, }, { .gvnt_lineno = __LINE__, .gvnt_cid = 0x0102030405060708UL, - .gvnt_versions = (1 << LSQVER_037), + .gvnt_versions = (1 << LSQVER_035), .gvnt_bufsz = 12, .gvnt_len = -1, /* Buffer size is too small */ }, { .gvnt_lineno = __LINE__, .gvnt_cid = 0x0102030405060708UL, - .gvnt_versions = (1 << LSQVER_037) | (1 << N_LSQVER), + .gvnt_versions = (1 << LSQVER_035) | (1 << N_LSQVER), .gvnt_bufsz = 20, .gvnt_len = -1, /* Invalid version specified in the bitmask */ }, @@ -68,7 +68,7 @@ static const struct gen_ver_nego_test tests[] = { { .gvnt_lineno = __LINE__, .gvnt_cid = 0x0102030405060708UL, - .gvnt_versions = (1 << LSQVER_037) | (1 << LSQVER_035) | (1 << LSQVER_038), + .gvnt_versions = (1 << LSQVER_035) | (1 << LSQVER_039) | (1 << LSQVER_043), .gvnt_bufsz = 21, .gvnt_len = 21, .gvnt_buf = { @@ -76,8 +76,8 @@ static const struct gen_ver_nego_test tests[] = { PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Connection ID */ 'Q', '0', '3', '5', - 'Q', '0', '3', '7', - 'Q', '0', '3', '8', + 'Q', '0', '3', '9', + 'Q', '0', '4', '3', }, }, }; diff --git a/test/unittests/test_wuf_gquic_le.c b/test/unittests/test_wuf_gquic_le.c index e73eebb..1d7c6d8 100644 --- a/test/unittests/test_wuf_gquic_le.c +++ b/test/unittests/test_wuf_gquic_le.c @@ -12,7 +12,7 @@ #include "lsquic_alarmset.h" #include "lsquic_parse.h" -static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_037); +static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_035); /* The test is both for generation and parsing: */