Marten Seemann
267cca773b
switch from math/rand to math/rand/v2 ( #5045 )
...
* switch from math/rand to math/rand/v2
* switch away from golang.org/x/exp/rand
2025-04-19 09:01:22 +02:00
Marten Seemann
672f906a40
wire: migrate tests away from Ginkgo ( #4643 )
...
* wire: translate ACK frame tests
* wire: translate CONNECTION_CLOSE frame tests
* wire: translate DATA_BLOCKED frame tests
* wire: translate DATAGRAM frame tests
* wire: translate HANDSHAKE_DONE frame tests
* wire: translate MAX_DATA frame tests
* wire: translate MAX_STREAM_DATA frame tests
* wire: translate MAX_STREAMS frame tests
* wire: translate NEW_CONNECTION_ID frame tests
* wire: translate NEW_TOKEN frame tests
* wire: translate PATH_CHALLENGE frame tests
* wire: translate PATH_RESPONSE frame tests
* wire: translate PING frame test
* wire: translate RESET_STREAM frame tests
* wire: translate RETIRE_CONNECTION_ID frame tests
* wire: translate STOP_SENDING frame tests
* wire: translate STREAM_DATA_BLOCKED frame tests
* wire: translate STREAMS_BLOCKED frame tests
* wire: translate CRYPTO frame tests
* wire: translate STREAM frame tests
* wire: translate version negotiation tests
* wire: translate header tests
* wire: translate pool tests
* wire: translate frame logging tests
* wire: translate short header tests
* wire: translate framer parser tests
* wire: translate transport parameter tests
2024-09-12 19:27:39 -07:00
Marten Seemann
e737d4a40e
wire: speed up parsing of headers with arbitrary length connection IDs ( #4618 )
...
This is significantly faster:
name old time/op new time/op delta
ArbitraryHeaderParsing/dest_8/_src_10-16 53.8ns ± 2% 27.4ns ± 2% -49.01% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16 61.6ns ± 1% 33.3ns ± 3% -46.00% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16 90.0ns ± 3% 54.8ns ± 5% -39.09% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
ArbitraryHeaderParsing/dest_8/_src_10-16 72.0B ± 0% 24.0B ± 0% -66.67% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16 96.0B ± 0% 48.0B ± 0% -50.00% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16 320B ± 0% 272B ± 0% -15.00% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
ArbitraryHeaderParsing/dest_8/_src_10-16 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.008 n=5+5)
2024-08-03 16:50:42 -07:00
Marten Seemann
5f8d146836
wire: optimize parsing of long header packets ( #4589 )
2024-07-21 14:22:32 -07:00
Marten Seemann
347a4afc51
wire: refactor header parsing to use quicvarint.Parse ( #4481 )
...
* wire: add benchmark tests for initial and retry header parsing
* wire: refactor header parsing to use quicvarint.Parse
* wire: simplify tracking of parsed length for Long Header parsing
2024-05-05 05:48:06 -07:00
Marten Seemann
fbaa941ea1
protocol: rename VersionNumber to Version ( #4295 )
2024-01-31 21:57:33 -08:00
Marten Seemann
eb05964942
wire: speed up identification of 0-RTT packets ( #3761 )
2023-04-19 05:50:57 -07:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go ( #3680 )
2023-01-21 19:53:57 -08:00
Marten Seemann
c24fbb094c
refactor header writing to append to a byte slice ( #3646 )
...
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b
remove the LongHeader field from the wire.Header
2023-01-17 21:53:39 +13:00
Marten Seemann
aca052dc7c
stop using the ExtendedHeader for parsing short header packets in tests
2023-01-17 21:53:39 +13:00
Marten Seemann
e89fc1152b
stop using the ExtendedHeader for writing short header packets in tests
2023-01-17 21:53:39 +13:00
Marten Seemann
870fbe7ab0
migrate to Ginkgo v2
2022-10-11 16:38:44 +04:00
Marten Seemann
31995601a9
return an error when parsing a too long connection ID from a header ( #3533 )
2022-08-30 04:08:41 -07:00
Marten Seemann
1aced95d41
use an array instead of a byte slice for Connection IDs
2022-08-29 11:30:31 +03:00
Marten Seemann
21b9ef03be
add a type for arbitrary length Connection IDs, and parsing function
...
RFC 8999 allows Connection IDs of up to 255 bytes. Current QUIC versions
only use up to 20 bytes.
2022-08-29 10:58:33 +03:00
Marten Seemann
d7097d74f0
implement a function to parse the version number of a Long Header packet
2022-08-29 10:58:33 +03:00
Marten Seemann
80fd1b57c8
add a function to distinguish between long and short header packets ( #3498 )
2022-08-11 07:35:01 -07:00
Marten Seemann
f3744f6535
implement parsing and writing of QUIC v2 packet headers
2022-05-26 12:57:45 +02:00
Marten Seemann
909a3a9093
remove unneeded version constant in wire tests
2022-05-25 16:12:11 +02:00
Marten Seemann
7676e455c5
add a function to tell if a packet is a 0-RTT packet
2021-03-11 21:05:41 +08:00
Marten Seemann
993d71fd56
move the SupportedVersions slice out of the wire.Header
2020-07-09 12:05:33 +07:00
Marten Seemann
f58eb47383
qlog when packets are dropped due to unsupported QUIC version
2020-04-10 14:39:02 +07:00
Marten Seemann
7b10453af8
implement the Retry integrity tag
2020-01-17 13:42:57 +07:00
Marten Seemann
be59be9ef1
use the parsed header length when unpacking packets
2019-12-09 15:42:37 +08:00
Marten Seemann
78029adfb2
improve logging of undecryptable packets
2019-11-25 14:06:44 +07:00
Marten Seemann
ab2b26a5cb
add the unparam linter
2019-09-17 13:44:05 +07:00
Marten Seemann
dc33db1c18
implement the new header format
2019-07-09 13:04:40 +07:00
Marten Seemann
7b9b711a77
fix timing side channel when reading headers with invalid reserved bits
2019-06-30 15:57:03 +07:00
Marten Seemann
4fe0f6752c
fix typos in error messages when parsing Version Negotiation packets
2019-06-29 11:00:57 +07:00
Marten Seemann
14a31d49a0
add a type for the key phase and use it for header parsing and writing
2019-06-22 20:01:18 +08:00
Marten Seemann
9c09e84765
use IETF QUIC transport error codes
2019-03-06 13:43:18 +09:00
Marten Seemann
df34e4496e
identify version negotiation packets without parsing the header
2019-02-23 10:24:42 +08:00
Marten Seemann
14426dfa12
implement a function to parse the destination connection ID of a packet
2019-02-23 10:24:42 +08:00
Marten Seemann
28ed85b9c6
move cutting of coalesced packets to the wire package
2019-02-23 10:24:42 +08:00
Marten Seemann
03489f56a7
handle the packet length before parsing the extended header
2018-12-14 16:46:40 +06:30
Marten Seemann
0d30e43c32
implement the new format of the Retry packet
2018-11-27 08:29:31 +07:00
Marten Seemann
c791145cba
check that the 4th and 5th bit in the short header first byte are unset
2018-11-26 23:14:18 +07:00
Marten Seemann
cce71d84a1
check that the 5th and 6th bit in the long header first byte are unset
2018-11-26 23:05:56 +07:00
Marten Seemann
bfb467e9b8
use the new packet number format
2018-11-26 23:05:55 +07:00
Marten Seemann
4145bcc8a7
reject a header if the 0x40 bit of the first bit is not set
...
This doesn't apply to the version negotiation packet.
2018-11-26 22:46:08 +07:00
Marten Seemann
9c07ac15b8
use the new code points for the packet types in the first byte
2018-11-26 22:46:06 +07:00
Marten Seemann
53aeb7d592
don't use the wire encoding for the PacketType constant
2018-11-26 22:45:28 +07:00
Marten Seemann
70ce6a5814
parse the whole Long Header, if the version is known
2018-11-26 15:57:54 +07:00
Marten Seemann
b740d57c61
embed the Header in the ExtendedHeader
2018-11-26 15:57:54 +07:00
Marten Seemann
af157408de
move parsing of extended headers to the same file as the struct
2018-11-26 15:57:54 +07:00
Marten Seemann
bf96707f48
rename the wire.Header to ExtendedHeader
...
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
cef26922b4
when parsing the header from the invariant header, start from first byte
...
This will be needed once we implement header encryption, because the
flags in the first byte are encrypted.
2018-11-26 15:57:54 +07:00
Marten Seemann
8856384b83
Merge pull request #1627 from lucas-clemente/remove-header-writing-perspective
...
remove unused perspective from header writing
2018-11-26 15:47:00 +07:00
Marten Seemann
6150c19dcb
remove unused perspective from header writing
2018-11-26 13:43:27 +07:00