Drop support for versions Q037, Q038, and Q042
This commit is contained in:
parent
d5eb659e46
commit
052a1c28ad
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
-------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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",
|
||||
};
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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: */
|
||||
|
|
Loading…
Reference in New Issue