I'm learning c(++) and trying to implement SAP and SDP announcement protocols. Currently, I'm following the RFCs and some code from Git Hub (like gestream and mumudvb). There I can see that after the SAP header, there are 8 bytes "head" before the SDP text. I could find such instructions in the RFCs or at least I didn't understand such a thing. This is my first try to implement something from RFC and I'm a bit confused about this "head".
Sorry, if my question looks dumb, but I want to understand it.
Thanks
I've checked the implemented SAP services and the RFC but I could not find why there are 8 bytes there.
We need https://datatracker.ietf.org/doc/html/rfc2974 section 5 page 6:
We also need parts from mumudvb2 sap.h
and parts of sap.c https://github.com/braice/MuMuDVB/blob/mumudvb2/src/sap.c#L267 related to ipv4 handling:
The first 4 bytes are
| V=1 |A|R|T|E|C| auth len | msg id hash |and the next 4 bytes isoriginating source (32 [...] bits.That said, I do fully understand your confusion. It is part of the protocol, the
payload typeset to application/sdp mime type goes after what is in front of it.