Attention is currently required from: pespin.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email )
Change subject: rtp2trau HR to DL: validate ToC octet of RFC 5993 ......................................................................
Patch Set 2:
(1 comment)
File src/trau/trau_rtp_conv.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/39626/comment/68357f53_e3d8a9c8?... : PS1, Line 671: if (data[0] & 0xD0)
well, the purpose precisely is that I don't have to look at the exact structure of that byte each ti […]
The check in question needs to be performed in two functions, HR to TRAU-16k-DL and HR to TRAU-8k-DL. We could factor out a helper function for RFC 5993 validation that would act in the most straightforward manner: first check the F bit, then extract FT and validate it. But a one-line check of `(data[0] & 0xD0)` is way more efficient that calling (or even inlining) a helper function that does two separate bit-field checks.
In the new patch revision, I added a detailed comment explaining all of this logic. Can we please accept this version?