-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FramedTransport::Header not serialized?! #163
Comments
I experienced problems due to lack of serialized header, and added some code to framed transport class to serialize header. I can share the code on request. |
Maybe you can raise a PR so that it can be included in master branch of erpc? I don't want to maintain a fix on my own. |
Hi, Could you explain why you need serialize framedTransport header? Currently it is send to other side before serialized message as it contains extra data in compare with other possible transports. |
Hi @Hadatko , using the term serialize may be wrong here. Sometimes the transferred header may be corrupted due to lack of frame and CRC. So I have to add an extra frame and CRC to check header integrity into header. |
So the issue is related to sending receiving message size. As second receive call is using size from first call. Sounds reasonable to me to have crc of header. |
Yes, it is related to message size. The second side wait for message with incorrect size. So the transfer is aborted if there is a timeout for the transfer. In our particular situation, the content of message were coded as |
@Hadatko Why is it not needed to serialize and deserialize header? Representing header in network byte order would be the only way to let little-endian and big-endian exchange header before receiving the payload. |
So we have two issues here. Serializing header and validate header. If you can create PR for both of them it should be great ;) Thank you guys. |
I will take a look on theese. |
Didn't it solved enough at #276 ? |
How is that PR solving CRC of header data? |
erpc/erpc_c/infra/erpc_framed_transport.cpp Line 128 in b3951d8
|
@amgross :D That is crc of next message (serialized data). But there is no check if sended header data are correct. From what i understand here we need add crcHeader into Header struct. This one will be computed from header crc and length. |
The first message here talked about 'E.g. do htons on the 16 bit members m_messageSize and m_crc', so I thought we are talking on endianness issue |
Why is not the erpc header (
FramedTransport::Header
) serialized? E.g. dohtons
on the 16 bit membersm_messageSize
andm_crc
.The text was updated successfully, but these errors were encountered: