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
Marten Seemann
902853784b
remove unused perspective from header parsing
2018-11-26 11:14:39 +07:00
Marten Seemann
fd646ff877
include the packet number len in the length calculation for long headers
2018-11-25 14:16:28 +07:00
Marten Seemann
716e8f2d0a
remove the error return value from wire.Header.GetLength
...
Using an invalid packet number length would error on Header.Write(), so
it's not necessary to check this on GetLength().
2018-11-01 13:49:36 +07:00
Marten Seemann
3266e36811
drop support for gQUIC
2018-10-30 10:20:39 +07:00
Marten Seemann
73a1a0e509
implement writing of the gQUIC 44 header
2018-08-28 08:49:29 +07:00
Marten Seemann
a98fd88a1b
implement parsing of the gQUIC 44 header
2018-08-28 08:49:29 +07:00
Marten Seemann
46f8c07daa
improve the version negotiation integration test
2018-08-27 09:29:26 +07:00
Marten Seemann
d8aa49d0f9
implement writing and parsing of the new Retry packet
2018-08-13 08:47:29 +07:00
Marten Seemann
e39251c8b5
implement writing and parsing of Initial packets containing a Token
2018-08-13 08:47:29 +07:00
Marten Seemann
0bd7e744ff
implement parsing of headers with different connection ID lengths
2018-07-03 18:01:41 +07:00
Marten Seemann
4109c85c8a
refactor header parsing in a version independent and dependent part
2018-07-01 09:01:30 +07:00
Marten Seemann
fc57bf6c35
only set the destination connection ID for the Public Header
2018-06-24 16:47:59 +07:00
Marten Seemann
3e03055a7d
use varint packet numbers in IETF QUIC headers
2018-06-06 16:07:47 +02:00
Marten Seemann
372463db49
don't pass the client's version to the header parser
2018-05-21 11:27:15 +08:00
Marten Seemann
797dfa57a1
disable 6 byte packet number in Public Headers
...
Chrome never sends 6 byte packet numbers in Public Headers.
2018-05-21 11:26:08 +08:00
Marten Seemann
8f2fed1b10
parse IETF headers independent of the sender's perspective
...
The IETF header format allows parsing of the header without knowing
which peer sent the packet.
2018-05-09 13:28:30 +09:00
Marten Seemann
683b5823e4
handle gQUIC and IETF QUIC packets separately in the client
2018-05-08 15:17:16 +09:00
Marten Seemann
804eac7348
fix logging of version negotiation packets
2018-04-23 16:37:59 +09:00
Marten Seemann
52d31dd7ef
implement the new header format
...
Currently, we're only sending and accepting packets with matching source
and destination connection IDs.
2018-04-19 13:46:54 +09:00
Marten Seemann
1a035a265c
change the type of Connection ID to byte slice
2018-04-18 22:41:24 +09:00
Marten Seemann
948eef3e42
create a logger interface and use it everywhere
2018-04-04 13:03:28 +07:00
Marten Seemann
b6ca910a52
implement the IETF draft 10 header changes
2018-03-05 19:13:37 +07:00
Marten Seemann
81974d30d6
run gosimple in gometalinter
2018-02-23 22:42:32 +08:00
Marten Seemann
11af98e338
run misspell in gometalinter
2018-02-23 22:39:08 +08:00
Marten Seemann
a4bc7362e0
fix IETF Version Negotiation Packet, it doesn't have a packet number
2018-02-23 14:20:47 +08:00
Marten Seemann
be29963637
send a reserved version number in version negotiation packets
2017-12-06 10:20:22 +07:00
Marten Seemann
45e43ada40
implement the recent changes to the version negotiation packet
2017-12-06 08:40:43 +07:00
Marten Seemann
7c3d6abb4b
fix parsing of the Header type byte
...
In order to determine if a packet is a Version Negotiation Packet, it is
not sufficient to just look at bit 0x1. Other packet types also have
that bit set, e.g. the Retry packet (packet type 0x3). Instead, we have
to look at the last 3 bits. This fix will work as long as IETF QUIC
doesn't define more than 8 long header types.
2017-11-13 10:23:17 +08:00
Marten Seemann
234d5aab36
echo the offered version in IETF Version Negotiation Packets
2017-11-12 14:37:43 +08:00
Marten Seemann
5d4174b2f0
parse the packet header before getting the session from the session map
2017-11-10 08:48:45 +07:00