Summary: This implements the handshake done signal and also cipher dropping.
Reviewed By: yangchi
Differential Revision: D19584922
fbshipit-source-id: a98bec8f1076393b051ff65a2d8aae7d572b42f5
Summary:
New QUIC draft no longer has this limitation for connection-id, and allows
connid of len 0 -> 20.
This diff removes the constraints. I still kept the requirement for
*server-chosen* conn-id
Reviewed By: mjoras, lnicco
Differential Revision: D19507366
fbshipit-source-id: 4c73f45617f40b29d47d2d86b7598f6c95588d0a
Summary:
All instancesi of LIKELY and UNLIKELY probably should be removed. We will
add them back in if we see pathologies in performance profiles.
Reviewed By: mjoras
Differential Revision: D19163441
fbshipit-source-id: c4c2494d18ecfd28f00af1e68ecaf1e85c1a2e10
Summary: By using something which inlines some number of elements, we can avoid doing any mallocs from `std::vector` in the common cases. This also eliminates one layer of indirection in the common case.
Reviewed By: siyengar
Differential Revision: D18903523
fbshipit-source-id: 9f72e93f58a6b42777e5afe10e7ee6a13bf94c66
Summary:
For padding frames we don't really need to know the exact number of padding frames in the packet,
but just that a padding frame exists.
This diff tries to collapse multiple sequential padding frames into 1 frame while decoding the packet.
While this wont collapse all padding frames, the common case is that padding is sequential and at the
end of the packet.
Reviewed By: JunqiWang
Differential Revision: D18901925
fbshipit-source-id: 17b4eeabdbf4df01c900a9d5078891eb64bf254a
Summary:
Don't use IOBufQueue for most operations in mvfst and use BufQueue instead. Since BufQueue did not support a splitAtMost, added it in instead.
The only place that we still use IOBufQueue is in crypto because fizz still requires it
Reviewed By: mjoras
Differential Revision: D18846960
fbshipit-source-id: 4320b7f8614f8d2c75f6de0e6b786d33650e9656
Summary:
Don't clone during decoding a stream frame.
This uses a BufQueue to manage the data instead of passing around cursors.
Reviewed By: yangchi
Differential Revision: D18827718
fbshipit-source-id: 7874d308bb5f43b983b9965b2862e733a2107039
Summary: As a part of Draft 17, application close frame has been removed, we use connection close frame to represent both application close and connection close.
Reviewed By: mjoras
Differential Revision: D18580856
fbshipit-source-id: d274fa2d3dbc59b926bca5a2b8a20328ae582703
Summary: These otherwise show up as `warning C4101: 'e': unreferenced local variable`
Reviewed By: udippant
Differential Revision: D17855614
fbshipit-source-id: 3c1f65c6c46827d2567da27e1145ce73184659d8
Summary:
Allow the client to set zero-length id for itself.
If enabled, saves 8 bytes (if packet isn't padded to minimum).
However, will be disabled if connection migration is enabled.
Main changes include updating the short header parsing to pass
in the connection id length, since unlike long headers,
short header's dst conn id isn't preceeded by length.
Created a new `QuicClientTransportAfterStartTestBase` class
to move `testing::WithParamInterface<>` inheritance to subclasses.
(Only one parameter per test class).
Reviewed By: JunqiWang
Differential Revision: D17188777
fbshipit-source-id: f60a7f3c07da1a8c83cec5b518075d23daedbe44
Summary:
Make a custom variant type for PacketHeader. By not relying on boost::variant
this reduces the code size of the implementation.
This uses a combination of a union type as well as a enum type to emulate a variant
Reviewed By: yangchi
Differential Revision: D17187589
fbshipit-source-id: 00c2b9b8dd3f3e73af766d84888b13b9d867165a
Summary:
Prior to this we had an incorrect check for something being a stream frame. It technically should have worked for minimally encoded frame types, but would not work for a spec-incompliant frame type.
Instead of using a mask this makes it so each stream frame type is explicitly enumerated. This isn't as clean looking but is easier to validate as correct.
This also revealed some places where we were not correctly plumbing through the version for unit tests, so fixing those as a driveby.
Reviewed By: yangchi
Differential Revision: D16676631
fbshipit-source-id: 835dcc6e1f431bbe3fa4a5c6b8e616863c126155
Summary: This was affected by CID length fields as well.
Reviewed By: sharma95
Differential Revision: D16402854
fbshipit-source-id: 09421f42fd0c9629d852a0e9c24f966babab8aae
Summary: These were changed to varints. To support this we need to do some extra horrible version plumbing. I don't want to keep this long term but it works for now.
Reviewed By: yangchi
Differential Revision: D16293568
fbshipit-source-id: a9ea9083be160aa3e6b338a7d70d7f00e44ec5ab
Summary:
Draft-22 onwards uses two one byte length fields to encode connection ID length instead of one one byte length field.
To support this without disrupting existing clients we need to make our parsing version dependent. This diff accomplishes it by special casing the existing Facebook client QUIC version (0xfaceb000), and changing the default Facebook client version going forward to 0xfaceb001.
Note that this diff also changes the behavior of the ticket transport parameters. When we changed from draft-18 to draft-19 transport parameters I apparently forgot to update the ticket transport parameters to the new format.
Reviewed By: yangchi
Differential Revision: D16205090
fbshipit-source-id: e74a92fa959d308f4bb43bad76e58d4b58d07322
Summary: post draft-17 it is interpreted as count not the max stream id
Reviewed By: mjoras
Differential Revision: D15523021
fbshipit-source-id: 779a1c5269eb8dbcdcd169303caa7a65e467339c