diff --git a/CHANGELOG b/CHANGELOG
index b65465e79..8656f2291 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+2017-09-28
+
+ - Add support for Q041; drop support for Q040
+
2017-09-27
- Fix CMakeLists.txt: BoringSSL include and lib was mixed up
diff --git a/README.md b/README.md
index 6704eddb4..23857aea3 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ 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, and Q040.
+Currently supported QUIC versions are Q035, Q037, Q038, Q039, and Q041.
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.
diff --git a/docs/html/globals.html b/docs/html/globals.html
index cbc765696..2444ebc8a 100644
--- a/docs/html/globals.html
+++ b/docs/html/globals.html
@@ -335,8 +335,8 @@
-
Go to the documentation of this file. 14 #include <sys/types.h> 29 #define LSENG_SERVER (1 << 0) 34 #define LSENG_HTTP (1 << 1) 36 #define LSENG_HTTP_SERVER (LSENG_SERVER|LSENG_HTTP) 81 #define LSQUIC_SUPPORTED_VERSIONS ((1 << LSQVER_035) | (1 << LSQVER_037) | \ 82 (1 << LSQVER_038) | (1 << LSQVER_039) | (1 << LSQVER_040)) 84 #define LSQUIC_EXPERIMENTAL_VERSIONS ((1 << LSQVER_040)) 127 #define LSQUIC_MIN_FCW (16 * 1024) 136 #define LSQUIC_DF_VERSIONS (LSQUIC_SUPPORTED_VERSIONS & \ 137 ~LSQUIC_EXPERIMENTAL_VERSIONS) 139 #define LSQUIC_DF_CFCW_SERVER (3 * 1024 * 1024 / 2) 140 #define LSQUIC_DF_CFCW_CLIENT (15 * 1024 * 1024) 141 #define LSQUIC_DF_SFCW_SERVER (1 * 1024 * 1024) 142 #define LSQUIC_DF_SFCW_CLIENT (6 * 1024 * 1024) 143 #define LSQUIC_DF_MAX_STREAMS_IN 100 148 #define LSQUIC_DF_HANDSHAKE_TO (10 * 1000 * 1000) 150 #define LSQUIC_DF_IDLE_CONN_TO (30 * 1000 * 1000) 151 #define LSQUIC_DF_SILENT_CLOSE 1 157 #define LSQUIC_DF_MAX_HEADER_LIST_SIZE 0 160 #define LSQUIC_DF_UA "LSQUIC" 162 #define LSQUIC_DF_STTL 86400 163 #define LSQUIC_DF_MAX_INCHOATE (1 * 1000 * 1000) 164 #define LSQUIC_DF_SUPPORT_SREJ_SERVER 1 165 #define LSQUIC_DF_SUPPORT_SREJ_CLIENT 0 167 #define LSQUIC_DF_SUPPORT_NSTP 0 168 #define LSQUIC_DF_SUPPORT_PUSH 1 169 #define LSQUIC_DF_SUPPORT_TCID0 1 171 #define LSQUIC_DF_HONOR_PRST 0 174 #define LSQUIC_DF_PROGRESS_CHECK 1000 177 #define LSQUIC_DF_PENDRW_CHECK 10 180 #define LSQUIC_DF_RW_ONCE 0 183 #define LSQUIC_DF_PROC_TIME_THRESH 0 186 #define LSQUIC_DF_PACE_PACKETS 1 233 unsigned es_max_sfcw;
392 unsigned lsquic_engine_flags);
412 unsigned lsquic_engine_flags,
413 char *err_buf,
size_t err_buf_sz);
417 const unsigned char *buf;
419 const struct sockaddr *local_sa;
420 const struct sockaddr *dest_sa;
429 void *packets_out_ctx,
431 unsigned n_packets_out
445 void * (*pmi_allocate) (
void *pmi_ctx,
size_t sz);
446 void (*pmi_release) (
void *pmi_ctx,
void *obj);
454 void *ea_stream_if_ctx;
456 void *ea_packets_out_ctx;
481 void *peer_ctx,
const char *hostname,
482 unsigned short max_packet_size);
496 const unsigned char *packet_in_data,
size_t packet_in_size,
497 const struct sockaddr *sa_local,
const struct sockaddr *sa_peer,
614 ssize_t lsquic_stream_writev(
lsquic_stream_t *s,
const struct iovec *vec,
int count);
644 lsquic_http_header_t *headers;
696 const char **headers,
size_t *headers_sz);
716 lsquic_conn_get_stream_by_id (
lsquic_conn_t *c, uint32_t stream_id);
723 const struct sockaddr **local,
const struct sockaddr **peer);
726 int (*vprintf)(
void *logger_ctx,
const char *fmt, va_list args);
801 #define LSQUIC_GLOBAL_CLIENT (1 << 0) 807 #define LSQUIC_GLOBAL_SERVER (1 << 1) 882 #endif //__LSQUIC_H__ int lsquic_engine_has_pend_rw(lsquic_engine_t *)
+
Go to the documentation of this file. 14 #include <sys/types.h> 29 #define LSENG_SERVER (1 << 0) 34 #define LSENG_HTTP (1 << 1) 36 #define LSENG_HTTP_SERVER (LSENG_SERVER|LSENG_HTTP) 81 #define LSQUIC_SUPPORTED_VERSIONS ((1 << LSQVER_035) | (1 << LSQVER_037) | \ 82 (1 << LSQVER_038) | (1 << LSQVER_039) | (1 << LSQVER_041)) 84 #define LSQUIC_EXPERIMENTAL_VERSIONS ((1 << LSQVER_041)) 127 #define LSQUIC_MIN_FCW (16 * 1024) 136 #define LSQUIC_DF_VERSIONS (LSQUIC_SUPPORTED_VERSIONS & \ 137 ~LSQUIC_EXPERIMENTAL_VERSIONS) 139 #define LSQUIC_DF_CFCW_SERVER (3 * 1024 * 1024 / 2) 140 #define LSQUIC_DF_CFCW_CLIENT (15 * 1024 * 1024) 141 #define LSQUIC_DF_SFCW_SERVER (1 * 1024 * 1024) 142 #define LSQUIC_DF_SFCW_CLIENT (6 * 1024 * 1024) 143 #define LSQUIC_DF_MAX_STREAMS_IN 100 148 #define LSQUIC_DF_HANDSHAKE_TO (10 * 1000 * 1000) 150 #define LSQUIC_DF_IDLE_CONN_TO (30 * 1000 * 1000) 151 #define LSQUIC_DF_SILENT_CLOSE 1 157 #define LSQUIC_DF_MAX_HEADER_LIST_SIZE 0 160 #define LSQUIC_DF_UA "LSQUIC" 162 #define LSQUIC_DF_STTL 86400 163 #define LSQUIC_DF_MAX_INCHOATE (1 * 1000 * 1000) 164 #define LSQUIC_DF_SUPPORT_SREJ_SERVER 1 165 #define LSQUIC_DF_SUPPORT_SREJ_CLIENT 0 167 #define LSQUIC_DF_SUPPORT_NSTP 0 168 #define LSQUIC_DF_SUPPORT_PUSH 1 169 #define LSQUIC_DF_SUPPORT_TCID0 1 171 #define LSQUIC_DF_HONOR_PRST 0 174 #define LSQUIC_DF_PROGRESS_CHECK 1000 177 #define LSQUIC_DF_PENDRW_CHECK 10 180 #define LSQUIC_DF_RW_ONCE 0 183 #define LSQUIC_DF_PROC_TIME_THRESH 0 186 #define LSQUIC_DF_PACE_PACKETS 1 233 unsigned es_max_sfcw;
392 unsigned lsquic_engine_flags);
412 unsigned lsquic_engine_flags,
413 char *err_buf,
size_t err_buf_sz);
417 const unsigned char *buf;
419 const struct sockaddr *local_sa;
420 const struct sockaddr *dest_sa;
429 void *packets_out_ctx,
431 unsigned n_packets_out
445 void * (*pmi_allocate) (
void *pmi_ctx,
size_t sz);
446 void (*pmi_release) (
void *pmi_ctx,
void *obj);
454 void *ea_stream_if_ctx;
456 void *ea_packets_out_ctx;
481 void *peer_ctx,
const char *hostname,
482 unsigned short max_packet_size);
496 const unsigned char *packet_in_data,
size_t packet_in_size,
497 const struct sockaddr *sa_local,
const struct sockaddr *sa_peer,
614 ssize_t lsquic_stream_writev(
lsquic_stream_t *s,
const struct iovec *vec,
int count);
644 lsquic_http_header_t *headers;
696 const char **headers,
size_t *headers_sz);
716 lsquic_conn_get_stream_by_id (
lsquic_conn_t *c, uint32_t stream_id);
723 const struct sockaddr **local,
const struct sockaddr **peer);
726 int (*vprintf)(
void *logger_ctx,
const char *fmt, va_list args);
801 #define LSQUIC_GLOBAL_CLIENT (1 << 0) 807 #define LSQUIC_GLOBAL_SERVER (1 << 1) 882 #endif //__LSQUIC_H__ int lsquic_engine_has_pend_rw(lsquic_engine_t *)
void lsquic_global_cleanup(void)
unsigned es_max_cfcw
Definition: lsquic.h:231
unsigned lsquic_engine_quic_versions(const lsquic_engine_t *)
@@ -98,7 +98,6 @@
void lsquic_engine_send_unsent_packets(lsquic_engine_t *engine)
unsigned es_pendrw_check
Definition: lsquic.h:344
-
int lsquic_engine_earliest_adv_tick(lsquic_engine_t *engine, int *diff)
@@ -176,6 +175,7 @@
uint32_t lsquic_stream_id(const lsquic_stream_t *s)
void(* on_goaway_received)(lsquic_conn_t *c)
Definition: lsquic.h:104
+
unsigned es_progress_check
Definition: lsquic.h:327
int es_support_push
Definition: lsquic.h:284
unsigned lsquic_conn_n_pending_streams(const lsquic_conn_t *)
diff --git a/docs/html/lsquic__types_8h.html b/docs/html/lsquic__types_8h.html
index b7b0bf904..f253226c4 100644
--- a/docs/html/lsquic__types_8h.html
+++ b/docs/html/lsquic__types_8h.html
@@ -95,8 +95,6 @@
Include dependency graph for lsquic_types.h:
diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js
index 06fa75023..715bb57b7 100644
--- a/docs/html/search/all_1.js
+++ b/docs/html/search/all_1.js
@@ -89,5 +89,5 @@ var searchData=
['lsqver_5f037',['LSQVER_037',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dba5c2aa78b22ea462ae839566e19a87ea7',1,'lsquic.h']]],
['lsqver_5f038',['LSQVER_038',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dba2d39809298e0c7866b21fc7932504966',1,'lsquic.h']]],
['lsqver_5f039',['LSQVER_039',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dbaa9b8bed8ca169e8a3762308cbf0f3af3',1,'lsquic.h']]],
- ['lsqver_5f040',['LSQVER_040',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dbac17f226a6a4c61377a5e50710d5ef12f',1,'lsquic.h']]]
+ ['lsqver_5f041',['LSQVER_041',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dbac673a00564784af03b3b9cb747ed8af3',1,'lsquic.h']]]
];
diff --git a/docs/html/search/enumvalues_0.js b/docs/html/search/enumvalues_0.js
index ac2c758b0..fb40778f6 100644
--- a/docs/html/search/enumvalues_0.js
+++ b/docs/html/search/enumvalues_0.js
@@ -9,5 +9,5 @@ var searchData=
['lsqver_5f037',['LSQVER_037',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dba5c2aa78b22ea462ae839566e19a87ea7',1,'lsquic.h']]],
['lsqver_5f038',['LSQVER_038',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dba2d39809298e0c7866b21fc7932504966',1,'lsquic.h']]],
['lsqver_5f039',['LSQVER_039',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dbaa9b8bed8ca169e8a3762308cbf0f3af3',1,'lsquic.h']]],
- ['lsqver_5f040',['LSQVER_040',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dbac17f226a6a4c61377a5e50710d5ef12f',1,'lsquic.h']]]
+ ['lsqver_5f041',['LSQVER_041',['../lsquic_8h.html#a2633ae9ee8d564f4c499f6eb0913d4dbac673a00564784af03b3b9cb747ed8af3',1,'lsquic.h']]]
];
diff --git a/include/lsquic.h b/include/lsquic.h
index 697165a2b..e889ae766 100644
--- a/include/lsquic.h
+++ b/include/lsquic.h
@@ -67,9 +67,9 @@ enum lsquic_version
LSQVER_039,
/**
- * Q040. RST_STREAM, ACK and STREAM frames match IETF format.
+ * Q041. RST_STREAM, ACK and STREAM frames match IETF format.
*/
- LSQVER_040,
+ LSQVER_041,
N_LSQVER
};
@@ -79,9 +79,9 @@ enum lsquic_version
* @see lsquic_version
*/
#define LSQUIC_SUPPORTED_VERSIONS ((1 << LSQVER_035) | (1 << LSQVER_037) | \
- (1 << LSQVER_038) | (1 << LSQVER_039) | (1 << LSQVER_040))
+ (1 << LSQVER_038) | (1 << LSQVER_039) | (1 << LSQVER_041))
-#define LSQUIC_EXPERIMENTAL_VERSIONS ((1 << LSQVER_040))
+#define LSQUIC_EXPERIMENTAL_VERSIONS ((1 << LSQVER_041))
/**
* @struct lsquic_stream_if
diff --git a/src/liblsquic/CMakeLists.txt b/src/liblsquic/CMakeLists.txt
index 3b5c88ea1..56f09e6a0 100644
--- a/src/liblsquic/CMakeLists.txt
+++ b/src/liblsquic/CMakeLists.txt
@@ -8,7 +8,7 @@ SET(lsquic_STAT_SRCS
lsquic_parse_gquic_common.c
lsquic_parse_gquic_le.c
lsquic_parse_gquic_be.c
- lsquic_parse_gquic_Q040.c
+ lsquic_parse_gquic_Q041.c
lsquic_packet_in.c
lsquic_packet_out.c
lsquic_crypto.c
diff --git a/src/liblsquic/lsquic_engine.c b/src/liblsquic/lsquic_engine.c
index a3cbf731f..10ceedcfb 100644
--- a/src/liblsquic/lsquic_engine.c
+++ b/src/liblsquic/lsquic_engine.c
@@ -20,11 +20,6 @@
#include
#include
-#ifndef NDEBUG
-#include
-#include /* For code that loses packets */
-#endif
-
#include "lsquic.h"
diff --git a/src/liblsquic/lsquic_parse.h b/src/liblsquic/lsquic_parse.h
index 3361dafd6..95d4963fb 100644
--- a/src/liblsquic/lsquic_parse.h
+++ b/src/liblsquic/lsquic_parse.h
@@ -158,7 +158,7 @@ struct parse_funcs
extern const struct parse_funcs lsquic_parse_funcs_gquic_le;
/* Q039 and later are big-endian: */
extern const struct parse_funcs lsquic_parse_funcs_gquic_Q039;
-extern const struct parse_funcs lsquic_parse_funcs_gquic_Q040;
+extern const struct parse_funcs lsquic_parse_funcs_gquic_Q041;
#define select_pf_by_ver(ver) ( \
((1 << (ver)) & ((1 << LSQVER_035) | \
@@ -166,7 +166,7 @@ extern const struct parse_funcs lsquic_parse_funcs_gquic_Q040;
? &lsquic_parse_funcs_gquic_le : \
((1 << (ver)) & (1 << LSQVER_039)) \
? &lsquic_parse_funcs_gquic_Q039 \
- : &lsquic_parse_funcs_gquic_Q040)
+ : &lsquic_parse_funcs_gquic_Q041)
/* This function is QUIC-version independent */
int
@@ -177,7 +177,7 @@ enum QUIC_FRAME_TYPE
parse_frame_type_gquic_Q035_thru_Q039 (unsigned char first_byte);
enum QUIC_FRAME_TYPE
-parse_frame_type_gquic_Q040 (unsigned char first_byte);
+parse_frame_type_gquic_Q041 (unsigned char first_byte);
unsigned
parse_stream_frame_header_sz_gquic (unsigned char type);
diff --git a/src/liblsquic/lsquic_parse_gquic_Q040.c b/src/liblsquic/lsquic_parse_gquic_Q041.c
similarity index 98%
rename from src/liblsquic/lsquic_parse_gquic_Q040.c
rename to src/liblsquic/lsquic_parse_gquic_Q041.c
index 428d8fa52..09dd6faec 100644
--- a/src/liblsquic/lsquic_parse_gquic_Q040.c
+++ b/src/liblsquic/lsquic_parse_gquic_Q041.c
@@ -101,12 +101,6 @@ gquic_ietf_parse_stream_frame (const unsigned char *buf, size_t rem_packet_sz,
stream_frame->data_frame.df_fin = !!(type & 0x20);
- if (data_len)
- {
- READ_UINT(stream_frame->data_frame.df_size, 16, p, data_len);
- p += data_len;
- }
-
READ_UINT(stream_frame->stream_id, 32, p, stream_id_len);
p += stream_id_len;
@@ -115,6 +109,8 @@ gquic_ietf_parse_stream_frame (const unsigned char *buf, size_t rem_packet_sz,
if (data_len)
{
+ READ_UINT(stream_frame->data_frame.df_size, 16, p, data_len);
+ p += data_len;
CHECK_SPACE(stream_frame->data_frame.df_size, p, pend);
stream_frame->data_frame.df_data = p;
p += stream_frame->data_frame.df_size;
@@ -198,8 +194,6 @@ gquic_ietf_gen_stream_frame (unsigned char *buf, size_t buf_len, uint32_t stream
CHECK_SPACE(1 + olen + slen + dlen +
+ 1 /* We need to write at least 1 byte */, buf, buf + buf_len);
- p += dlen; /* Save room for data length */
-
#if __BYTE_ORDER == __LITTLE_ENDIAN
stream_id = bswap_32(stream_id);
#endif
@@ -213,7 +207,7 @@ gquic_ietf_gen_stream_frame (unsigned char *buf, size_t buf_len, uint32_t stream
p += olen;
/* Read as much as we can */
- nr = gsf_read(stream, p, n_avail, &fin);
+ nr = gsf_read(stream, p + dlen, n_avail, &fin);
assert(nr != 0);
if (dlen)
@@ -222,17 +216,15 @@ gquic_ietf_gen_stream_frame (unsigned char *buf, size_t buf_len, uint32_t stream
#if __BYTE_ORDER == __LITTLE_ENDIAN
nr_copy = bswap_16(nr_copy);
#endif
- memcpy(p - slen - olen - 2, &nr_copy, 2);
+ memcpy(p, &nr_copy, 2);
}
- p += nr;
+ p += dlen + nr;
}
else
{
dlen = 2;
CHECK_SPACE(1 + slen + olen + 2, buf, buf + buf_len);
- memset(p, 0, 2);
- p += 2;
#if __BYTE_ORDER == __LITTLE_ENDIAN
stream_id = bswap_32(stream_id);
#endif
@@ -243,6 +235,8 @@ gquic_ietf_gen_stream_frame (unsigned char *buf, size_t buf_len, uint32_t stream
#endif
memcpy(p, (unsigned char *) &offset + 8 - olen, olen);
p += olen;
+ memset(p, 0, 2);
+ p += 2;
}
/* Convert slen to bit representation: 0 - 3: */
@@ -279,7 +273,7 @@ gquic_ietf_parse_ack_high (const unsigned char *buf, size_t buf_len)
type = buf[0];
largest_obs_len = twobit_to_1248((type >> 2) & 3);
n_blocks_len = !!(type & 0x10);
- assert(parse_frame_type_gquic_Q040(type) == QUIC_FRAME_ACK);
+ assert(parse_frame_type_gquic_Q041(type) == QUIC_FRAME_ACK);
assert(buf_len >= 1 + n_blocks_len + 1 + largest_obs_len);
READ_UINT(packno, 64, buf + 1 + n_blocks_len + 1, largest_obs_len);
return packno;
@@ -540,7 +534,7 @@ gquic_ietf_gen_ack_frame (unsigned char *outbuf, size_t outbuf_sz,
}
-const struct parse_funcs lsquic_parse_funcs_gquic_Q040 =
+const struct parse_funcs lsquic_parse_funcs_gquic_Q041 =
{
.pf_gen_ver_nego_pkt = gquic_be_gen_ver_nego_pkt,
.pf_gen_reg_pkt_header = gquic_be_gen_reg_pkt_header,
@@ -570,5 +564,5 @@ const struct parse_funcs lsquic_parse_funcs_gquic_Q040 =
.pf_write_float_time16 = gquic_be_write_float_time16,
.pf_read_float_time16 = gquic_be_read_float_time16,
#endif
- .pf_parse_frame_type = parse_frame_type_gquic_Q040,
+ .pf_parse_frame_type = parse_frame_type_gquic_Q041,
};
diff --git a/src/liblsquic/lsquic_parse_gquic_common.c b/src/liblsquic/lsquic_parse_gquic_common.c
index 342faf5c3..854d4e7b2 100644
--- a/src/liblsquic/lsquic_parse_gquic_common.c
+++ b/src/liblsquic/lsquic_parse_gquic_common.c
@@ -389,7 +389,7 @@ static const enum QUIC_FRAME_TYPE byte2frame_type_Q035_thru_Q039[0x100] =
};
-static const enum QUIC_FRAME_TYPE byte2frame_type_Q040[0x100] =
+static const enum QUIC_FRAME_TYPE byte2frame_type_Q041[0x100] =
{
[0x00] = QUIC_FRAME_PADDING,
[0x01] = QUIC_FRAME_RST_STREAM,
@@ -658,9 +658,9 @@ parse_frame_type_gquic_Q035_thru_Q039 (unsigned char b)
enum QUIC_FRAME_TYPE
-parse_frame_type_gquic_Q040 (unsigned char b)
+parse_frame_type_gquic_Q041 (unsigned char b)
{
- return byte2frame_type_Q040[b];
+ return byte2frame_type_Q041[b];
}
diff --git a/src/liblsquic/lsquic_version.c b/src/liblsquic/lsquic_version.c
index d9aff6fc2..1f60dd7db 100644
--- a/src/liblsquic/lsquic_version.c
+++ b/src/liblsquic/lsquic_version.c
@@ -12,7 +12,7 @@ static const unsigned char version_tags[N_LSQVER][4] =
[LSQVER_037] = { 'Q', '0', '3', '7', },
[LSQVER_038] = { 'Q', '0', '3', '8', },
[LSQVER_039] = { 'Q', '0', '3', '9', },
- [LSQVER_040] = { 'Q', '0', '4', '0', },
+ [LSQVER_041] = { 'Q', '0', '4', '1', },
};
@@ -61,7 +61,7 @@ const char *const lsquic_ver2str[N_LSQVER] = {
[LSQVER_037] = "Q037",
[LSQVER_038] = "Q038",
[LSQVER_039] = "Q039",
- [LSQVER_040] = "Q040",
+ [LSQVER_041] = "Q041",
};
diff --git a/test/test_common.c b/test/test_common.c
index 388e071dc..c2974a5da 100644
--- a/test/test_common.c
+++ b/test/test_common.c
@@ -916,9 +916,9 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_versions |= 1 << LSQVER_039;
return 0;
}
- if (0 == strcmp(val, "Q040"))
+ if (0 == strcmp(val, "Q041"))
{
- settings->es_versions |= 1 << LSQVER_040;
+ settings->es_versions |= 1 << LSQVER_041;
return 0;
}
}
diff --git a/test/unittests/test_ackgen_gquic_ietf.c b/test/unittests/test_ackgen_gquic_ietf.c
index 76a5e2dbc..af63b10aa 100644
--- a/test/unittests/test_ackgen_gquic_ietf.c
+++ b/test/unittests/test_ackgen_gquic_ietf.c
@@ -17,7 +17,7 @@
#include "lsquic_logger.h"
#include "lsquic.h"
-static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_040);
+static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_041);
static void
test1 (void) /* Inverse of quic_framer_test.cc -- NewAckFrameOneAckBlock */
diff --git a/test/unittests/test_ackparse_gquic_ietf.c b/test/unittests/test_ackparse_gquic_ietf.c
index 1892b4193..4492ccc10 100644
--- a/test/unittests/test_ackparse_gquic_ietf.c
+++ b/test/unittests/test_ackparse_gquic_ietf.c
@@ -11,7 +11,7 @@
#include "lsquic_util.h"
#include "lsquic.h"
-static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_040);
+static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_041);
static lsquic_packno_t
diff --git a/test/unittests/test_rst_stream_ietf.c b/test/unittests/test_rst_stream_ietf.c
index 43e20bede..9bd6f4f51 100644
--- a/test/unittests/test_rst_stream_ietf.c
+++ b/test/unittests/test_rst_stream_ietf.c
@@ -10,7 +10,7 @@
#include "lsquic_alarmset.h"
#include "lsquic_parse.h"
-static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_040);
+static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_041);
/* The test is both for generation and parsing: */
diff --git a/test/unittests/test_streamgen.c b/test/unittests/test_streamgen.c
index ccf845df4..4529598c0 100644
--- a/test/unittests/test_streamgen.c
+++ b/test/unittests/test_streamgen.c
@@ -506,7 +506,7 @@ static const struct test tests[] = {
* IETF:
*/
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 1, },
.offset = 0x0807060504030201UL,
.stream_id = 0x210,
@@ -517,9 +517,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 1 << 3 | 3 << 1 | 1,
- 0x00, 0x0A, /* Data length */
0x02, 0x10, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x00, 0x0A, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 8 + 2 + 10,
@@ -527,7 +527,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 0, },
.offset = 0x0807060504030201UL,
.stream_id = 0x210,
@@ -538,9 +538,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 1 << 3 | 3 << 1 | 1,
- 0x00, 0x0A, /* Data length */
0x02, 0x10, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x00, 0x0A, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 8 + 2 + 10,
@@ -548,7 +548,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 1, 0, },
.offset = 0x0807060504030201UL,
.stream_id = 0x210,
@@ -559,9 +559,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 1 << 3 | 3 << 1 | 1,
- 0x00, 0x00, /* Data length */
0x02, 0x10, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x00, 0x00, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 8 + 2,
@@ -569,7 +569,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 1, 0, },
.offset = 0x0807060504030201UL,
.stream_id = 0x21,
@@ -580,9 +580,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 0 << 3 | 3 << 1 | 1,
- 0x00, 0x00, /* Data length */
0x21, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x00, 0x00, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 1 + 8 + 2,
@@ -590,7 +590,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 0, },
.offset = 0x77,
.stream_id = 0x210,
@@ -601,9 +601,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 1 << 3 | 1 << 1 | 1,
- 0x00, 0x0A, /* Data length */
0x02, 0x10, /* Stream ID */
0x00, 0x77, /* Offset */
+ 0x00, 0x0A, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 2 + 2 + 10,
@@ -611,7 +611,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 0, },
.offset = 0x0,
.stream_id = 0x210,
@@ -622,9 +622,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 1 << 3 | 0 << 1 | 1,
- 0x00, 0x0A, /* Data length */
0x02, 0x10, /* Stream ID */
/* Offset */
+ 0x00, 0x0A, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 0 + 2 + 10,
@@ -632,7 +632,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 1, },
.offset = 0x0,
.stream_id = 0x210,
@@ -643,9 +643,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 1 << 3 | 0 << 1 | 1,
- 0x00, 0x01, /* Data length */
0x02, 0x10, /* Stream ID */
/* Offset */
+ 0x00, 0x01, /* Data length */
'0',
},
.len = 1 + 2 + 0 + 2 + 1,
@@ -653,7 +653,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 0, },
.offset = 0xFFFFFF,
.stream_id = 0x210,
@@ -664,9 +664,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 1 << 3 | 2 << 1 | 1,
- 0x00, 0x0A, /* Data length */
0x02, 0x10, /* Stream ID */
0x00, 0xFF, 0xFF, 0xFF, /* Offset */
+ 0x00, 0x0A, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 4 + 2 + 10,
@@ -674,7 +674,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 0, },
.offset = 0xFFFFFFFFULL + 1,
.stream_id = 0x210,
@@ -685,9 +685,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 1 << 3 | 3 << 1 | 1,
- 0x00, 0x0A, /* Data length */
0x02, 0x10, /* Stream ID */
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, /* Offset */
+ 0x00, 0x0A, /* Data length */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
},
.len = 1 + 2 + 8 + 2 + 10,
@@ -695,7 +695,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 0, 0, },
.offset = 0xFFFFFFFFULL + 1,
.stream_id = 0x210,
@@ -715,7 +715,7 @@ static const struct test tests[] = {
},
{ .lineno = __LINE__,
- .pf = select_pf_by_ver(LSQVER_040),
+ .pf = select_pf_by_ver(LSQVER_041),
.fin = { 1, 0, },
.offset = 0xB4,
.stream_id = 0x01,
@@ -726,9 +726,9 @@ static const struct test tests[] = {
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 0 << 3 | 1 << 1 | 1,
- 0x00, 0x00, /* Data length */
0x01, /* Stream ID */
0x00, 0xB4, /* Offset */
+ 0x00, 0x00, /* Data length */
},
.len = 6,
.min_sz = 6,
diff --git a/test/unittests/test_streamparse.c b/test/unittests/test_streamparse.c
index 66be2f411..45bcb6f48 100644
--- a/test/unittests/test_streamparse.c
+++ b/test/unittests/test_streamparse.c
@@ -444,13 +444,13 @@ static const struct test tests[] = {
*/
{ "Balls to the wall: every possible bit is set",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 3 << 3 | 3 << 1 | 1,
- 0x01, 0xC4, /* Data length */
0x00, 0x00, 0x02, 0x10, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x01, 0xC4, /* Data length */
},
1 + 4 + 8 + 2,
0x200,
@@ -464,13 +464,13 @@ static const struct test tests[] = {
{ "Balls to the wall #2: every possible bit is set, except FIN",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 3 << 3 | 3 << 1 | 1,
- 0x01, 0xC4, /* Data length */
0x00, 0x00, 0x02, 0x10, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x01, 0xC4, /* Data length */
},
1 + 4 + 8 + 2,
0x200,
@@ -484,12 +484,13 @@ static const struct test tests[] = {
{ "Data length is zero",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 3 << 3 | 3 << 1 | 0,
0x00, 0x00, 0x02, 0x10, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0xC4, 0x01, /* Data length: note this does not matter */
},
1 + 4 + 8 + 0,
0x200,
@@ -503,13 +504,13 @@ static const struct test tests[] = {
{ "Stream ID length is 1",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 0 << 3 | 3 << 1 | 1,
- 0x01, 0xC4, /* Data length */
0xF0, /* Stream ID */
0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, /* Offset */
+ 0x01, 0xC4, /* Data length */
},
1 + 1 + 8 + 2,
0x200,
@@ -523,12 +524,13 @@ static const struct test tests[] = {
{ "All bits are zero save offset length",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 0 << 3 | 1 << 1 | 0,
0xF0, /* Stream ID */
0x02, 0x55, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, /* Offset */
+ 0xC4, 0x01, /* Data length */
},
1 + 1 + 2 + 0,
0x200,
@@ -542,7 +544,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_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 0 << 3 | 1 << 1 | 0,
@@ -564,13 +566,13 @@ 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_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 0 << 3 | 1 << 1 | 1,
- 0x00, 0x00,
0xF0, /* Stream ID */
0x02, 0x55, /* Offset */
+ 0x00, 0x00,
},
1 + 1 + 2 + 2,
200,
@@ -584,13 +586,13 @@ 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_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 1 << 5 | 0 << 3 | 1 << 1 | 1,
- 0x00, 0x00,
0xF0, /* Stream ID */
0x02, 0x55, /* Offset */
+ 0x00, 0x00,
},
1 + 1 + 2 + 2,
200,
@@ -604,13 +606,13 @@ static const struct test tests[] = {
{ "Check data bounds #1",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 0 << 3 | 1 << 1 | 1,
- 0x01, 0xFA, /* Data length */
0xF0, /* Stream ID */
0x02, 0x55, /* Offset */
+ 0x01, 0xFA, /* Data length */
},
1 + 1 + 2 + 2,
0x200,
@@ -624,13 +626,13 @@ static const struct test tests[] = {
{ "Check data bounds #2",
__LINE__,
- select_pf_by_ver(LSQVER_040),
+ select_pf_by_ver(LSQVER_041),
/* 11 F SS OO D 11FSSOOD */
/* TYPE FIN SLEN OLEN DLEN */
{ 0xC0 | 0 << 5 | 0 << 3 | 1 << 1 | 1,
- 0x01, 0xFB, /* <--- One byte too many */
0xF0, /* Stream ID */
0x02, 0x55, /* Offset */
+ 0x01, 0xFB, /* <--- One byte too many */
},
1 + 1 + 2 + 2,
0x200,