Commit graph

5 commits

Author SHA1 Message Date
Florent Castelli
1e78e95de5 dcsctp: Fix iOS build errors
Bug: webrtc:12614
Change-Id: Ib221688007892ab0b87ef768d20f7d779b3bfd55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217381
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33911}
2021-05-04 10:11:15 +00:00
Victor Boivie
10aaa3f1e7 dcsctp: Fixed parameter name typo
Late review comments from
https://webrtc-review.googlesource.com/c/src/+/213180

Bug: webrtc:12614
Change-Id: I61471902b50c6a08092a1fa9d3a03202c95177d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214486
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33665}
2021-04-09 07:39:50 +00:00
Victor Boivie
58fa1bac03 dcsctp: Enforce variable length TLV minimum length
The length field was validated to not be too big, or to have too much
padding, but it could be smaller than the fixed size of the chunk, which
isn't correct. Now it's enforced to be at minimum the size of the fixed
size header.

Bug: webrtc:12614
Change-Id: I57089a5ba2854eeb63ab3b4e28cf5878087d06e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214484
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33659}
2021-04-08 15:33:16 +00:00
Victor Boivie
b87746b155 dcsctp: Add parameters, error causes and chunks
Quite a large commit, but mostly trivial. It adds all the (in dcSCTP)
supported parameters, error causes and chunks as an object model, with
serializers and deserializers. They are verified with packet captures
where available, that have been captured with Wireshark against a
reference implementation.

This _could_ be split in parameter/ as one commit, error_cause/ in the
following, and chunk/ as the third, but as each chunk/parameter is
completely isolated from the other, reviewing it should be linear with
the number of chunks/parameters and having them in more commits wouldn't
change that, taken all those three commits into account.

Bug: webrtc:12614
Change-Id: Ie83c9a22cae6e3a39e35ef26fd532837a6387a08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213347
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33625}
2021-04-06 10:28:18 +00:00
Victor Boivie
3dffa81541 dcsctp: Add TLV trait
Various entities in SCTP are padded data blocks, with a type and
length field at fixed offsets, all stored in a 4-byte header. This is
called the Type-Length-Value format, or TLV for short.

See e.g. https://tools.ietf.org/html/rfc4960#section-3.2 and
https://tools.ietf.org/html/rfc4960#section-3.2.1

This templated class, which is used as a trait[1], is configurable -
a struct passed in as template parameter.

[1] https://en.wikipedia.org/wiki/Trait_(computer_programming)

Bug: webrtc:12614
Change-Id: I52c2b5056931aba5fb23419406314136b5a4f650
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213180
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33602}
2021-03-31 12:52:38 +00:00