[Olsr-dev] OLSRd 0.6.0 with ETT available

Erik Tromp (spam-protected)
Thu Sep 30 15:05:12 CEST 2010


> I have a question on your encoding of the ETT values in the Hello/TC
> messages.
> 
> In the HELLO messages you seem to be using a 5 byte encoding. OLSR
> messages have to be 4-byte aligned, so you want to add 3 bytes of
> padding there. It might crash your nodes on an ARM/MIPS cpu otherwise.
> 
> Henning Rogge
> --

I just checked it in the code. I have a question:

Are you sure it will crash an ARM/MIPS cpu? The packets are never read
directly into their corresponding packet structs. The values in the
packets are always read via the pkt_get_[u|s]{8|16|32] functions
(see lq_packet.h) and then copied into the packets structs. I would
assume these functions can safely read any 8/16/32-bits number from
any buffer or any address into a packet struct? Or can't they?

If the can't, shouldn't there be a comment above these functions
specifying this limitation? And, if they can't, can the ARM_NOWARN_ALIGN
macro be used? It seems from the rest of the code that this macro is
used whenever a 16/32 bits value is not aligned.

Thanks,
Erik







More information about the Olsr-dev mailing list