Hello,

The (linux) kernel has endianess-aware integer types (__be_u16 or
something similar) which allow the access to be checked for endianess
problems (basically reading an endianess-annotated type into a
non-endianess-specified (ie native endianess) type must go through a
byte order macro).

You have to annotate by hand all shared structures with these types.
In your case, this would be all network-shared structures.

I'm not sure the compiler does the check though, it may be an external
tool. It could be however very interesting to generalize this outside
of the kernel.

JB

--
Jean-Baptiste Note
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to