Commit Graph

247 Commits

Author SHA1 Message Date
Mark Spanbroek 81fe228e69 Writes retry integrity tag 2020-09-30 09:20:32 +02:00
Mark Spanbroek 0ca1440bd8 Writes retry token 2020-09-30 09:20:32 +02:00
Mark Spanbroek 37d2e0364b Determines length of a retry packet 2020-09-30 09:20:32 +02:00
Mark Spanbroek 1e748a4719 Decoding of variable length integers 2020-09-30 09:20:32 +02:00
Mark Spanbroek 5f94cf733b Variable length encoding of integers 2020-09-30 09:20:32 +02:00
Mark Spanbroek 60af5afb2e Rename: packetLength -> len 2020-09-30 09:20:32 +02:00
Mark Spanbroek 0f7d8e1a26 Writes supported version 2020-09-30 09:20:32 +02:00
Mark Spanbroek a2d0be717f Write source and destination id 2020-09-30 09:20:32 +02:00
Mark Spanbroek 1c20c08f55 Restructure tests to fit the restructured implementation 2020-09-23 15:04:49 +02:00
Mark Spanbroek afcf424e47 Rename: header -> packet 2020-09-23 15:04:49 +02:00
Mark Spanbroek df754f0ee3 Replace byte indexing by stews/endians2 2020-09-23 15:04:49 +02:00
Mark Spanbroek 1c4c8528ca Remove newShortPacket() 2020-09-23 15:04:49 +02:00
Mark Spanbroek 5158cd8bd3 Rename newPacket -> readPacket 2020-09-23 15:04:49 +02:00
Mark Spanbroek ffa84467ca Use auto-generated conversion to string 2020-09-23 15:04:49 +02:00
Mark Spanbroek 84e5e999ad Rename: PacketHeader -> Packet 2020-09-23 15:04:49 +02:00
Mark Spanbroek 56cf34176a Move version to only those header kinds that have it 2020-09-23 15:04:49 +02:00
Mark Spanbroek c9df11db01 Introduce separate objects for each kind of long packet 2020-09-23 15:04:49 +02:00
Mark Spanbroek d1b461dca1 Convert 'supportedVersion' to a field in PacketHeader object 2020-09-23 15:04:49 +02:00
Mark Spanbroek 7476645b51 Convert 'destination' to a field of PacketHeader object 2020-09-23 15:04:49 +02:00
Mark Spanbroek cefaf7da15 Re-introduce PacketHeader.form
Rationale: we need to introduce destination and source addresses,
and these are only valid in the long form.
2020-09-23 15:04:49 +02:00
Mark Spanbroek 35c1ba1ab4 Write correct fixed bit 2020-09-23 15:04:49 +02:00
Mark Spanbroek 46a561fb95 Convert 'kind' to a field of the PacketHeader object 2020-09-23 15:04:49 +02:00
Mark Spanbroek 9d8faab582 Replace .bytes getter by proc that writes to datagram 2020-09-23 15:04:49 +02:00
Mark Spanbroek 5c1a4b2cef Setup datagram for testing 2020-09-23 15:04:49 +02:00
Mark Spanbroek 66f2a44545 Combine HeaderForm and PacketKind enums into a single enum 2020-09-23 15:04:49 +02:00
Mark Spanbroek 9ebba09f91 QUIC version is only present in long packets 2020-09-23 15:04:49 +02:00
Mark Spanbroek 4afd62bcb8 Conversion of version negotiation packet to string 2020-09-23 15:04:49 +02:00
Mark Spanbroek 329513fdde Supported version field for version negotation packets 2020-09-23 15:04:49 +02:00
Mark Spanbroek f54f7a4f3b Length of version negotiation packet 2020-09-23 15:04:49 +02:00
Mark Spanbroek f9de4befa9 Represent connection ids as hex strings 2020-09-17 20:35:01 +02:00
Mark Spanbroek f812007a25 Convert packet header to string 2020-09-17 20:35:01 +02:00
Mark Spanbroek 2e239864c7 Source connection id 2020-09-17 20:35:01 +02:00
Mark Spanbroek 64ec610906 Remove duplication in tests 2020-09-17 20:35:01 +02:00
Mark Spanbroek 117c5ca57d Destination connection id 2020-09-17 20:35:01 +02:00
Mark Spanbroek fe391af848 Packet types `Initial`, `0-RTT`, `Handshake` and `Retry` 2020-09-17 20:35:01 +02:00
Mark Spanbroek c8f1205116 Recognize version negotiation packets 2020-09-17 20:35:01 +02:00
Mark Spanbroek 9ea715662b Add QUIC version to packet header 2020-09-17 20:35:01 +02:00
Mark Spanbroek 84ab75184c Set individual bytes in a uint32 using MSB 0 indexing 2020-09-17 20:35:01 +02:00
Mark Spanbroek d2d590ada3 Rename: kind -> form
"Header Form" is the term from the QUIC spec
2020-09-17 20:35:01 +02:00
Mark Spanbroek 29d7b5cb7c Ensure that second bit of the header is always 1 2020-09-17 20:35:01 +02:00
Mark Spanbroek db9febbb19 Store its kind in the first bit of the header 2020-09-17 20:35:01 +02:00
Mark Spanbroek 0ca8fd9f27 Put all tests in suites 2020-09-17 20:35:01 +02:00
Mark Spanbroek 63f61b2c72 Add operations for setting bits using MSB 0 indexing
The QUIC spec (and all other RFC's) use MSB 0 indexing.
2020-09-17 20:35:01 +02:00
Mark Spanbroek ce52086d4e Add PacketNumber 2020-09-17 20:35:01 +02:00
Mark Spanbroek 24cc943dfb Add PacketHeader 2020-09-17 20:35:01 +02:00
Mark Spanbroek 6f7d29fc65 Add dependency on ngtcp2 2020-09-07 16:32:28 +02:00
Mark Spanbroek 5936c89813 Project setup 2020-09-03 10:05:46 +02:00