#define FIELD1(A) (*((short int*)&A[0]))
#define FIELD2(A) (*((long*)&A[2]))
x=FIELD1(data); /* using field1 */
I don't know how this should help: say A starts at 0x03, then accessing
FIELD2 would still result in a long-pointer being accessed at 0x03+2 = 0x05.
This is what will not work on most platforms.
It would not work on platforms like ARM, BUT all ip protocols are 32bit
oriented, so that is a case that does not exist AFAIK on any protocol on
a tcp and related pack
Alain
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users