[maemo-developers] [maemo-developers] automatic byte order check
From: Jean-Baptiste Note jbnote at gmail.comDate: Mon Aug 21 11:10:17 EEST 2006
- Previous message: [maemo-developers] automatic byte order check
- Next message: [maemo-developers] automatic byte order check
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [maemo-developers] automatic byte order check
- Next message: [maemo-developers] automatic byte order check
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]